summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2013-08-01 04:18:15 +0000
committerLiong Sauw Ming <ming@teluu.com>2013-08-01 04:18:15 +0000
commita088975f81907044c195a49d31790fee43b973a6 (patch)
tree43a01ed1a42236c4c79ce47e15ccab3148756c1c /pjmedia/include
parent208181b3db6080dfca9e0b98456d4746cfc346fa (diff)
Closed #1692: Allow multiple codecs in SDP answer
By default, the setting is disabled, to change it during run-time, use the function pjmedia_sdp_neg_set_allow_multiple_codecs(). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4577 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/config.h13
-rw-r--r--pjmedia/include/pjmedia/sdp_neg.h17
2 files changed, 30 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index d718b659..9eec63e8 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -668,6 +668,19 @@
# define PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER 1
#endif
+/**
+ * This specifies the behavior of the SDP negotiator when responding to an
+ * offer, whether it should answer with multiple formats or not.
+ *
+ * Note that this behavior can be changed during run-time by calling
+ * pjmedia_sdp_neg_set_allow_multiple_codecs().
+ *
+ * Default is 0 (to maintain backward compatibility)
+ */
+#ifndef PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS
+# define PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS 0
+#endif
+
/**
* This specifies the maximum number of the customized SDP format
diff --git a/pjmedia/include/pjmedia/sdp_neg.h b/pjmedia/include/pjmedia/sdp_neg.h
index 3f6eb319..a17c74ce 100644
--- a/pjmedia/include/pjmedia/sdp_neg.h
+++ b/pjmedia/include/pjmedia/sdp_neg.h
@@ -416,6 +416,23 @@ PJ_DECL(pj_status_t)
pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg,
pj_bool_t prefer_remote);
+/**
+ * This specifies the behavior of the SDP negotiator when responding to an
+ * offer, whether it should answer with multiple formats or not.
+ *
+ * By default, the value in PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS will
+ * be used.
+ *
+ * @param neg The SDP negotiator instance.
+ * @param answer_multiple
+ * If non-zero, the negotiator will respond with
+ * multiple formats. If zero only a single format
+ * will be returned.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_sdp_neg_set_answer_multiple_codecs(pjmedia_sdp_neg *neg,
+ pj_bool_t answer_multiple);
+
/**
* Get SDP negotiator state.