Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
474ef3f0
Commit
474ef3f0
authored
Sep 09, 2009
by
Marian Ďurkovič
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: compute deadline for reordering from the current time
backport of
2a605427
parent
526f4090
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
modules/access/rtp/session.c
modules/access/rtp/session.c
+6
-5
No files found.
modules/access/rtp/session.c
View file @
474ef3f0
...
...
@@ -146,7 +146,7 @@ struct rtp_source_t
uint16_t
last_seq
;
/* sequence of the next dequeued packet */
block_t
*
blocks
;
/* re-ordered blocks queue */
mtime_t
last_dq
;
/* last dequeued (decoded) packet local timestamp
*/
mtime_t
ref_ts
;
/* reference timestamp for reordering
*/
void
*
opaque
[
0
];
/* Per-source private payload data */
};
...
...
@@ -315,7 +315,6 @@ rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
}
}
src
->
last_rx
=
now
;
block
->
i_pts
=
now
;
src
->
last_ts
=
rtp_timestamp
(
block
);
/* Check sequence number */
...
...
@@ -412,8 +411,8 @@ rtp_decode (demux_t *demux, const rtp_session_t *session, rtp_source_t *src)
/* FIXME: handle timestamp wrap properly */
/* TODO: inter-medias/sessions sync (using RTCP-SR) */
const
uint32_t
timestamp
=
rtp_timestamp
(
block
);
src
->
last_dq
=
block
->
i_pts
;
block
->
i_pts
=
UINT64_C
(
1
)
*
CLOCK_FREQ
*
timestamp
/
pt
->
frequency
;
src
->
ref_ts
=
0
;
block
->
i_pts
=
CLOCK_FREQ
*
timestamp
/
pt
->
frequency
;
/* CSRC count */
size_t
skip
=
12u
+
(
block
->
p_buffer
[
0
]
&
0x0F
)
*
4
;
...
...
@@ -490,8 +489,10 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session,
* match for random gaussian jitter). Additionnaly, we implicitly
* wait for misordering times the packetization time.
*/
mtime_t
deadline
=
src
->
last_dq
;
mtime_t
deadline
=
src
->
ref_ts
;
const
rtp_pt_t
*
pt
=
rtp_find_ptype
(
session
,
src
,
block
,
NULL
);
if
(
!
deadline
)
deadline
=
src
->
ref_ts
=
now
;
if
(
pt
)
deadline
+=
UINT64_C
(
3
)
*
CLOCK_FREQ
*
src
->
jitter
/
pt
->
frequency
;
...
...
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