- Timestamp:
- Jul 12, 2011 3:05:35 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/aviplay.c
r3579 r3617 104 104 } codec_port_data_t; 105 105 106 static pj_status_t avi_event_cb(pjmedia_vid_dev_stream *stream, 107 void *user_data, 108 pjmedia_vid_event *event) 106 static pj_status_t avi_event_cb(pjmedia_event_subscription *esub, 107 pjmedia_event *event) 109 108 { 110 avi_port_t *ap = (avi_port_t *)user_data; 111 112 PJ_UNUSED_ARG(stream); 113 114 switch (event->event_type) { 115 case PJMEDIA_EVENT_WINDOW_CLOSE: 109 avi_port_t *ap = (avi_port_t *)esub->user_data; 110 111 switch (event->type) { 112 case PJMEDIA_EVENT_WND_CLOSED: 116 113 ap->is_quitting = PJ_TRUE; 117 114 break; 118 case PJMEDIA_EVENT_MOUSE BUTTONDOWN:115 case PJMEDIA_EVENT_MOUSE_BTN_DOWN: 119 116 if (ap->is_running) { 120 117 pjmedia_vid_port_stop(ap->vid_port); … … 191 188 pjmedia_port *vid_port = NULL, *aud_port = NULL; 192 189 pjmedia_vid_codec *codec=NULL; 190 pjmedia_event_subscription esub; 193 191 avi_port_t avi_port; 194 192 … … 395 393 396 394 pj_bzero(&cb, sizeof(cb)); 397 cb.on_event_cb = avi_event_cb;398 395 avi_port.snd_port = snd_port; 399 396 avi_port.vid_port = renderer; 400 397 avi_port.is_running = PJ_TRUE; 401 398 pjmedia_vid_port_set_cb(renderer, &cb, &avi_port); 399 400 /* subscribe events */ 401 pjmedia_event_subscription_init(&esub, &avi_event_cb, &avi_port); 402 pjmedia_event_subscribe( 403 pjmedia_vid_port_get_event_publisher(renderer), 404 &esub); 402 405 403 406 if (snd_port) {
Note: See TracChangeset
for help on using the changeset viewer.