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
e4c7e797
Commit
e4c7e797
authored
Dec 12, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: add DASH major and switch demuxer accordingly
parent
c04ebc35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+1
-0
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+23
-9
No files found.
modules/demux/mp4/libmp4.h
View file @
e4c7e797
...
...
@@ -35,6 +35,7 @@
#define MAJOR_isml VLC_FOURCC( 'i', 's', 'm', 'l' )
#define MAJOR_isom VLC_FOURCC( 'i', 's', 'o', 'm' )
#define MAJOR_qt__ VLC_FOURCC( 'q', 't', ' ', ' ' )
#define MAJOR_dash VLC_FOURCC( 'd', 'a', 's', 'h' )
#define ATOM_root VLC_FOURCC( 'r', 'o', 'o', 't' )
#define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' )
...
...
modules/demux/mp4/mp4.c
View file @
e4c7e797
...
...
@@ -84,6 +84,7 @@ struct demux_sys_t
bool
b_fastseekable
;
bool
b_seekmode
;
bool
b_smooth
;
/* Is it Smooth Streaming? */
bool
b_dash
;
bool
b_index_probed
;
bool
b_fragments_probed
;
...
...
@@ -626,15 +627,6 @@ static int Open( vlc_object_t * p_this )
if
(
!
p_sys
->
moovfragment
.
p_moox
&&
!
p_sys
->
b_smooth
)
goto
error
;
if
(
p_sys
->
b_smooth
)
{
p_demux
->
pf_demux
=
DemuxFrg
;
}
else
if
(
p_sys
->
b_fragmented
)
{
p_demux
->
pf_demux
=
DemuxAsLeaf
;
}
if
(
p_sys
->
b_smooth
)
{
if
(
InitTracks
(
p_demux
)
!=
VLC_SUCCESS
)
...
...
@@ -672,18 +664,40 @@ static int Open( vlc_object_t * p_this )
case
MAJOR_isml
:
msg_Dbg
(
p_demux
,
"PIFF (= isml = fMP4) file"
);
break
;
case
MAJOR_dash
:
msg_Dbg
(
p_demux
,
"DASH Stream file"
);
p_sys
->
b_dash
=
true
;
break
;
default:
msg_Dbg
(
p_demux
,
"unrecognized major file specification (%4.4s)."
,
(
char
*
)
&
BOXDATA
(
p_ftyp
)
->
i_major_brand
);
break
;
}
/* also lookup in compatibility list */
for
(
uint32_t
i
=
0
;
i
<
BOXDATA
(
p_ftyp
)
->
i_compatible_brands_count
;
i
++
)
{
if
(
BOXDATA
(
p_ftyp
)
->
i_compatible_brands
[
i
]
==
MAJOR_dash
)
{
msg_Dbg
(
p_demux
,
"DASH Stream file"
);
p_sys
->
b_dash
=
true
;
}
}
}
else
{
msg_Dbg
(
p_demux
,
"file type box missing (assuming ISO Media file)"
);
}
if
(
p_sys
->
b_smooth
||
p_sys
->
b_dash
)
{
p_demux
->
pf_demux
=
DemuxFrg
;
}
else
if
(
p_sys
->
b_fragmented
)
{
p_demux
->
pf_demux
=
DemuxAsLeaf
;
}
/* the file need to have one moov box */
p_sys
->
moovfragment
.
p_moox
=
MP4_BoxGet
(
p_sys
->
p_root
,
"/moov"
,
0
);
if
(
!
p_sys
->
moovfragment
.
p_moox
)
...
...
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