for (i = 0; i < smh->mparams->num_codecs; i++) {
if (smh->codecs[i]->codec_type == SWITCH_CODEC_TYPE_VIDEO) {
+ if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND &&
+ switch_channel_test_flag(session->channel, CF_NOVIDEO)) {
+ continue;
+ }
smh->video_count++;
}
}
for (i = 0; i < total_codecs; i++) {
const switch_codec_implementation_t *imp = codec_array[i];
- if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND &&
+ switch_channel_test_flag(session->channel, CF_NOVIDEO)) {
continue;
}
continue;
}
+ if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND &&
+ switch_channel_test_flag(session->channel, CF_NOVIDEO)) {
+ continue;
+ }
+
if (smh->ianacodes[i] < 128) {
if (already_did[smh->ianacodes[i]]) {
continue;
continue;
}
+ if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND &&
+ switch_channel_test_flag(session->channel, CF_NOVIDEO)) {
+ continue;
+ }
+
if (ianacode < 128) {
if (already_did[ianacode]) {
continue;
}
for (i = 0; i < num_codecs; i++) {
const switch_codec_implementation_t *imp = codecs[i];
+
if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO || imp->ianacode > 127 || already_did[imp->ianacode]) {
continue;
}
+
+ if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND &&
+ switch_channel_test_flag(session->channel, CF_NOVIDEO)) {
+ continue;
+ }
+
for (map = m->m_rtpmaps; map; map = map->rm_next) {
if (map->rm_pt > 127 || already_did[map->rm_pt]) {
continue;