switch_core_media_choose_port(session, SWITCH_MEDIA_TYPE_VIDEO, 1);
clear_pmaps(v_engine);
pmap = switch_core_media_add_payload_map(session,
- SWITCH_MEDIA_TYPE_AUDIO,
+ SWITCH_MEDIA_TYPE_VIDEO,
"PROXY-VID",
NULL,
NULL,
v_engine->cur_payload_map = pmap;
switch_snprintf(vport_buf, sizeof(vport_buf), "%u", v_engine->adv_sdp_port);
+
if (switch_channel_media_ready(session->channel) && !switch_rtp_ready(v_engine->rtp_session)) {
switch_channel_set_flag(session->channel, CF_VIDEO_POSSIBLE);
switch_channel_set_flag(session->channel, CF_REINVITE);
switch_core_media_activate_rtp(session);
}
+
+ v_engine->codec_negotiated = 1;
+ switch_core_media_set_video_codec(session, SWITCH_FALSE);
}
strncpy(q, p, 8);
switch_codec_t *b_codec = switch_core_session_get_video_write_codec(vh->session_b);
switch_file_handle_t *fh;
- switch_assert(a_codec);
- switch_assert(b_codec);
-
if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
refresh_timer = refresh_cnt;
}
- if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
- if (a_codec->implementation->impl_id == b_codec->implementation->impl_id && !switch_channel_test_flag(b_channel, CF_VIDEO_DECODED_READ)) {
- if (set_decoded_read) {
- switch_channel_clear_flag_recursive(channel, CF_VIDEO_DECODED_READ);
- set_decoded_read = 0;
+ if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
+ switch_assert(a_codec);
+ switch_assert(b_codec);
+
+ if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
+ if (a_codec->implementation->impl_id == b_codec->implementation->impl_id && !switch_channel_test_flag(b_channel, CF_VIDEO_DECODED_READ)) {
+ if (set_decoded_read) {
+ switch_channel_clear_flag_recursive(channel, CF_VIDEO_DECODED_READ);
+ set_decoded_read = 0;
+ refresh_timer = refresh_cnt;
+ }
+ }
+ } else {
+ if (a_codec->implementation->impl_id != b_codec->implementation->impl_id ||
+ switch_channel_test_flag(b_channel, CF_VIDEO_DECODED_READ)) {
+ switch_channel_set_flag_recursive(channel, CF_VIDEO_DECODED_READ);
+ set_decoded_read = 1;
refresh_timer = refresh_cnt;
}
}
- } else {
- if (a_codec->implementation->impl_id != b_codec->implementation->impl_id ||
- switch_channel_test_flag(b_channel, CF_VIDEO_DECODED_READ)) {
- switch_channel_set_flag_recursive(channel, CF_VIDEO_DECODED_READ);
- set_decoded_read = 1;
- refresh_timer = refresh_cnt;
- }
}
if (refresh_timer) {