Changeset 3652
- Timestamp:
- Jul 15, 2011 6:18:29 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/pjsua/pjsua_app.c
r3638 r3652 3143 3143 } 3144 3144 3145 /* Callback on media events */ 3146 static void on_call_media_event(pjsua_call_id call_id, 3147 unsigned med_idx, 3148 pjmedia_event *event) 3149 { 3150 char event_name[5]; 3151 PJ_LOG(4,(THIS_FILE, "Event %s", 3152 pjmedia_fourcc_name(event->type, event_name))); 3153 } 3154 3145 3155 /* 3146 3156 * Print buddy list. … … 5101 5111 app_config.cfg.cb.on_ice_transport_error = &on_ice_transport_error; 5102 5112 app_config.cfg.cb.on_snd_dev_operation = &on_snd_dev_operation; 5113 app_config.cfg.cb.on_call_media_event = &on_call_media_event; 5103 5114 app_config.log_cfg.cb = log_cb; 5104 5115 -
pjproject/branches/projects/2.0-dev/pjsip/include/pjsua-lib/pjsua.h
r3638 r3652 1046 1046 pj_status_t (*on_snd_dev_operation)(int operation); 1047 1047 1048 /** 1049 * Notification about media events such as video notifications. This 1050 * callback will most likely be called from media threads, thus 1051 * application must not perform heavy processing in this callback. 1052 * Especially, application must not destroy the call or media in this 1053 * callback. If application needs to perform more complex tasks to 1054 * handle the event, it should post the task to another thread. 1055 * 1056 * @param call_id The call id. 1057 * @param med_idx The media stream index. 1058 * @param event The media event. 1059 */ 1060 void (*on_call_media_event)(pjsua_call_id call_id, 1061 unsigned med_idx, 1062 pjmedia_event *event); 1048 1063 1049 1064 } pjsua_callback; -
pjproject/branches/projects/2.0-dev/pjsip/include/pjsua-lib/pjsua_internal.h
r3634 r3652 99 99 address) */ 100 100 pjmedia_srtp_use rem_srtp_use; /**< Remote's SRTP usage policy. */ 101 102 pjmedia_event_subscription esub;/**< To subscribe to media events. */ 101 103 } pjsua_call_media; 102 104 … … 514 516 pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id); 515 517 518 pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, 519 pjmedia_type type, 520 const pjsua_transport_config *tcfg, 521 int security_level, 522 int *sip_err_code); 523 pj_status_t video_channel_update(pjsua_call_media *call_med, 524 pj_pool_t *tmp_pool, 525 const pjmedia_sdp_session *local_sdp, 526 const pjmedia_sdp_session *remote_sdp); 527 516 528 517 529 /** -
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_media.c
r3634 r3652 1313 1313 } 1314 1314 1315 /* Callback to receive media events */ 1316 static pj_status_t call_media_on_event(pjmedia_event_subscription *esub, 1317 pjmedia_event *event) 1318 { 1319 pjsua_call_media *call_med = (pjsua_call_media*)esub->user_data; 1320 pjsua_call *call = call_med->call; 1321 1322 if (pjsua_var.ua_cfg.cb.on_call_media_event && call) { 1323 ++event->proc_cnt; 1324 (*pjsua_var.ua_cfg.cb.on_call_media_event)(call->index, 1325 call_med->idx, event); 1326 } 1327 1328 return PJ_SUCCESS; 1329 } 1330 1315 1331 /* Initialize the media line */ 1316 1332 pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, … … 1410 1426 PJ_UNUSED_ARG(security_level); 1411 1427 #endif 1428 1429 pjmedia_event_subscription_init(&call_med->esub, &call_media_on_event, 1430 call_med); 1412 1431 1413 1432 return PJ_SUCCESS; … … 2170 2189 } 2171 2190 2172 2173 pj_status_t video_channel_update(pjsua_call_media *call_med,2174 pj_pool_t *tmp_pool,2175 const pjmedia_sdp_session *local_sdp,2176 const pjmedia_sdp_session *remote_sdp);2177 2178 2191 pj_status_t pjsua_media_channel_update(pjsua_call_id call_id, 2179 2192 const pjmedia_sdp_session *local_sdp, -
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_vid.c
r3639 r3652 631 631 if (status != PJ_SUCCESS) 632 632 return status; 633 634 /* Register to video events */ 635 pjmedia_event_subscribe( 636 pjmedia_vid_port_get_event_publisher(w->vp_rend), 637 &call_med->esub); 633 638 634 639 w = &pjsua_var.win[wid]; … … 1122 1127 } 1123 1128 1124 1125 pj_status_t pjsua_call_media_init(pjsua_call_media *call_med,1126 pjmedia_type type,1127 const pjsua_transport_config *tcfg,1128 int security_level,1129 int *sip_err_code);1130 1131 1132 1129 /* Add a new video stream into a call */ 1133 1130 static pj_status_t call_add_video(pjsua_call *call,
Note: See TracChangeset
for help on using the changeset viewer.