diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2013-05-24 04:27:59 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2013-05-24 04:27:59 +0000 |
commit | 915719ad7c1d30167b7381bf36357c491a23fae4 (patch) | |
tree | 3c02539b1edba06a2eb3175ab5324410aaf7a3d4 /pjsip | |
parent | 9e0fe8fa59243d8aa937982931aa5e1be7e944de (diff) |
Fixed #1670:
- Added 'no_rtcp_sdes_bye' to 'pjsua_media_config'.
- Modified behaviour of video stream in PJSUA to match audio stream behaviour, i.e: always send RTCP SDES when stream starts/stops and send RTCP BYE when stream stops, regardless whether 'no_rtcp_sdes_bye' is set.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4524 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 11 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_aud.c | 2 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_vid.c | 7 |
3 files changed, 18 insertions, 2 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 55dca05a..9fb84ea7 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -5661,6 +5661,17 @@ struct pjsua_media_config * Default: PJ_FALSE */ pj_bool_t no_smart_media_update; + + /** + * Omit RTCP SDES and BYE in outgoing RTCP packet, this setting will be + * applied for both audio and video streams. Note that, when RTCP SDES + * and BYE are set to be omitted, RTCP SDES will still be sent once when + * the stream starts/stops and RTCP BYE will be sent once when the stream + * stops. + * + * Default: PJ_FALSE + */ + pj_bool_t no_rtcp_sdes_bye; }; diff --git a/pjsip/src/pjsua-lib/pjsua_aud.c b/pjsip/src/pjsua-lib/pjsua_aud.c index 0a1e98a9..beda1013 100644 --- a/pjsip/src/pjsua-lib/pjsua_aud.c +++ b/pjsip/src/pjsua-lib/pjsua_aud.c @@ -585,7 +585,7 @@ pj_status_t pjsua_aud_channel_update(pjsua_call_media *call_med, PJ_LOG(4,(THIS_FILE,"Audio channel update..")); pj_log_push_indent(); - si->rtcp_sdes_bye_disabled = PJ_TRUE; + si->rtcp_sdes_bye_disabled = pjsua_var.media_cfg.no_rtcp_sdes_bye; /* Check if no media is active */ if (si->dir != PJMEDIA_DIR_NONE) { diff --git a/pjsip/src/pjsua-lib/pjsua_vid.c b/pjsip/src/pjsua-lib/pjsua_vid.c index 9ea300fd..18f3e4df 100644 --- a/pjsip/src/pjsua-lib/pjsua_vid.c +++ b/pjsip/src/pjsua-lib/pjsua_vid.c @@ -729,7 +729,7 @@ pj_status_t pjsua_vid_channel_update(pjsua_call_media *call_med, PJ_LOG(4,(THIS_FILE, "Video channel update..")); pj_log_push_indent(); - si->rtcp_sdes_bye_disabled = PJ_TRUE; + si->rtcp_sdes_bye_disabled = pjsua_var.media_cfg.no_rtcp_sdes_bye;; /* Check if no media is active */ if (si->dir != PJMEDIA_DIR_NONE) { @@ -804,6 +804,9 @@ pj_status_t pjsua_vid_channel_update(pjsua_call_media *call_med, if (status != PJ_SUCCESS) goto on_error; + if (call_med->prev_state == PJSUA_CALL_MEDIA_NONE) + pjmedia_vid_stream_send_rtcp_sdes(call_med->strm.v.stream); + /* Setup decoding direction */ if (si->dir & PJMEDIA_DIR_DECODING) { @@ -966,6 +969,8 @@ void pjsua_vid_stop_stream(pjsua_call_media *call_med) PJ_LOG(4,(THIS_FILE, "Stopping video stream..")); pj_log_push_indent(); + + pjmedia_vid_stream_send_rtcp_bye(strm); if (call_med->strm.v.cap_win_id != PJSUA_INVALID_ID) { pjmedia_port *media_port; |