FS-5127 --resolve

This commit is contained in:
Anthony Minessale 2013-02-26 11:05:44 -06:00
parent babeca40dd
commit 9c00466dae
3 changed files with 28 additions and 8 deletions

View File

@ -1480,7 +1480,8 @@ SMBF_WRITE_STREAM - Include the Write Stream
SMBF_WRITE_REPLACE - Replace the Write Stream
SMBF_READ_REPLACE - Replace the Read Stream
SMBF_STEREO - Record in stereo
SMBF_ANSWER_RECORD_REQ - Don't record until the channel is answered
SMBF_ANSWER_REQ - Don't record until the channel is answered
SMBF_BRIDGE_REQ - Don't record until the channel is bridged
SMBF_THREAD_LOCK - Only let the same thread who created the bug remove it.
SMBF_PRUNE -
SMBF_NO_PAUSE -
@ -1496,13 +1497,14 @@ typedef enum {
SMBF_READ_PING = (1 << 4),
SMBF_STEREO = (1 << 5),
SMBF_ANSWER_REQ = (1 << 6),
SMBF_THREAD_LOCK = (1 << 7),
SMBF_PRUNE = (1 << 8),
SMBF_NO_PAUSE = (1 << 9),
SMBF_STEREO_SWAP = (1 << 10),
SMBF_LOCK = (1 << 11),
SMBF_TAP_NATIVE_READ = (1 << 12),
SMBF_TAP_NATIVE_WRITE = (1 << 13)
SMBF_BRIDGE_REQ = (1 << 7),
SMBF_THREAD_LOCK = (1 << 8),
SMBF_PRUNE = (1 << 9),
SMBF_NO_PAUSE = (1 << 10),
SMBF_STEREO_SWAP = (1 << 11),
SMBF_LOCK = (1 << 12),
SMBF_TAP_NATIVE_READ = (1 << 13),
SMBF_TAP_NATIVE_WRITE = (1 << 14)
} switch_media_bug_flag_enum_t;
typedef uint32_t switch_media_bug_flag_t;

View File

@ -551,6 +551,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
if (!switch_channel_test_flag(session->channel, CF_ANSWERED) && switch_core_media_bug_test_flag(bp, SMBF_ANSWER_REQ)) {
continue;
}
if (!switch_channel_test_flag(session->channel, CF_BRIDGED) && switch_core_media_bug_test_flag(bp, SMBF_BRIDGE_REQ)) {
continue;
}
if (switch_test_flag(bp, SMBF_PRUNE)) {
prune++;
continue;
@ -595,6 +600,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
if (!switch_channel_test_flag(session->channel, CF_ANSWERED) && switch_core_media_bug_test_flag(bp, SMBF_ANSWER_REQ)) {
continue;
}
if (!switch_channel_test_flag(session->channel, CF_BRIDGED) && switch_core_media_bug_test_flag(bp, SMBF_BRIDGE_REQ)) {
continue;
}
if (switch_test_flag(bp, SMBF_PRUNE)) {
prune++;
continue;
@ -757,6 +767,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
continue;
}
if (!switch_channel_test_flag(session->channel, CF_BRIDGED) && switch_core_media_bug_test_flag(bp, SMBF_BRIDGE_REQ)) {
continue;
}
if (switch_test_flag(bp, SMBF_PRUNE)) {
prune++;
continue;

View File

@ -1845,6 +1845,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t
flags |= SMBF_ANSWER_REQ;
}
if ((p = switch_channel_get_variable(channel, "RECORD_BRIDGE_REQ")) && switch_true(p)) {
flags |= SMBF_BRIDGE_REQ;
}
if ((p = switch_channel_get_variable(channel, "RECORD_APPEND")) && switch_true(p)) {
file_flags |= SWITCH_FILE_WRITE_APPEND;
}