summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
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.