bytes = read_impl.decoded_bytes_per_packet;
-#ifdef TESTINGONLY
- if (0 && bug->session->recur_buffer_len) {
- frame->datalen = bug->session->recur_buffer_len;
- frame->samples = bug->session->recur_buffer_len / sizeof(int16_t);
- frame->rate = read_impl.actual_samples_per_second;
- frame->codec = NULL;
- memcpy(frame->data, bug->session->recur_buffer, bug->session->recur_buffer_len);
- return SWITCH_STATUS_SUCCESS;
- }
-#endif
-
-
if (frame->buflen < bytes) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(bug)), SWITCH_LOG_ERROR, "%s frame buffer too small!\n",
switch_channel_get_name(bug->session->channel));
}
if (!bug->record_frame_size) {
- if (do_read && do_write) {
- switch_size_t frame_size;
- switch_codec_implementation_t read_impl = { 0 };
- switch_codec_implementation_t other_read_impl = { 0 };
- switch_core_session_t *other_session;
-
- switch_core_session_get_read_impl(bug->session, &read_impl);
- frame_size = read_impl.decoded_bytes_per_packet;
+ switch_size_t frame_size;
+ switch_codec_implementation_t read_impl = { 0 };
+ //switch_codec_implementation_t other_read_impl = { 0 };
+ //switch_core_session_t *other_session;
+ switch_core_session_get_read_impl(bug->session, &read_impl);
+ frame_size = read_impl.decoded_bytes_per_packet;
+ bug->record_frame_size = frame_size;
+#if 0
+ if (do_read && do_write) {
if (switch_core_session_get_partner(bug->session, &other_session) == SWITCH_STATUS_SUCCESS) {
switch_core_session_get_read_impl(other_session, &other_read_impl);
switch_core_session_rwunlock(other_session);
bug->record_frame_size = frame_size;
}
+#endif
}