- Timestamp:
- Jul 12, 2011 3:05:35 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test.c
r3579 r3617 73 73 } 74 74 75 static pj_status_t vid_event_cb(pjmedia_vid_dev_stream *stream, 76 void *user_data, 77 pjmedia_vid_event *event) 78 { 79 PJ_UNUSED_ARG(stream); 80 PJ_UNUSED_ARG(user_data); 81 82 if (event->event_type == PJMEDIA_EVENT_WINDOW_CLOSE) 75 static pj_status_t vid_event_cb(pjmedia_event_subscription *esub, 76 pjmedia_event *event) 77 { 78 if (event->type == PJMEDIA_EVENT_WND_CLOSED) 83 79 is_quitting = PJ_TRUE; 84 80 … … 95 91 pjmedia_video_format_detail *vfd; 96 92 pjmedia_vid_cb cb; 93 pjmedia_event_subscription esub; 97 94 pj_status_t status; 98 95 int rc = 0, i; … … 160 157 161 158 /* Set event handler */ 162 pj_bzero(&cb, sizeof(cb)); 163 cb.on_event_cb = vid_event_cb; 164 pjmedia_vid_port_set_cb(renderer, &cb, NULL); 159 pjmedia_event_subscription_init(&esub, &vid_event_cb, NULL); 160 pjmedia_event_subscribe( 161 pjmedia_vid_port_get_event_publisher(renderer), 162 &esub); 165 163 166 164 /* Connect capture to renderer */
Note: See TracChangeset
for help on using the changeset viewer.