switch_channel_t *channel = switch_core_session_get_channel(session);
switch_status_t status;
switch_frame_t *read_frame;
+ switch_core_session_message_t msg = { 0 };
+
+
+ msg.from = __FILE__;
+ msg.message_id = SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ;
+
+ switch_core_session_receive_message(session, &msg);
eh->up = 1;
while (switch_channel_ready(channel)) {
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
+
+ if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
+ switch_core_session_receive_message(session, &msg);
+ switch_channel_clear_flag(channel, CF_VIDEO_REFRESH_REQ);
+ }
+
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
switch_status_t status;
switch_frame_t *read_frame;
switch_channel_t *channel = switch_core_session_get_channel(session);
+ int orig_vid = switch_channel_test_flag(channel, CF_VIDEO);
+
#ifdef SWITCH_VIDEO_IN_THREADS
struct echo_helper eh = { 0 };
switch_thread_t *thread;
if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
return;
}
+
+ restart:
+
#ifdef SWITCH_VIDEO_IN_THREADS
if (switch_channel_test_flag(channel, CF_VIDEO)) {
eh.session = session;
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
+
+ if (!orig_vid && switch_channel_test_flag(channel, CF_VIDEO)) {
+ orig_vid = 1;
+ goto restart;
+ }
+
switch_ivr_parse_all_events(session);