aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/rtp_engine.h
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-22 23:04:49 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-22 23:04:49 +0000
commitf27e928f0588f5cbf85ac8202cef912efcc51a9c (patch)
treeb061487de973558358757bd1b6e457aaccf41638 /include/asterisk/rtp_engine.h
parent70442b4e1767b35ed1699d27cfc24109c617f445 (diff)
Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes 1. Dynamic global format list build by codecs defined in codecs.conf 2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf 3. Negotiation of SILK attributes in chan_sip. 4. SPEEX 32khz with translation 5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c 6. Various changes to RTP code required to properly handle the dynamic format list and formats with attributes. 7. ConfBridge now dynamically jumps to the best possible sample rate. This allows for conferences to take advantage of HD audio (Which sounds awesome) 8. Audiohooks are no longer limited to 8khz audio, and most effects have been updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT. 9. codec_resample now uses its own code rather than depending on libresample. -Organizational changes Global format list is moved from frame.c to format.c Various format specific functions moved from frame.c to format.c Review: https://reviewboard.asterisk.org/r/1104/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@308582 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/rtp_engine.h')
-rw-r--r--include/asterisk/rtp_engine.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index f13538321..4c5753e84 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -1048,6 +1048,19 @@ void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp
struct ast_rtp_payload_type ast_rtp_codecs_payload_lookup(struct ast_rtp_codecs *codecs, int payload);
/*!
+ * \brief Retrieve the actual ast_format stored on the codecs structure for a specific payload
+ *
+ * \param codecs Codecs structure to look in
+ * \param payload Numerical payload to look up
+ *
+ * \retval pointer to format structure on success
+ * \retval NULL on failure
+ *
+ * \since 1.10
+ */
+struct ast_format *ast_rtp_codecs_get_payload_format(struct ast_rtp_codecs *codecs, int payload);
+
+/*!
* \brief Get the sample rate associated with known RTP payload types
*
* \param asterisk_format True if the value in format is to be used.
@@ -1798,6 +1811,15 @@ struct ast_channel *ast_rtp_instance_get_chan(struct ast_rtp_instance *instance)
int ast_rtp_instance_add_srtp_policy(struct ast_rtp_instance *instance, struct ast_srtp_policy *policy);
struct ast_srtp *ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance);
+/*! \brief Custom formats declared in codecs.conf at startup must be communicated to the rtp_engine
+ * so their mime type can payload number can be initialized. */
+int ast_rtp_engine_load_format(const struct ast_format *format);
+
+/*! \brief Formats requiring the use of a format attribute interface must have that
+ * interface registered in order for the rtp engine to handle it correctly. If an
+ * attribute interface is unloaded, this function must be called to notify the rtp_engine. */
+int ast_rtp_engine_unload_format(const struct ast_format *format);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif