]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
refactor
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 18 Jun 2013 11:24:17 +0000 (06:24 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 18 Jun 2013 11:24:17 +0000 (06:24 -0500)
src/switch_ivr_bridge.c

index b06566fb48a5c68643be341da07d11ca8af6f051..0e51910cd8077ed1264f8030ffc8ef1b8032299e 100644 (file)
@@ -55,7 +55,6 @@ static void *SWITCH_THREAD_FUNC video_bridge_thread(switch_thread_t *thread, voi
        switch_frame_t *read_frame;
        const char *source = switch_channel_get_variable(channel, "source");
        const char *b_source = switch_channel_get_variable(b_channel, "source");
-       switch_core_session_message_t msg = { 0 };
 
        vh->up = 1;
 
@@ -67,10 +66,8 @@ static void *SWITCH_THREAD_FUNC video_bridge_thread(switch_thread_t *thread, voi
                switch_channel_set_flag(b_channel, CF_VIDEO_PASSIVE);
        }
 
-       msg.from = __FILE__;
-       msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
-       switch_core_session_receive_message(vh->session_a, &msg);
-       switch_core_session_receive_message(vh->session_b, &msg);
+       switch_core_session_refresh_video(vh->session_a);
+       switch_core_session_refresh_video(vh->session_b);
 
        while (switch_channel_up_nosig(channel) && switch_channel_up_nosig(b_channel) && vh->up == 1) {
 
@@ -102,6 +99,9 @@ static void *SWITCH_THREAD_FUNC video_bridge_thread(switch_thread_t *thread, voi
        switch_core_session_kill_channel(vh->session_b, SWITCH_SIG_BREAK);
        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(vh->session_a), SWITCH_LOG_DEBUG, "%s video thread ended.\n", switch_channel_get_name(channel));
 
+       switch_core_session_refresh_video(vh->session_a);
+       switch_core_session_refresh_video(vh->session_b);
+
        switch_core_session_rwunlock(vh->session_a);
        switch_core_session_rwunlock(vh->session_b);