Ignore:
Timestamp:
Dec 1, 2011 10:49:07 AM (13 years ago)
Author:
ming
Message:

Closed #1420: Add support for event manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/test/vid_dev_test.c

    r3715 r3893  
    7777} 
    7878 
    79 static pj_status_t vid_event_cb(pjmedia_event_subscription *esub, 
    80                                 pjmedia_event *event) 
    81 { 
    82     PJ_UNUSED_ARG(esub); 
     79static pj_status_t vid_event_cb(pjmedia_event *event, 
     80                                void *user_data) 
     81{ 
     82    PJ_UNUSED_ARG(user_data); 
    8383 
    8484    if (event->type == PJMEDIA_EVENT_WND_CLOSED) 
     
    9696    pjmedia_vid_port_param param; 
    9797    pjmedia_video_format_detail *vfd; 
    98     pjmedia_event_subscription esub; 
    9998    pj_status_t status; 
    10099    int rc = 0, i; 
     
    162161 
    163162    /* Set event handler */ 
    164     pjmedia_event_subscription_init(&esub, &vid_event_cb, NULL); 
    165     pjmedia_event_subscribe( 
    166             pjmedia_vid_port_get_event_publisher(renderer), 
    167             &esub); 
     163    pjmedia_event_subscribe(NULL, pool, &vid_event_cb, NULL, renderer); 
    168164 
    169165    /* Connect capture to renderer */ 
     
    197193    if (capture) 
    198194        pjmedia_vid_port_destroy(capture); 
    199     if (renderer) 
     195    if (renderer) { 
     196        pjmedia_event_unsubscribe(NULL, &vid_event_cb, NULL, renderer); 
    200197        pjmedia_vid_port_destroy(renderer); 
     198    } 
    201199 
    202200    pj_pool_release(pool); 
Note: See TracChangeset for help on using the changeset viewer.