diff options
author | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-18 23:32:57 +0000 |
---|---|---|
committer | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-18 23:32:57 +0000 |
commit | c37364c1a8f6ece02acd67413b3ff755b4a57526 (patch) | |
tree | d7fed805868cbb9500e7ddc7978cfa89bb93d52a /include/asterisk/frame.h | |
parent | d4544fc8306f0cf0c207fc1d9b474e1d4fd4441c (diff) |
allow for packetization on rtp channel drivers, need to add
option for setting our own packetization as apposed to just doing
what is asked.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43243 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/frame.h')
-rw-r--r-- | include/asterisk/frame.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 0160e3b95..bcc533a95 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -38,6 +38,7 @@ extern "C" { struct ast_codec_pref { char order[32]; + char framing[32]; }; /*! \page Def_Frame AST Multimedia and signalling frames @@ -281,6 +282,7 @@ enum ast_control_frame_type { }; #define AST_SMOOTHER_FLAG_G729 (1 << 0) +#define AST_SMOOTHER_FLAG_BE (1 << 1) /* Option identifiers and flags */ #define AST_OPTION_FLAG_REQUEST 0 @@ -346,6 +348,23 @@ struct ast_option_header { uint8_t data[0]; }; + +/*! \brief Definition of supported media formats (codecs) */ +struct ast_format_list { + int visible; /*!< Can we see this entry */ + int bits; /*!< bitmask value */ + char *name; /*!< short name */ + char *desc; /*!< Description */ + int fr_len; /*!< Single frame length in bytes */ + int min_ms; /*!< Min value */ + int max_ms; /*!< Max value */ + int inc_ms; /*!< Increment */ + int def_ms; /*!< Default value */ + unsigned int flags; /*!< Smoother flags */ + int cur_ms; /*!< Current value */ +}; + + /*! \brief Requests a frame to be allocated * * \param source @@ -436,6 +455,7 @@ struct ast_format_list *ast_get_format_list(size_t *size); struct ast_smoother *ast_smoother_new(int bytes); void ast_smoother_set_flags(struct ast_smoother *smoother, int flags); int ast_smoother_get_flags(struct ast_smoother *smoother); +int ast_smoother_test_flag(struct ast_smoother *s, int flag); void ast_smoother_free(struct ast_smoother *s); void ast_smoother_reset(struct ast_smoother *s, int bytes); int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap); @@ -482,6 +502,14 @@ int ast_codec_pref_append(struct ast_codec_pref *pref, int format); the format list is selected, otherwise 0 is returned. */ int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best); +/*! \brief Set packet size for codec +*/ +int ast_codec_pref_setsize(struct ast_codec_pref *pref, int format, int framems); + +/*! \brief Get packet size for codec +*/ +struct ast_format_list ast_codec_pref_getsize(struct ast_codec_pref *pref, int format); + /*! \brief Parse an "allow" or "deny" line in a channel or device configuration and update the capabilities mask and pref if provided. Video codecs are not added to codec preference lists, since we can not transcode |