diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-31 17:18:58 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-31 17:18:58 +0000 |
commit | b55d2bd3eaca8d5775ab0e8db5b85fa3f1066ce1 (patch) | |
tree | 5d573d837383e784c67dabc01fcfad5e8aec9801 /frame.c | |
parent | d00a87e2dcf7407f81d62d682474784cedb5a141 (diff) |
define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9001 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'frame.c')
-rw-r--r-- | frame.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -56,13 +56,6 @@ AST_MUTEX_DEFINE_STATIC(framelock); #define TYPE_DONTSEND 0x3 #define TYPE_MASK 0x3 -struct ast_format_list { - int visible; /*!< Can we see this entry */ - int bits; /*!< bitmask value */ - char *name; /*!< short name */ - char *desc; /*!< Description */ -}; - struct ast_smoother { int size; int format; @@ -79,7 +72,12 @@ struct ast_smoother { }; /*! \brief Definition of supported media formats (codecs) */ -static struct ast_format_list AST_FORMAT_LIST[] = { +static struct ast_format_list { + int visible; /*!< Can we see this entry */ + int bits; /*!< bitmask value */ + char *name; /*!< short name */ + char *desc; /*!< Description */ +} AST_FORMAT_LIST[] = { { 1, AST_FORMAT_G723_1 , "g723" , "G.723.1"}, /*!< codec_g723_1.c */ { 1, AST_FORMAT_GSM, "gsm" , "GSM"}, /*!< codec_gsm.c */ { 1, AST_FORMAT_ULAW, "ulaw", "G.711 u-law" }, /*!< codec_ulaw.c */ @@ -108,6 +106,8 @@ static struct ast_format_list AST_FORMAT_LIST[] = { { 0, AST_FORMAT_MAX_VIDEO, "maxvideo", "Maximum video format" }, }; +struct ast_frame ast_null_frame = { AST_FRAME_NULL, }; + void ast_smoother_reset(struct ast_smoother *s, int size) { memset(s, 0, sizeof(struct ast_smoother)); |