summaryrefslogtreecommitdiff
path: root/frame.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-01-31 17:18:58 +0000
committerRussell Bryant <russell@russellbryant.com>2006-01-31 17:18:58 +0000
commite01861fafd6f74f65f2cb4ac90b811a9bb0a52c7 (patch)
tree5d573d837383e784c67dabc01fcfad5e8aec9801 /frame.c
parent18eac350afb23f696f4c56233b6a18094b201041 (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: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'frame.c')
-rw-r--r--frame.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/frame.c b/frame.c
index 8c86a67f4..d640e0772 100644
--- a/frame.c
+++ b/frame.c
@@ -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));