Changeset 3893 for pjproject/trunk/pjsip-apps/src/samples/aviplay.c
- Timestamp:
- Dec 1, 2011 10:49:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/aviplay.c
r3776 r3893 106 106 } codec_port_data_t; 107 107 108 static pj_status_t avi_event_cb(pjmedia_event _subscription *esub,109 pjmedia_event *event)110 { 111 avi_port_t *ap = (avi_port_t *) esub->user_data;108 static pj_status_t avi_event_cb(pjmedia_event *event, 109 void *user_data) 110 { 111 avi_port_t *ap = (avi_port_t *)user_data; 112 112 113 113 switch (event->type) { … … 192 192 pjmedia_port *vid_port = NULL, *aud_port = NULL; 193 193 pjmedia_vid_codec *codec=NULL; 194 pjmedia_event_subscription esub;195 194 avi_port_t avi_port; 196 195 … … 403 402 404 403 /* subscribe events */ 405 pjmedia_event_subscription_init(&esub, &avi_event_cb, &avi_port); 406 pjmedia_event_subscribe( 407 pjmedia_vid_port_get_event_publisher(renderer), 408 &esub); 404 pjmedia_event_subscribe(NULL, pool, &avi_event_cb, &avi_port, 405 renderer); 409 406 410 407 if (snd_port) { … … 437 434 pjmedia_snd_port_destroy(snd_port); 438 435 } 439 if (renderer) 436 if (renderer) { 437 pjmedia_event_unsubscribe(NULL, &avi_event_cb, &avi_port, 438 renderer); 440 439 pjmedia_vid_port_destroy(renderer); 440 } 441 441 if (aud_port) 442 442 pjmedia_port_destroy(aud_port); … … 483 483 pjmedia_video_format_mgr_create(pool, 64, 0, NULL); 484 484 pjmedia_converter_mgr_create(pool, NULL); 485 pjmedia_event_mgr_create(pool, 0, NULL); 485 486 pjmedia_vid_codec_mgr_create(pool, NULL); 486 487 … … 520 521 pjmedia_video_format_mgr_destroy(pjmedia_video_format_mgr_instance()); 521 522 pjmedia_converter_mgr_destroy(pjmedia_converter_mgr_instance()); 523 pjmedia_event_mgr_destroy(pjmedia_event_mgr_instance()); 522 524 pjmedia_vid_codec_mgr_destroy(pjmedia_vid_codec_mgr_instance()); 523 525
Note: See TracChangeset
for help on using the changeset viewer.