mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
FSCORE-349 add flag to denote if a codec is init or not
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12961 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -68,7 +68,6 @@ SWITCH_BEGIN_EXTERN_C
|
||||
switch_bool_t m;
|
||||
/*! frame flags */
|
||||
switch_frame_flag_t flags;
|
||||
switch_core_session_t *session;
|
||||
};
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
@@ -413,6 +413,7 @@ static inline void switch_core_codec_add_implementation(switch_memory_pool_t *po
|
||||
impl->destroy = destroy;
|
||||
impl->codec_id = codec_interface->codec_id;
|
||||
impl->next = codec_interface->implementations;
|
||||
impl->impl_id = switch_core_codec_next_id();
|
||||
codec_interface->implementations = impl;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Rejected codec name: %s rate: %u ptime: %u\n",
|
||||
@@ -427,6 +428,11 @@ static inline void switch_core_codec_add_implementation(switch_memory_pool_t *po
|
||||
}
|
||||
|
||||
|
||||
static inline switch_bool_t switch_core_codec_ready(switch_codec_t *codec)
|
||||
{
|
||||
return (codec->flags & SWITCH_CODEC_FLAG_READY) ? SWITCH_TRUE : SWITCH_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -609,6 +609,7 @@ struct switch_codec_implementation {
|
||||
/*! deinitalize a codec handle using this implementation */
|
||||
switch_core_codec_destroy_func_t destroy;
|
||||
uint32_t codec_id;
|
||||
uint32_t impl_id;
|
||||
struct switch_codec_implementation *next;
|
||||
};
|
||||
|
||||
|
||||
@@ -954,7 +954,8 @@ typedef enum {
|
||||
SWITCH_CODEC_FLAG_SILENCE = (1 << 4),
|
||||
SWITCH_CODEC_FLAG_FREE_POOL = (1 << 5),
|
||||
SWITCH_CODEC_FLAG_AAL2 = (1 << 6),
|
||||
SWITCH_CODEC_FLAG_PASSTHROUGH = (1 << 7)
|
||||
SWITCH_CODEC_FLAG_PASSTHROUGH = (1 << 7),
|
||||
SWITCH_CODEC_FLAG_READY = (1 << 8)
|
||||
} switch_codec_flag_enum_t;
|
||||
typedef uint32_t switch_codec_flag_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user