summaryrefslogtreecommitdiff
path: root/include/asterisk/format.h
diff options
context:
space:
mode:
authorfrahaase <fra.haase@googlemail.com>2016-11-06 12:40:14 +0100
committerfrahaase <fra.haase@googlemail.com>2016-11-06 15:56:58 +0100
commitb2b5f9d897d1534f366b1b96fb10ad1de4f9ba5d (patch)
tree88fab2e74612cd3fdae87dd9b15008b5cb84c6f1 /include/asterisk/format.h
parentbf01ff53f8d93d637981720331405e56f0b3b118 (diff)
ast_format: Adds an identifier for interleaved audio formats to the ast_format
Adds an identifier (with a getter and setter) to detect channels with interleaved audio. This is needed by the binaural bridge_softmix patch (ASTERISK-26292) and was already discussed here: http://lists.digium.com/pipermail/asterisk-dev/2016-October/075900.html The identifier can be set during fmtp parsing (to be seen in the res_format_attr_opus.c change). ASTERISK-26292 Change-Id: I359801cc5f98c35671c48dabc81a7f4ee1183d63
Diffstat (limited to 'include/asterisk/format.h')
-rw-r--r--include/asterisk/format.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/asterisk/format.h b/include/asterisk/format.h
index a5ca03818..b01592d16 100644
--- a/include/asterisk/format.h
+++ b/include/asterisk/format.h
@@ -299,6 +299,24 @@ void ast_format_set_attribute_data(struct ast_format *format, void *attribute_da
const char *ast_format_get_name(const struct ast_format *format);
/*!
+ * \brief Get the channel count on a format
+ *
+ * \param The media format
+ *
+ * \return Currently set channel count
+ */
+unsigned int ast_format_get_channel_count(const struct ast_format *format);
+
+/*!
+ * \brief Set the channel count on a format
+ *
+ * \param format The media format
+ * \param channel_count The number of audio channels used
+ *
+ */
+void ast_format_set_channel_count(struct ast_format *format, unsigned int channel_count);
+
+/*!
* \brief Get the codec associated with a format
*
* \param format The media format