char *target;
switch_codec_implementation_t read_impl;
switch_codec_implementation_t write_impl;
- switch_timer_t timer;
uint32_t record_frame_size;
switch_frame_t *ping_frame;
struct switch_media_bug *next;
switch_buffer_destroy(&bug->raw_write_buffer);
}
- if (bug->timer.timer_interface) {
- switch_core_timer_destroy(&bug->timer);
- }
-
if (switch_event_create(&event, SWITCH_EVENT_MEDIA_BUG_STOP) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Media-Bug-Function", "%s", bug->function);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Media-Bug-Target", "%s", bug->target);
switch_mutex_init(&bug->write_mutex, SWITCH_MUTEX_NESTED, session->pool);
}
- if (switch_test_flag(bug, SMBF_READ_STREAM) || switch_test_flag(bug, SMBF_WRITE_STREAM)) {
- switch_core_timer_init(&bug->timer, "soft", bug->read_impl.microseconds_per_packet / 1000, bug->read_impl.samples_per_packet,
- switch_core_session_get_pool(session));
- }
-
if ((bug->flags & SMBF_THREAD_LOCK)) {
bug->thread_id = switch_thread_self();
}