mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-15 19:40:06 +00:00
FS-5840 --resolve
This commit is contained in:
parent
489053beb9
commit
96b66ad015
@ -1204,6 +1204,13 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
|
|||||||
switch_channel_set_variable(channel, "RECORD_DISCARDED", "true");
|
switch_channel_set_variable(channel, "RECORD_DISCARDED", "true");
|
||||||
switch_file_remove(rh->file, switch_core_session_get_pool(session));
|
switch_file_remove(rh->file, switch_core_session_get_pool(session));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (read_impl.actual_samples_per_second) {
|
||||||
|
switch_channel_set_variable_printf(channel, "record_seconds", "%d", rh->fh->samples_out / read_impl.actual_samples_per_second);
|
||||||
|
switch_channel_set_variable_printf(channel, "record_ms", "%d", rh->fh->samples_out / (read_impl.actual_samples_per_second / 1000));
|
||||||
|
}
|
||||||
|
switch_channel_set_variable_printf(channel, "record_samples", "%d", rh->fh->samples_out);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_event_create(&event, SWITCH_EVENT_RECORD_STOP) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create(&event, SWITCH_EVENT_RECORD_STOP) == SWITCH_STATUS_SUCCESS) {
|
||||||
@ -1212,12 +1219,6 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
|
|||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read_impl.actual_samples_per_second) {
|
|
||||||
switch_channel_set_variable_printf(channel, "record_seconds", "%d", rh->fh->samples_out / read_impl.actual_samples_per_second);
|
|
||||||
switch_channel_set_variable_printf(channel, "record_ms", "%d", rh->fh->samples_out / (read_impl.actual_samples_per_second / 1000));
|
|
||||||
}
|
|
||||||
switch_channel_set_variable_printf(channel, "record_samples", "%d", rh->fh->samples_out);
|
|
||||||
|
|
||||||
switch_channel_execute_on(channel, SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE);
|
switch_channel_execute_on(channel, SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE);
|
||||||
|
|
||||||
if ((var = switch_channel_get_variable(channel, SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE))) {
|
if ((var = switch_channel_get_variable(channel, SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user