Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
ortp
Commits
a94f569c
Commit
a94f569c
authored
Jun 30, 2011
by
Simon Morlat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.linphone.org/ortp
parents
0ec4e6f6
939fc5cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
build/win32native/ortp.def
build/win32native/ortp.def
+3
-0
src/rtcp.c
src/rtcp.c
+6
-4
No files found.
build/win32native/ortp.def
View file @
a94f569c
...
...
@@ -53,6 +53,7 @@ EXPORTS
rtp_session_get_rtcp_socket
rtp_session_set_payload_type
rtp_session_get_send_profile
rtp_session_set_send_payload_type
rtp_session_get_send_payload_type
rtp_session_set_recv_payload_type
...
...
@@ -184,6 +185,8 @@ EXPORTS
rtp_session_set_rtp_socket_recv_buffer_size
rtp_session_set_rtp_socket_send_buffer_size
rtp_session_set_jitter_buffer_params
rtp_session_get_round_trip_propagation
rtp_session_set_rtcp_report_interval
rtp_get_payload
...
...
src/rtcp.c
View file @
a94f569c
...
...
@@ -281,12 +281,13 @@ static void report_block_init(report_block_t *b, RtpSession *session){
/* If the test mode is enabled, modifies the returned ts (LSR) so it matches the value of the delay test value */
/* refer to the rtp_session_rtcp_set_delay_value() documentation for further explanations */
double
new_ts
=
(
(
double
)
stream
->
last_rcv_SR_time
.
tv_sec
+
(
double
)
stream
->
last_rcv_SR_time
.
tv_usec
*
1e-6
)
-
(
(
double
)
session
->
delay_test_vector
/
1000
.
0
);
uint32_t
new_ts2
;
/* Converting the time format in RFC3550 (par. 4) format */
new_ts
+=
2208988800
.
0
;
/* 2208988800 is the number of seconds from 1900 to 1970 (January 1, Oh TU) */
new_ts
=
round
(
65536
.
0
*
new_ts
)
;
new_ts
=
65536
.
0
*
new_ts
;
/* This non-elegant way of coding fits with the gcc and the icc compilers */
uint32_t
new_ts2
=
(
uint32_t
)(
(
uint64_t
)
new_ts
&
0xffffffff
);
new_ts2
=
(
uint32_t
)(
(
uint64_t
)
new_ts
&
0xffffffff
);
b
->
lsr
=
htonl
(
new_ts2
);
}
else
{
...
...
@@ -296,16 +297,17 @@ static void report_block_init(report_block_t *b, RtpSession *session){
}
static
void
extended_statistics
(
RtpSession
*
session
,
report_block_t
*
rb
)
{
session
->
rtp
.
stats
.
sent_rtcp_packets
++
;
/* the jitter raw value is kept in stream clock units */
uint32_t
jitter
=
session
->
rtp
.
jittctl
.
inter_jitter
;
session
->
rtp
.
stats
.
sent_rtcp_packets
++
;
session
->
rtp
.
jitter_stats
.
sum_jitter
+=
jitter
;
session
->
rtp
.
jitter_stats
.
jitter
=
jitter
;
/* stores the biggest jitter for that session and its date (in millisecond) since Epoch */
if
(
jitter
>
session
->
rtp
.
jitter_stats
.
max_jitter
)
{
struct
timeval
now
;
session
->
rtp
.
jitter_stats
.
max_jitter
=
jitter
;
struct
timeval
now
;
gettimeofday
(
&
now
,
NULL
);
session
->
rtp
.
jitter_stats
.
max_jitter_ts
=
(
now
.
tv_sec
*
1000
)
+
(
now
.
tv_usec
/
1000
);
}
...
...
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