Changeset 3893 for pjproject/trunk/pjmedia/src/test/vid_codec_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_codec_test.c
r3776 r3893 48 48 } codec_port_data_t; 49 49 50 static pj_status_t codec_on_event(pjmedia_event _subscription *esub,51 pjmedia_event *event)52 { 53 codec_port_data_t *port_data = (codec_port_data_t*) esub->user_data;50 static pj_status_t codec_on_event(pjmedia_event *event, 51 void *user_data) 52 { 53 codec_port_data_t *port_data = (codec_port_data_t*)user_data; 54 54 55 55 if (event->type == PJMEDIA_EVENT_FMT_CHANGED) { … … 57 57 pjmedia_vid_codec_param codec_param; 58 58 pj_status_t status; 59 60 ++event->proc_cnt;61 59 62 60 status = pjmedia_vid_codec_get_param(codec, &codec_param); … … 201 199 pjmedia_vid_port_param vport_param; 202 200 pjmedia_video_format_detail *vfd; 203 pjmedia_event_subscription esub;204 201 char codec_name[5]; 205 202 pj_status_t status; … … 324 321 325 322 /* Subscribe to codec events */ 326 pjmedia_event_subscription_init(&esub, &codec_on_event, 327 &codec_port_data); 328 pjmedia_event_subscribe(&codec->epub, &esub); 323 pjmedia_event_subscribe(NULL, pool, &codec_on_event, &codec_port_data, 324 codec); 329 325 } 330 326 … … 431 427 } 432 428 if (codec) { 429 pjmedia_event_unsubscribe(NULL, &codec_on_event, &codec_port_data, 430 codec); 433 431 pjmedia_vid_codec_close(codec); 434 432 pjmedia_vid_codec_mgr_dealloc_codec(NULL, codec);
Note: See TracChangeset
for help on using the changeset viewer.