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
a0398a6d
Commit
a0398a6d
authored
Dec 15, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: libmp4: add tfdt atom
parent
dbfd7a5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+18
-0
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+10
-0
No files found.
modules/demux/mp4/libmp4.c
View file @
a0398a6d
...
...
@@ -872,6 +872,23 @@ static void MP4_FreeBox_trun( MP4_Box_t *p_box )
FREENULL
(
p_box
->
data
.
p_trun
->
p_samples
);
}
static
int
MP4_ReadBox_tfdt
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tfdt_t
);
if
(
i_read
<
8
)
MP4_READBOX_EXIT
(
0
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_tfdt
);
if
(
p_box
->
data
.
p_tfdt
->
i_version
==
0
)
MP4_GET4BYTES
(
p_box
->
data
.
p_tfdt
->
i_base_media_decode_time
);
else
if
(
p_box
->
data
.
p_tfdt
->
i_version
==
1
)
MP4_GET8BYTES
(
p_box
->
data
.
p_tfdt
->
i_base_media_decode_time
);
else
MP4_READBOX_EXIT
(
0
);
MP4_READBOX_EXIT
(
1
);
}
static
int
MP4_ReadBox_tkhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
...
...
@@ -3875,6 +3892,7 @@ static const struct
{
ATOM_sidx
,
MP4_ReadBox_sidx
,
MP4_FreeBox_sidx
,
0
},
{
ATOM_tfhd
,
MP4_ReadBox_tfhd
,
MP4_FreeBox_Common
,
ATOM_traf
},
{
ATOM_trun
,
MP4_ReadBox_trun
,
MP4_FreeBox_trun
,
ATOM_traf
},
{
ATOM_tfdt
,
MP4_ReadBox_tfdt
,
MP4_FreeBox_Common
,
ATOM_traf
},
{
ATOM_trex
,
MP4_ReadBox_trex
,
MP4_FreeBox_Common
,
ATOM_mvex
},
{
ATOM_mehd
,
MP4_ReadBox_mehd
,
MP4_FreeBox_Common
,
ATOM_mvex
},
{
ATOM_sdtp
,
MP4_ReadBox_sdtp
,
MP4_FreeBox_sdtp
,
0
},
...
...
modules/demux/mp4/libmp4.h
View file @
a0398a6d
...
...
@@ -102,6 +102,7 @@
#define ATOM_traf VLC_FOURCC( 't', 'r', 'a', 'f' )
#define ATOM_sidx VLC_FOURCC( 's', 'i', 'd', 'x' )
#define ATOM_tfhd VLC_FOURCC( 't', 'f', 'h', 'd' )
#define ATOM_tfdt VLC_FOURCC( 't', 'f', 'd', 't' )
#define ATOM_trun VLC_FOURCC( 't', 'r', 'u', 'n' )
#define ATOM_cprt VLC_FOURCC( 'c', 'p', 'r', 't' )
#define ATOM_iods VLC_FOURCC( 'i', 'o', 'd', 's' )
...
...
@@ -1025,6 +1026,14 @@ typedef struct MP4_Box_data_trun_s
}
MP4_Box_data_trun_t
;
typedef
struct
MP4_Box_data_tfdt_s
{
uint8_t
i_version
;
uint32_t
i_flags
;
int64_t
i_base_media_decode_time
;
}
MP4_Box_data_tfdt_t
;
typedef
struct
{
uint32_t
i_date
;
...
...
@@ -1380,6 +1389,7 @@ typedef union MP4_Box_data_s
MP4_Box_data_sidx_t
*
p_sidx
;
MP4_Box_data_tfhd_t
*
p_tfhd
;
MP4_Box_data_trun_t
*
p_trun
;
MP4_Box_data_tfdt_t
*
p_tfdt
;
MP4_Box_data_tkhd_t
*
p_tkhd
;
MP4_Box_data_mdhd_t
*
p_mdhd
;
MP4_Box_data_hdlr_t
*
p_hdlr
;
...
...
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