diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-08-31 09:03:36 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-08-31 09:03:36 +0000 |
commit | 39671bf4a4da966c29a93d5dd4248017990383fe (patch) | |
tree | 709791557b0cd9a4fccfc72cd905a42e361bcd74 | |
parent | ee316e75b1b1e39f1a52d4a66a522b00f2a12260 (diff) |
Fixed #1577: Add pjmedia setting to include SDP bandwidth modifier "TIAS" (RFC3890)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4240 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjmedia/include/pjmedia/config.h | 22 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/endpoint.c | 8 |
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; |