FS-7500: refactoring

This commit is contained in:
Anthony Minessale
2014-12-03 20:34:49 -06:00
committed by Michael Jerris
parent 3584da00d0
commit 970064294c
16 changed files with 57 additions and 43 deletions
+1 -1
View File
@@ -710,7 +710,6 @@ static switch_status_t switch_h264_decode(switch_codec_t *codec, switch_frame_t
context->img->stride[2] = picture->linesize[2];
frame->img = context->img;
}
av_frame_free(&picture);
@@ -718,6 +717,7 @@ static switch_status_t switch_h264_decode(switch_codec_t *codec, switch_frame_t
}
switch_buffer_zero(context->nalu_buffer);
//switch_set_flag(frame, SFF_USE_VIDEO_TIMESTAMP);
return SWITCH_STATUS_SUCCESS;
}
@@ -2880,7 +2880,7 @@ static void *SWITCH_THREAD_FUNC conference_video_bridge_thread_run(switch_thread
switch_channel_ready(channel_a) && switch_channel_ready(channel_b)) {
if (switch_channel_test_flag(channel_a, CF_VIDEO_REFRESH_REQ)) {
switch_core_session_video_reinit(session_b);
switch_core_session_request_video_refresh(session_b);
switch_channel_clear_flag(channel_a, CF_VIDEO_REFRESH_REQ);
}
@@ -2985,8 +2985,8 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
goto do_continue;
}
//memcpy(buf, vid_frame->packet, vid_frame->packetlen);
//memcpy(buf, vid_frame->packet, vid_frame->packelen);
switch_mutex_unlock(conference->mutex);
switch_mutex_lock(conference->mutex);
want_refresh = 0;
@@ -3036,7 +3036,7 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
switch_mutex_unlock(conference->mutex);
if (want_refresh && session) {
switch_core_session_video_reinit(session);
switch_core_session_request_video_refresh(session);
want_refresh = 0;
}
+3 -3
View File
@@ -111,7 +111,7 @@ SWITCH_STANDARD_APP(record_fsv_function)
switch_core_session_get_read_impl(session, &read_impl);
switch_channel_answer(channel);
switch_core_session_refresh_video(session);
switch_core_session_request_video_refresh(session);
switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "");
@@ -283,7 +283,7 @@ SWITCH_STANDARD_APP(play_fsv_function)
switch_frame_t *read_frame;
switch_codec_implementation_t read_impl = { 0 };
switch_core_session_refresh_video(session);
switch_core_session_request_video_refresh(session);
switch_core_session_get_read_impl(session, &read_impl);
@@ -758,7 +758,7 @@ SWITCH_STANDARD_APP(decode_video_function)
}
switch_channel_answer(channel);
switch_core_session_refresh_video(session);
switch_core_session_request_video_refresh(session);
switch_core_media_start_video_function(session, decode_video_thread, &max_pictures);
switch_ivr_play_file(session, NULL, moh, NULL);
+1 -1
View File
@@ -550,7 +550,7 @@ static switch_status_t switch_h264_decode(switch_codec_t *codec, switch_frame_t
switch_goto_status(SWITCH_STATUS_RESTART, end);
}
}
//switch_set_flag(frame, SFF_USE_VIDEO_TIMESTAMP);
switch_buffer_zero(context->nalu_buffer);
status = SWITCH_STATUS_SUCCESS;
}
+1 -1
View File
@@ -2188,7 +2188,7 @@ static switch_status_t verto_on_init(switch_core_session_t *session)
switch_yield(10000);
}
switch_core_session_refresh_video(session);
switch_core_session_request_video_refresh(session);
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO_BREAK);
switch_core_session_kill_channel(tech_pvt->session, SWITCH_SIG_BREAK);
@@ -15885,13 +15885,13 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_cert_verify(void * jarg1) {
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_refresh_video(void * jarg1) {
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_request_video_refresh(void * jarg1) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
result = (switch_status_t)switch_core_session_refresh_video(arg1);
result = (switch_status_t)switch_core_session_request_video_refresh(arg1);
jresult = result;
return jresult;
}
@@ -3164,8 +3164,8 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_core_session_refresh_video(SWIGTYPE_p_switch_core_session session) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_refresh_video(SWIGTYPE_p_switch_core_session.getCPtr(session));
public static switch_status_t switch_core_session_request_video_refresh(SWIGTYPE_p_switch_core_session session) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_request_video_refresh(SWIGTYPE_p_switch_core_session.getCPtr(session));
return ret;
}
@@ -11303,8 +11303,8 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_cert_verify")]
public static extern int switch_core_cert_verify(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_refresh_video")]
public static extern int switch_core_session_refresh_video(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_request_video_refresh")]
public static extern int switch_core_session_request_video_refresh(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_stream_system_fork")]
public static extern int switch_stream_system_fork(string jarg1, HandleRef jarg2);