summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjmedia/include/pjmedia/config.h22
-rw-r--r--pjmedia/src/pjmedia/endpoint.c8
2 files changed, 28 insertions, 2 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index c37f43cd..0005fcbc 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -685,6 +685,28 @@
/**
+ * This macro controls whether pjmedia should include SDP
+ * bandwidth modifier "TIAS" (RFC3890).
+ *
+ * Note that there is also a run-time variable to turn this setting
+ * on or off, defined in endpoint.c. To access this variable, use
+ * the following construct
+ *
+ \verbatim
+ extern pj_bool_t pjmedia_add_bandwidth_tias_in_sdp;
+
+ // Do not enable bandwidth information inclusion in sdp
+ pjmedia_add_bandwidth_tias_in_sdp = PJ_FALSE;
+ \endverbatim
+ *
+ * Default: 1 (yes)
+ */
+#ifndef PJMEDIA_ADD_BANDWIDTH_TIAS_IN_SDP
+# define PJMEDIA_ADD_BANDWIDTH_TIAS_IN_SDP 1
+#endif
+
+
+/**
* This macro controls whether pjmedia should include SDP rtpmap
* attribute for static payload types. SDP rtpmap for static
* payload types are optional, although they are normally included
diff --git a/pjmedia/src/pjmedia/endpoint.c b/pjmedia/src/pjmedia/endpoint.c
index 4f592b6d..9ac90177 100644
--- a/pjmedia/src/pjmedia/endpoint.c
+++ b/pjmedia/src/pjmedia/endpoint.c
@@ -49,6 +49,10 @@ static const pj_str_t STR_SENDRECV = { "sendrecv", 8 };
pj_bool_t pjmedia_add_rtpmap_for_static_pt =
PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT;
+/* Config to control use of RFC3890 TIAS */
+pj_bool_t pjmedia_add_bandwidth_tias_in_sdp =
+ PJMEDIA_ADD_BANDWIDTH_TIAS_IN_SDP;
+
/* Worker thread proc. */
@@ -551,7 +555,7 @@ PJ_DEF(pj_status_t) pjmedia_endpt_create_audio_sdp(pjmedia_endpt *endpt,
/* Put bandwidth info in media level using bandwidth modifier "TIAS"
* (RFC3890).
*/
- if (max_bitrate) {
+ if (max_bitrate && pjmedia_add_bandwidth_tias_in_sdp) {
const pj_str_t STR_BANDW_MODIFIER = { "TIAS", 4 };
pjmedia_sdp_bandw *b;
@@ -715,7 +719,7 @@ PJ_DEF(pj_status_t) pjmedia_endpt_create_video_sdp(pjmedia_endpt *endpt,
/* Put bandwidth info in media level using bandwidth modifier "TIAS"
* (RFC3890).
*/
- if (max_bitrate) {
+ if (max_bitrate && pjmedia_add_bandwidth_tias_in_sdp) {
const pj_str_t STR_BANDW_MODIFIER = { "TIAS", 4 };
pjmedia_sdp_bandw *b;