Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
2659d13c
Commit
2659d13c
authored
Feb 01, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: set Tfxd absolute offset (smooth streaming)
parent
00834cac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+22
-4
No files found.
modules/demux/mp4/mp4.c
View file @
2659d13c
...
...
@@ -5138,14 +5138,32 @@ static void LeafCheckandSetMOOFOffset( demux_t *p_demux, MP4_Box_t *p_vroot, MP4
if
(
i_lowest_pres_time
!=
INT64_MAX
)
p_sys
->
i_time
=
i_lowest_pres_time
;
/* Try using SIDX as base offset.
* This can not work for global sidx but only when sent within each fragment (dash) */
/* Try using Tfxd for base offset (Smooth) */
if
(
!
b_has_base_media_decode_time
&&
p_sys
->
i_tracks
==
1
)
{
const
MP4_Box_t
*
p_uuid
=
MP4_BoxGet
(
p_moof
,
"traf/uuid"
);
for
(
;
p_uuid
;
p_uuid
=
p_uuid
->
p_next
)
{
if
(
p_uuid
->
i_type
==
ATOM_uuid
&&
!
CmpUUID
(
&
p_uuid
->
i_uuid
,
&
TfxdBoxUUID
)
&&
p_uuid
->
data
.
p_tfxd
)
{
p_sys
->
track
[
0
].
i_time
=
p_uuid
->
data
.
p_tfxd
->
i_fragment_abs_time
;
p_sys
->
i_time
=
MP4_rescale
(
p_sys
->
track
[
0
].
i_time
,
p_sys
->
track
[
0
].
i_timescale
,
p_sys
->
i_timescale
);
b_has_base_media_decode_time
=
true
;
break
;
}
}
}
if
(
p_vroot
!=
NULL
&&
!
b_has_base_media_decode_time
)
{
MP4_Box_t
*
p_sidx
=
MP4_BoxGet
(
p_vroot
,
"sidx"
);
/* Try using SIDX as base offset.
* This can not work for global sidx but only when sent within each fragment (dash) */
const
MP4_Box_t
*
p_sidx
=
MP4_BoxGet
(
p_vroot
,
"sidx"
);
if
(
p_sidx
&&
BOXDATA
(
p_sidx
)
&&
BOXDATA
(
p_sidx
)
->
i_timescale
)
{
mtime
_t
i_time_base
=
BOXDATA
(
p_sidx
)
->
i_earliest_presentation_time
;
const
uint64
_t
i_time_base
=
BOXDATA
(
p_sidx
)
->
i_earliest_presentation_time
;
for
(
unsigned
int
i_track
=
0
;
i_track
<
p_sys
->
i_tracks
;
i_track
++
)
{
...
...
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