Commit 5846cda4 authored by Ghislain MARY's avatar Ghislain MARY

Add API to get the RTP session from an AudioStream or a VideoStream.

parent f5f9d66f
......@@ -196,6 +196,12 @@ MS2_PUBLIC bool_t media_stream_avpf_enabled(const MediaStream *stream);
*/
MS2_PUBLIC uint16_t media_stream_get_avpf_rr_interval(const MediaStream *stream);
/**
* Gets the RTP session of the media stream.
* @param[in] stream #MediaStream object.
* @return The RTP session of the media stream.
*/
MS2_PUBLIC RtpSession * media_stream_get_rtp_session(const MediaStream *stream);
MS2_PUBLIC const MSQualityIndicator *media_stream_get_quality_indicator(MediaStream *stream);
/* *
......@@ -535,6 +541,16 @@ static MS2_INLINE int audio_stream_set_dscp(AudioStream *stream, int dscp) {
return media_stream_set_dscp(&stream->ms, dscp);
}
/**
* Gets the RTP session of an audio stream.
* @param[in] stream #MediaStream object.
* @return The RTP session of the audio stream.
*/
static MS2_INLINE RtpSession * audio_stream_get_rtp_session(const AudioStream *stream) {
return media_stream_get_rtp_session(&stream->ms);
}
/**
* @}
......@@ -722,6 +738,15 @@ static MS2_INLINE int video_stream_set_dscp(VideoStream *stream, int dscp) {
return media_stream_set_dscp(&stream->ms, dscp);
}
/**
* Gets the RTP session of a video stream.
* @param[in] stream #MediaStream object.
* @return The RTP session of the video stream.
*/
static MS2_INLINE RtpSession * video_stream_get_rtp_session(const VideoStream *stream) {
return media_stream_get_rtp_session(&stream->ms);
}
/**
* Ask the video stream whether a decoding error should be reported (eg. to send a VFU request).
* @param[in] stream The VideoStream object.
......
......@@ -587,6 +587,10 @@ MSStreamState media_stream_get_state(const MediaStream *stream) {
return stream->state;
}
RtpSession * media_stream_get_rtp_session(const MediaStream *stream) {
return stream->sessions.rtp_session;
}
#define keywordcmp(key,b) strncmp(key,b,sizeof(key))
/* see http://www.iana.org/assignments/sdp-security-descriptions/sdp-security-descriptions.xhtml#sdp-security-descriptions-3 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment