Changeset 3893 for pjproject/trunk/pjmedia/src/test/vid_dev_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_dev_test.c
r3715 r3893 77 77 } 78 78 79 static pj_status_t vid_event_cb(pjmedia_event _subscription *esub,80 pjmedia_event *event)81 { 82 PJ_UNUSED_ARG( esub);79 static pj_status_t vid_event_cb(pjmedia_event *event, 80 void *user_data) 81 { 82 PJ_UNUSED_ARG(user_data); 83 83 84 84 if (event->type == PJMEDIA_EVENT_WND_CLOSED) … … 96 96 pjmedia_vid_port_param param; 97 97 pjmedia_video_format_detail *vfd; 98 pjmedia_event_subscription esub;99 98 pj_status_t status; 100 99 int rc = 0, i; … … 162 161 163 162 /* 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); 168 164 169 165 /* Connect capture to renderer */ … … 197 193 if (capture) 198 194 pjmedia_vid_port_destroy(capture); 199 if (renderer) 195 if (renderer) { 196 pjmedia_event_unsubscribe(NULL, &vid_event_cb, NULL, renderer); 200 197 pjmedia_vid_port_destroy(renderer); 198 } 201 199 202 200 pj_pool_release(pool);
Note: See TracChangeset
for help on using the changeset viewer.