summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-codec/ipp_codecs.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjmedia/src/pjmedia-codec/ipp_codecs.c')
-rw-r--r--pjmedia/src/pjmedia-codec/ipp_codecs.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia-codec/ipp_codecs.c b/pjmedia/src/pjmedia-codec/ipp_codecs.c
index 5f939d08..8072e6ce 100644
--- a/pjmedia/src/pjmedia-codec/ipp_codecs.c
+++ b/pjmedia/src/pjmedia-codec/ipp_codecs.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <pjmedia-codec/ipp_codecs.h>
+#include <pjmedia-codec/amr_sdp_match.h>
+#include <pjmedia-codec/g7221_sdp_match.h>
#include <pjmedia/codec.h>
#include <pjmedia/errno.h>
#include <pjmedia/endpoint.h>
@@ -665,6 +667,7 @@ PJ_DEF(pj_status_t) pjmedia_codec_g7221_set_pcm_shift(int val)
PJ_DEF(pj_status_t) pjmedia_codec_ipp_init( pjmedia_endpt *endpt )
{
pjmedia_codec_mgr *codec_mgr;
+ pj_str_t codec_name;
pj_status_t status;
if (ipp_factory.pool != NULL) {
@@ -695,6 +698,37 @@ PJ_DEF(pj_status_t) pjmedia_codec_ipp_init( pjmedia_endpt *endpt )
goto on_error;
}
+ /* Register format match callback. */
+#if PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1
+ pj_cstr(&codec_name, "G7221");
+ status = pjmedia_sdp_neg_register_fmt_match_cb(
+ &codec_name,
+ &pjmedia_codec_g7221_match_sdp);
+ if (status != PJ_SUCCESS)
+ goto on_error;
+#endif
+
+#if PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
+ pj_cstr(&codec_name, "AMR");
+ status = pjmedia_sdp_neg_register_fmt_match_cb(
+ &codec_name,
+ &pjmedia_codec_amr_match_sdp);
+ if (status != PJ_SUCCESS)
+ goto on_error;
+#endif
+
+#if PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB
+ pj_cstr(&codec_name, "AMR-WB");
+ status = pjmedia_sdp_neg_register_fmt_match_cb(
+ &codec_name,
+ &pjmedia_codec_amr_match_sdp);
+ if (status != PJ_SUCCESS)
+ goto on_error;
+#endif
+
+ /* Suppress compile warning */
+ PJ_UNUSED_ARG(codec_name);
+
/* Register codec factory to endpoint. */
status = pjmedia_codec_mgr_register_factory(codec_mgr,
&ipp_factory.base);