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:
Anthony Minessale
2009-04-09 17:17:12 +00:00
parent 2840f826f0
commit 68b0359cfb
25 changed files with 90 additions and 78 deletions
-1
View File
@@ -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
+6
View File
@@ -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;
}
+1
View File
@@ -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;
};
+2 -1
View File
@@ -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;