int yield = 0;
uint32_t last_member = 0;
switch_core_session_t *session;
- switch_channel_t *channel;
switch_core_session_message_t msg = { 0 };
conference->video_running = 1;
goto do_continue;
}
- channel = NULL;
session = conference->floor_holder->session;
switch_core_session_read_lock(session);
switch_mutex_unlock(conference->member_mutex);
goto do_continue;
}
- channel = switch_core_session_get_channel(session);
-
if (conference->floor_holder->id != last_member) {
int iframe = 0;
if (imember->session && switch_channel_test_flag(ichannel, CF_VIDEO)) {
has_vid++;
- if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
- switch_core_session_receive_message(imember->session, &msg);
- }
switch_core_session_write_video_frame(imember->session, vid_frame, SWITCH_IO_FLAG_NONE, 0);
}
}
- if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
- switch_channel_clear_flag(channel, CF_VIDEO_REFRESH_REQ);
- }
-
if (want_refresh) {
switch_core_session_receive_message(session, &msg);
want_refresh = 0;
if (!strncasecmp(sip->sip_content_type->c_type, "application", 11) && !strcasecmp(sip->sip_content_type->c_subtype, "media_control+xml")) {
switch_core_session_t *other_session;
- switch_channel_set_flag(channel, CF_VIDEO_REFRESH_REQ);
-
- if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
- sofia_glue_build_vid_refresh_message(other_session, sip->sip_payload->pl_data);
- switch_core_session_rwunlock(other_session);
+ if (switch_channel_test_flag(channel, CF_VIDEO)) {
+ if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
+ sofia_glue_build_vid_refresh_message(other_session, sip->sip_payload->pl_data);
+ switch_core_session_rwunlock(other_session);
+ } else {
+ switch_channel_set_flag(channel, CF_VIDEO_REFRESH_REQ);
+ }
}
} else if (!strncasecmp(sip->sip_content_type->c_type, "application", 11) && !strcasecmp(sip->sip_content_type->c_subtype, "dtmf-relay")) {