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
33b2308f
Commit
33b2308f
authored
Dec 10, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: mp4: use hev1 as sample entry for HEVC
hvc1 is reserved for streams with VCL only
parent
0b3d62f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
modules/mux/mp4/libmp4mux.c
modules/mux/mp4/libmp4mux.c
+14
-11
No files found.
modules/mux/mp4/libmp4mux.c
View file @
33b2308f
...
@@ -569,7 +569,7 @@ static void hevcParseSPS(uint8_t * p_buffer, size_t i_buffer, uint8_t * chroma_i
...
@@ -569,7 +569,7 @@ static void hevcParseSPS(uint8_t * p_buffer, size_t i_buffer, uint8_t * chroma_i
free
(
p_dec_nal
);
free
(
p_dec_nal
);
}
}
static
bo_t
*
GetHvcCTag
(
es_format_t
*
p_fmt
)
static
bo_t
*
GetHvcCTag
(
es_format_t
*
p_fmt
,
bool
b_completeness
)
{
{
/* Generate hvcC box matching iso/iec 14496-15 3rd edition */
/* Generate hvcC box matching iso/iec 14496-15 3rd edition */
bo_t
*
hvcC
=
box_new
(
"hvcC"
);
bo_t
*
hvcC
=
box_new
(
"hvcC"
);
...
@@ -692,8 +692,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -692,8 +692,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
if
(
i_vps
)
if
(
i_vps
)
{
{
/* Write VPS
without forcing array_completeness
*/
/* Write VPS */
bo_add_8
(
hvcC
,
HEVC_NAL_VPS
);
bo_add_8
(
hvcC
,
HEVC_NAL_VPS
|
(
b_completeness
?
0x80
:
0
)
);
bo_add_16be
(
hvcC
,
i_vps
);
bo_add_16be
(
hvcC
,
i_vps
);
for
(
uint8_t
i
=
0
;
i
<
i_vps
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
i_vps
;
i
++
)
{
p_nal
=
&
rg_vps
[
i
];
p_nal
=
&
rg_vps
[
i
];
...
@@ -703,8 +703,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -703,8 +703,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
}
}
if
(
i_sps
)
{
if
(
i_sps
)
{
/* Write SPS
without forcing array_completeness
*/
/* Write SPS */
bo_add_8
(
hvcC
,
HEVC_NAL_SPS
);
bo_add_8
(
hvcC
,
HEVC_NAL_SPS
|
(
b_completeness
?
0x80
:
0
)
);
bo_add_16be
(
hvcC
,
i_sps
);
bo_add_16be
(
hvcC
,
i_sps
);
for
(
uint8_t
i
=
0
;
i
<
i_sps
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
i_sps
;
i
++
)
{
p_nal
=
&
rg_sps
[
i
];
p_nal
=
&
rg_sps
[
i
];
...
@@ -714,8 +714,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -714,8 +714,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
}
}
if
(
i_pps
)
{
if
(
i_pps
)
{
/* Write PPS
without forcing array_completeness
*/
/* Write PPS */
bo_add_8
(
hvcC
,
HEVC_NAL_PPS
);
bo_add_8
(
hvcC
,
HEVC_NAL_PPS
|
(
b_completeness
?
0x80
:
0
)
);
bo_add_16be
(
hvcC
,
i_pps
);
bo_add_16be
(
hvcC
,
i_pps
);
for
(
uint8_t
i
=
0
;
i
<
i_pps
;
i
++
)
{
for
(
uint8_t
i
=
0
;
i
<
i_pps
;
i
++
)
{
p_nal
=
&
rg_pps
[
i
];
p_nal
=
&
rg_pps
[
i
];
...
@@ -725,8 +725,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -725,8 +725,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
}
}
if
(
i_sei
)
{
if
(
i_sei
)
{
/* Write SEI
without forcing array_completeness
*/
/* Write SEI */
bo_add_8
(
hvcC
,
HEVC_NAL_PREF_SEI
);
bo_add_8
(
hvcC
,
HEVC_NAL_PREF_SEI
|
(
b_completeness
?
0x80
:
0
)
);
bo_add_16be
(
hvcC
,
i_sei
);
bo_add_16be
(
hvcC
,
i_sei
);
for
(
size_t
i
=
0
;
i
<
i_sei
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
i_sei
;
i
++
)
{
p_nal
=
&
p_sei
[
i
];
p_nal
=
&
p_sei
[
i
];
...
@@ -1004,7 +1004,9 @@ static bo_t *GetVideBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
...
@@ -1004,7 +1004,9 @@ static bo_t *GetVideBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
case
VLC_CODEC_H263
:
memcpy
(
fcc
,
"s263"
,
4
);
break
;
case
VLC_CODEC_H263
:
memcpy
(
fcc
,
"s263"
,
4
);
break
;
case
VLC_CODEC_H264
:
memcpy
(
fcc
,
"avc1"
,
4
);
break
;
case
VLC_CODEC_H264
:
memcpy
(
fcc
,
"avc1"
,
4
);
break
;
case
VLC_CODEC_VC1
:
memcpy
(
fcc
,
"vc-1"
,
4
);
break
;
case
VLC_CODEC_VC1
:
memcpy
(
fcc
,
"vc-1"
,
4
);
break
;
case
VLC_CODEC_HEVC
:
memcpy
(
fcc
,
"hvc1"
,
4
);
break
;
/* FIXME: find a way to know if no non-VCL units are in the stream (->hvc1)
* see 14496-15 8.4.1.1.1 */
case
VLC_CODEC_HEVC
:
memcpy
(
fcc
,
"hev1"
,
4
);
break
;
case
VLC_CODEC_YV12
:
memcpy
(
fcc
,
"yv12"
,
4
);
break
;
case
VLC_CODEC_YV12
:
memcpy
(
fcc
,
"yv12"
,
4
);
break
;
case
VLC_CODEC_YUYV
:
memcpy
(
fcc
,
"yuy2"
,
4
);
break
;
case
VLC_CODEC_YUYV
:
memcpy
(
fcc
,
"yuy2"
,
4
);
break
;
default:
default:
...
@@ -1065,7 +1067,8 @@ static bo_t *GetVideBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
...
@@ -1065,7 +1067,8 @@ static bo_t *GetVideBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
break
;
break
;
case
VLC_CODEC_HEVC
:
case
VLC_CODEC_HEVC
:
box_gather
(
vide
,
GetHvcCTag
(
&
p_track
->
fmt
));
/* Write HvcC without forcing VPS/SPS/PPS/SEI array_completeness */
box_gather
(
vide
,
GetHvcCTag
(
&
p_track
->
fmt
,
false
));
break
;
break
;
}
}
...
...
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