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
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
GSoC
GSoC2018
macOS
vlc
Commits
3d5290f7
Commit
3d5290f7
authored
Dec 20, 2018
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: mp4: generate AV1 extradata when missing
parent
50ee8803
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
modules/mux/Makefile.am
modules/mux/Makefile.am
+2
-0
modules/mux/mp4/libmp4mux.c
modules/mux/mp4/libmp4mux.c
+0
-8
modules/mux/mp4/mp4.c
modules/mux/mp4/mp4.c
+18
-0
No files found.
modules/mux/Makefile.am
View file @
3d5290f7
...
...
@@ -13,6 +13,8 @@ libmux_mp4_plugin_la_SOURCES = mux/mp4/mp4.c \
packetizer/hxxx_nal.c packetizer/hxxx_nal.h
\
packetizer/hevc_nal.c packetizer/hevc_nal.h
\
packetizer/h264_nal.c packetizer/h264_nal.h
libmux_mp4_plugin_la_SOURCES
+=
$(extradata_builder_SOURCES)
libmux_mpjpeg_plugin_la_SOURCES
=
mux/mpjpeg.c
libmux_ps_plugin_la_SOURCES
=
\
mux/mpeg/pes.c mux/mpeg/pes.h
\
...
...
modules/mux/mp4/libmp4mux.c
View file @
3d5290f7
...
...
@@ -2255,15 +2255,7 @@ bool mp4mux_CanMux(vlc_object_t *p_obj, const es_format_t *p_fmt,
case
VLC_CODEC_YUYV
:
case
VLC_CODEC_VC1
:
case
VLC_CODEC_WMAP
:
break
;
case
VLC_CODEC_AV1
:
/* Extradata is an AVC1DecoderConfigurationRecord */
if
(
p_fmt
->
i_extra
<
4
||
((
uint8_t
*
)
p_fmt
->
p_extra
)[
0
]
!=
0x81
)
{
if
(
p_obj
)
msg_Err
(
p_obj
,
"Can't mux AV1 without extradata"
);
return
false
;
}
break
;
case
VLC_CODEC_H264
:
if
(
!
p_fmt
->
i_extra
&&
p_obj
)
...
...
modules/mux/mp4/mp4.c
View file @
3d5290f7
...
...
@@ -44,6 +44,7 @@
#include "libmp4mux.h"
#include "../packetizer/hxxx_nal.h"
#include "../av1_pack.h"
#include "../extradata.h"
/*****************************************************************************
* Module descriptor
...
...
@@ -130,6 +131,8 @@ typedef struct
mp4mux_trackinfo_t
*
tinfo
;
const
es_format_t
*
p_fmt
;
mux_extradata_builder_t
*
extrabuilder
;
/* index */
vlc_tick_t
i_length_neg
;
...
...
@@ -177,6 +180,9 @@ typedef struct
static
void
mp4_stream_Delete
(
mp4_stream_t
*
p_stream
)
{
if
(
p_stream
->
extrabuilder
)
mux_extradata_builder_Delete
(
p_stream
->
extrabuilder
);
/* mp4 frag */
if
(
p_stream
->
p_held_entry
)
{
...
...
@@ -520,6 +526,7 @@ static int AddStream(sout_mux_t *p_mux, sout_input_t *p_input)
return
VLC_ENOMEM
;
}
p_stream
->
extrabuilder
=
mux_extradata_builder_New
(
p_input
->
p_fmt
->
i_codec
);
p_stream
->
p_fmt
=
p_input
->
p_fmt
;
p_input
->
p_sys
=
p_stream
;
...
...
@@ -602,6 +609,17 @@ static block_t * BlockDequeue(sout_input_t *p_input, mp4_stream_t *p_stream)
if
(
unlikely
(
!
p_block
))
return
NULL
;
/* Create on the fly extradata as packetizer is not in the loop */
if
(
p_stream
->
extrabuilder
&&
!
mp4mux_track_HasSamplePriv
(
p_stream
->
tinfo
))
{
mux_extradata_builder_Feed
(
p_stream
->
extrabuilder
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
const
uint8_t
*
p_extra
;
size_t
i_extra
=
mux_extradata_builder_Get
(
p_stream
->
extrabuilder
,
&
p_extra
);
if
(
i_extra
)
mp4mux_track_SetSamplePriv
(
p_stream
->
tinfo
,
p_extra
,
i_extra
);
}
switch
(
p_stream
->
p_fmt
->
i_codec
)
{
case
VLC_CODEC_AV1
:
...
...
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