Changeset 3642


Ignore:
Timestamp:
Jul 14, 2011 6:51:51 AM (13 years ago)
Author:
bennylp
Message:

More re #1284 (event): changed event to use the fourcc value for better extensibility and readability

Location:
pjproject/branches/projects/2.0-dev/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/event.h

    r3640 r3642  
    4949     * Media format has changed event. 
    5050     */ 
    51     PJMEDIA_EVENT_FMT_CHANGED, 
     51    PJMEDIA_EVENT_FMT_CHANGED   = PJMEDIA_FOURCC('F', 'M', 'C', 'H'), 
    5252 
    5353    /** 
    5454     * Video window is being closed. 
    5555     */ 
    56     PJMEDIA_EVENT_WND_CLOSING, 
     56    PJMEDIA_EVENT_WND_CLOSING   = PJMEDIA_FOURCC('W', 'N', 'C', 'L'), 
    5757 
    5858    /** 
    5959     * Video window has been closed event. 
    6060     */ 
    61     PJMEDIA_EVENT_WND_CLOSED, 
     61    PJMEDIA_EVENT_WND_CLOSED    = PJMEDIA_FOURCC('W', 'N', 'C', 'O'), 
    6262 
    6363    /** 
    6464     * Video window has been resized event. 
    6565     */ 
    66     PJMEDIA_EVENT_WND_RESIZED, 
     66    PJMEDIA_EVENT_WND_RESIZED   = PJMEDIA_FOURCC('W', 'N', 'R', 'Z'), 
    6767 
    6868    /** 
    6969     * Mouse button has been pressed event. 
    7070     */ 
    71     PJMEDIA_EVENT_MOUSE_BTN_DOWN, 
     71    PJMEDIA_EVENT_MOUSE_BTN_DOWN = PJMEDIA_FOURCC('M', 'S', 'D', 'N'), 
    7272 
    7373    /** 
    7474     * Video key frame has just been decoded event. 
    7575     */ 
    76     PJMEDIA_EVENT_KEY_FRAME_FOUND, 
     76    PJMEDIA_EVENT_KEY_FRAME_FOUND = PJMEDIA_FOURCC('I', 'F', 'R', 'F'), 
    7777 
    7878    /** 
    7979     * Video decoding error due to missing key frame event. 
    8080     */ 
    81     PJMEDIA_EVENT_KEY_FRAME_MISSING, 
    82  
    83     /** 
    84      * Start of user event. 
    85      */ 
    86     PJMEDIA_EVENT_USER = 100 
     81    PJMEDIA_EVENT_KEY_FRAME_MISSING = PJMEDIA_FOURCC('I', 'F', 'R', 'M') 
    8782 
    8883} pjmedia_event_type; 
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/event.c

    r3640 r3642  
    9292{ 
    9393    pjmedia_event_subscription *esub; 
     94    char event_name[5]; 
     95    char epub_name[5]; 
    9496    pj_status_t err = PJ_SUCCESS; 
    9597 
    9698    PJ_ASSERT_RETURN(epub && event, PJ_EINVAL); 
    9799 
    98     TRACE_((THIS_FILE, "Event %d is published by publisher %x", 
    99                        event->type, epub)); 
     100    TRACE_((THIS_FILE, "Event %s is published by publisher %s", 
     101                       pjmedia_fourcc_name(event->type, event_name), 
     102                       pjmedia_fourcc_name(epub->sig, epub_name))); 
    100103 
    101104    esub = epub->subscription_list.next; 
Note: See TracChangeset for help on using the changeset viewer.