Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
37cc1c1e
Commit
37cc1c1e
authored
Apr 25, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/matroskaenc: add support for writing Content Light Level elements
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
095147ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
matroskaenc.c
libavformat/matroskaenc.c
+13
-2
No files found.
libavformat/matroskaenc.c
View file @
37cc1c1e
...
...
@@ -844,8 +844,7 @@ static int mkv_write_video_color(AVIOContext *pb, AVCodecParameters *par, AVStre
uint8_t
*
colorinfo_ptr
;
int
side_data_size
=
0
;
int
ret
,
colorinfo_size
;
const
uint8_t
*
side_data
=
av_stream_get_side_data
(
st
,
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
,
&
side_data_size
);
const
uint8_t
*
side_data
;
ret
=
avio_open_dyn_buf
(
&
dyn_cp
);
if
(
ret
<
0
)
...
...
@@ -876,6 +875,18 @@ static int mkv_write_video_color(AVIOContext *pb, AVCodecParameters *par, AVStre
put_ebml_uint
(
dyn_cp
,
MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ
,
(
xpos
>>
7
)
+
1
);
put_ebml_uint
(
dyn_cp
,
MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT
,
(
ypos
>>
7
)
+
1
);
}
side_data
=
av_stream_get_side_data
(
st
,
AV_PKT_DATA_CONTENT_LIGHT_LEVEL
,
&
side_data_size
);
if
(
side_data_size
)
{
const
AVContentLightMetadata
*
metadata
=
(
const
AVContentLightMetadata
*
)
side_data
;
put_ebml_uint
(
dyn_cp
,
MATROSKA_ID_VIDEOCOLORMAXCLL
,
metadata
->
MaxCLL
);
put_ebml_uint
(
dyn_cp
,
MATROSKA_ID_VIDEOCOLORMAXFALL
,
metadata
->
MaxFALL
);
}
side_data
=
av_stream_get_side_data
(
st
,
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
,
&
side_data_size
);
if
(
side_data_size
==
sizeof
(
AVMasteringDisplayMetadata
))
{
ebml_master
meta_element
=
start_ebml_master
(
dyn_cp
,
MATROSKA_ID_VIDEOCOLORMASTERINGMETA
,
0
);
...
...
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