|
@@ -206,7 +206,7 @@ static __inline struct in_addr __lton(unsigned long ip)
|
|
|
return addr;
|
|
|
}
|
|
|
|
|
|
-static void endpoint_media_update_video(endpoint_call_t *call, media_desc_t *video_desc)
|
|
|
+static void endpoint_media_update_video(endpoint_call_t *call, media_desc_t *video_desc, rvc_video_render_callback_t* cb)
|
|
|
{
|
|
|
LOG_FUNCTION();
|
|
|
if (video_desc->media_dir == DIR_NONE)
|
|
@@ -313,7 +313,8 @@ static void endpoint_media_update_video(endpoint_call_t *call, media_desc_t *vid
|
|
|
video_conf.nCallType = call->nCallType;
|
|
|
//video_conf.local_move = local_hwd_move;
|
|
|
//video_conf.remote_move = remote_hwd_move;
|
|
|
- //video_conf.video_echo_cb = cb;
|
|
|
+ Dbg("%s:%d video_render_cb = 0x%08x and video_render_cb->on_video_render = 0x%08x, video_render_cb->user_data = 0x%08x.", __FUNCTION__, __LINE__, cb, cb->on_video_render, cb->user_data);
|
|
|
+ memcpy(&video_conf.video_render_cb, cb, sizeof(rvc_video_render_callback_t));
|
|
|
video_conf.ilocal_wind_flags = VIDEOPLAYER_FLAG_PULL|VIDEOPLAYER_FLAG_CHECKTOP;
|
|
|
video_conf.iremote_wind_flags = VIDEOPLAYER_FLAG_PUSH|VIDEOPLAYER_FLAG_CHECKTOP;
|
|
|
//video_conf.ilvideo_ft = local_fresh_time;
|
|
@@ -1040,7 +1041,7 @@ static void on_state(CONDITION_PARAMS)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Terminatedcall(endpoint_call_t *call)
|
|
|
+void terminatedcall(endpoint_call_t *call)
|
|
|
{
|
|
|
int st = TERMINATED;
|
|
|
g_IsExternalTerminalted = TRUE;
|
|
@@ -1506,14 +1507,14 @@ int endpoint_call_hangup(endpoint_call_t *call)
|
|
|
}
|
|
|
|
|
|
|
|
|
-int endpoint_call_start_video(endpoint_call_t* call, endpoint_call_param_t* pcallparam)
|
|
|
+int endpoint_call_start_video(endpoint_call_t* call, endpoint_call_param_t* pcallparam, rvc_video_render_callback_t* render_cb)
|
|
|
{
|
|
|
- char local_ip_str[128]={0};
|
|
|
- char remtote_ip_str[128]={0};
|
|
|
LOG_FUNCTION();
|
|
|
-
|
|
|
- translate_ipaddr_from_int(local_ip_str, 128, pcallparam->local_ip);
|
|
|
- translate_ipaddr_from_int(remtote_ip_str, 128, pcallparam->remote_ip);
|
|
|
+ char local_ip_str[RVC_MAX_IP_LEN]={0};
|
|
|
+ char remtote_ip_str[RVC_MAX_IP_LEN]={0};
|
|
|
+
|
|
|
+ translate_ipaddr_from_int(local_ip_str, RVC_MAX_IP_LEN, pcallparam->local_ip);
|
|
|
+ translate_ipaddr_from_int(remtote_ip_str, RVC_MAX_IP_LEN, pcallparam->remote_ip);
|
|
|
|
|
|
Dbg("Assist channel video local: %s:%d, remote_ip:%s:%d", local_ip_str, pcallparam->local_port, remtote_ip_str, pcallparam->remote_port);
|
|
|
if (call)
|
|
@@ -1552,7 +1553,8 @@ int endpoint_call_start_video(endpoint_call_t* call, endpoint_call_param_t* pcal
|
|
|
//video_desc.param[i++] = pcallparam->remote_hwd_move;
|
|
|
//video_desc.param[i++] = pcallparam->local_fresh_time;
|
|
|
//video_desc.param[i++] = pcallparam->remote_fresh_time;
|
|
|
- endpoint_media_update_video(call, &video_desc);
|
|
|
+ Dbg("%s:%d video_render_cb = 0x%08x and video_render_cb->on_video_render = 0x%08x, video_render_cb->user_data = 0x%08x.", __FUNCTION__, __LINE__, render_cb, render_cb->on_video_render, render_cb->user_data);
|
|
|
+ endpoint_media_update_video(call, &video_desc, render_cb);
|
|
|
|
|
|
char str_local_ip[RVC_MAX_IP_LEN]={0};
|
|
|
char str_remtote_ip[RVC_MAX_IP_LEN]={0};
|
|
@@ -1576,7 +1578,7 @@ int endpoint_call_stop_video(endpoint_call_t *call)
|
|
|
if (call) {
|
|
|
media_desc_t video_desc = {0};
|
|
|
video_desc.media_dir = DIR_NONE;
|
|
|
- endpoint_media_update_video(call, &video_desc);
|
|
|
+ endpoint_media_update_video(call, &video_desc, NULL);
|
|
|
return 0;
|
|
|
} else {
|
|
|
return Error_Param;
|