add function to help set session read codec to slinear

This commit is contained in:
Anthony Minessale
2011-01-06 17:41:17 -06:00
parent 85c22d10e2
commit 1a08df9b20
4 changed files with 44 additions and 1 deletions
+8
View File
@@ -711,6 +711,14 @@ struct switch_api_interface {
#define PROTECT_INTERFACE(_it) if (_it) {switch_mutex_lock(_it->reflock); switch_thread_rwlock_rdlock(_it->parent->rwlock); switch_thread_rwlock_rdlock(_it->rwlock); _it->refs++; _it->parent->refs++; switch_mutex_unlock(_it->reflock);} //if (!strcmp(_it->interface_name, "user")) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "+++++++++++LOCK %s %d/%d\n", _it->interface_name, _it->refs, _it->parent->refs);
#define UNPROTECT_INTERFACE(_it) if (_it) {switch_mutex_lock(_it->reflock); switch_thread_rwlock_unlock(_it->rwlock); switch_thread_rwlock_unlock(_it->parent->rwlock); _it->refs--; _it->parent->refs--; switch_mutex_unlock(_it->reflock);} //if (!strcmp(_it->interface_name, "user")) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "---------UNLOCK %s %d/%d\n", _it->interface_name, _it->refs, _it->parent->refs);
#include "switch_frame.h"
struct switch_slin_data {
switch_core_session_t *session;
switch_frame_t write_frame;
switch_codec_t codec;
char frame_data[SWITCH_RECOMMENDED_BUFFER_SIZE];
};
SWITCH_END_EXTERN_C
#endif