Commit e615c748 authored by jehan's avatar jehan

differenciate rtp/rtcp banbdwidth reporting

parent 19cd01c9
......@@ -251,6 +251,20 @@ MS2_PUBLIC float media_stream_get_up_bw(const MediaStream *stream);
* */
MS2_PUBLIC float media_stream_get_down_bw(const MediaStream *stream);
/**
* get current stream rtcp upload bitrate. Value is updated every seconds
* @param stream
* @return bitrate in bit per seconds
* */
MS2_PUBLIC float media_stream_get_rtcp_up_bw(const MediaStream *stream);
/**
* get current stream rtcp download bitrate. Value is updated every seconds
* @param stream
* @return bitrate in bit per seconds
* */
MS2_PUBLIC float media_stream_get_rtcp_down_bw(const MediaStream *stream);
/**
* Returns the sessions that were used in the media stream (RTP, SRTP, ZRTP...) so that they can be re-used.
* As a result of calling this function, the media stream no longer owns the sessions and thus will not free them.
......
......@@ -588,11 +588,19 @@ int media_stream_get_target_network_bitrate(const MediaStream *stream) {
}
float media_stream_get_up_bw(const MediaStream *stream) {
return rtp_session_get_send_bandwidth(stream->sessions.rtp_session);
return rtp_session_get_rtp_send_bandwidth(stream->sessions.rtp_session);
}
float media_stream_get_down_bw(const MediaStream *stream) {
return rtp_session_get_recv_bandwidth(stream->sessions.rtp_session);
return rtp_session_get_rtp_recv_bandwidth(stream->sessions.rtp_session);
}
float media_stream_get_rtcp_up_bw(const MediaStream *stream) {
return rtp_session_get_rtcp_send_bandwidth(stream->sessions.rtp_session);
}
float media_stream_get_rtcp_down_bw(const MediaStream *stream) {
return rtp_session_get_rtcp_recv_bandwidth(stream->sessions.rtp_session);
}
void media_stream_reclaim_sessions(MediaStream *stream, MSMediaStreamSessions *sessions){
......
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