Changeset 3893 for pjproject/trunk/pjmedia/src/test/vid_port_test.c
- Timestamp:
- Dec 1, 2011 10:49:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/test/vid_port_test.c
r3715 r3893 33 33 static pj_bool_t is_quitting = PJ_FALSE; 34 34 35 static pj_status_t vid_event_cb(pjmedia_event _subscription *esub,36 pjmedia_event *event)37 { 38 PJ_UNUSED_ARG( esub);35 static pj_status_t vid_event_cb(pjmedia_event *event, 36 void *user_data) 37 { 38 PJ_UNUSED_ARG(user_data); 39 39 40 40 if (event->type == PJMEDIA_EVENT_WND_CLOSED) … … 53 53 pjmedia_vid_port_param param; 54 54 pjmedia_video_format_detail *vfd; 55 pjmedia_event_subscription esub;56 55 pj_status_t status; 57 56 int rc = 0, i; … … 119 118 120 119 /* Set event handler */ 121 pjmedia_event_subscription_init(&esub, &vid_event_cb, NULL); 122 pjmedia_event_subscribe( 123 pjmedia_vid_port_get_event_publisher(renderer), 124 &esub); 120 pjmedia_event_subscribe(NULL, pool, &vid_event_cb, NULL, renderer); 125 121 126 122 /* Connect capture to renderer */ … … 154 150 if (capture) 155 151 pjmedia_vid_port_destroy(capture); 156 if (renderer) 152 if (renderer) { 153 pjmedia_event_unsubscribe(NULL, &vid_event_cb, NULL, renderer); 157 154 pjmedia_vid_port_destroy(renderer); 155 } 158 156 159 157 pj_pool_release(pool);
Note: See TracChangeset
for help on using the changeset viewer.