Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
e615c748
Commit
e615c748
authored
Dec 08, 2014
by
jehan
Browse files
differenciate rtp/rtcp banbdwidth reporting
parent
19cd01c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
include/mediastreamer2/mediastream.h
include/mediastreamer2/mediastream.h
+14
-0
src/voip/mediastream.c
src/voip/mediastream.c
+10
-2
No files found.
include/mediastreamer2/mediastream.h
View file @
e615c748
...
@@ -251,6 +251,20 @@ MS2_PUBLIC float media_stream_get_up_bw(const MediaStream *stream);
...
@@ -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
);
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.
* 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.
* As a result of calling this function, the media stream no longer owns the sessions and thus will not free them.
...
...
src/voip/mediastream.c
View file @
e615c748
...
@@ -588,11 +588,19 @@ int media_stream_get_target_network_bitrate(const MediaStream *stream) {
...
@@ -588,11 +588,19 @@ int media_stream_get_target_network_bitrate(const MediaStream *stream) {
}
}
float
media_stream_get_up_bw
(
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
)
{
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
){
void
media_stream_reclaim_sessions
(
MediaStream
*
stream
,
MSMediaStreamSessions
*
sessions
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment