FS-7500: reduce CNG frames on video and move debug from mod_fsv to the core with a flag to enable it since the raw packet is not available anymore when you set DECODED READ flag

This commit is contained in:
Anthony Minessale authored and Michael Jerris committed 2015-05-28 12:46:47 -05:00
1 parent 140a1c9661
commit b8ba1a1469
6 files changed
+28 -19

No files matched your search

+13 -1
View File
@@ -1849,7 +1849,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_read_frame(switch_core_session
switch_channel_execute_on(session->channel, "execute_on_media_timeout");
switch_goto_status(SWITCH_STATUS_SUCCESS, end);
}
switch_channel_hangup(session->channel, SWITCH_CAUSE_MEDIA_TIMEOUT);
}
@@ -9686,6 +9686,18 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
if (!(*frame)) {
goto done;
}
if (switch_channel_test_flag(session->channel, CF_VIDEO_DEBUG_READ)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "seq: %d ts: %ld len: %4d %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x mark: %d %s\n",
(*frame)->seq, (*frame)->timestamp, (*frame)->datalen,
*((uint8_t *)(*frame)->data), *((uint8_t *)(*frame)->data + 1),
*((uint8_t *)(*frame)->data + 2), *((uint8_t *)(*frame)->data + 3),
*((uint8_t *)(*frame)->data + 4), *((uint8_t *)(*frame)->data + 5),
*((uint8_t *)(*frame)->data + 6), *((uint8_t *)(*frame)->data + 7),
*((uint8_t *)(*frame)->data + 8), *((uint8_t *)(*frame)->data + 9),
*((uint8_t *)(*frame)->data + 10), (*frame)->m, switch_test_flag((*frame), SFF_CNG) ? " CNG" : "");
}
if (switch_test_flag(*frame, SFF_CNG)) {
status = SWITCH_STATUS_SUCCESS;