aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/frame.h')
-rw-r--r--include/asterisk/frame.h28
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