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
4e70104a
Commit
4e70104a
authored
Aug 06, 2014
by
Marek Fort
Committed by
Michael Niedermayer
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/movenc: XMP metadata support.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
054c506e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
movenc.c
libavformat/movenc.c
+21
-0
No files found.
libavformat/movenc.c
View file @
4e70104a
...
...
@@ -2395,6 +2395,26 @@ static int mov_write_meta_tag(AVIOContext *pb, MOVMuxContext *mov,
return
size
;
}
static
int
mov_write_raw_metadata_tag
(
AVFormatContext
*
s
,
AVIOContext
*
pb
,
const
char
*
name
,
const
char
*
key
)
{
int
len
;
AVDictionaryEntry
*
t
;
if
(
!
(
t
=
av_dict_get
(
s
->
metadata
,
key
,
NULL
,
0
)))
return
0
;
len
=
strlen
(
t
->
value
);
if
(
len
>
0
)
{
int
size
=
len
+
8
;
avio_wb32
(
pb
,
size
);
ffio_wfourcc
(
pb
,
name
);
avio_write
(
pb
,
t
->
value
,
len
);
return
size
;
}
return
0
;
}
static
int
ascii_to_wc
(
AVIOContext
*
pb
,
const
uint8_t
*
b
)
{
int
val
;
...
...
@@ -2494,6 +2514,7 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_string_metadata
(
s
,
pb_buf
,
"
\251
cmt"
,
"comment"
,
0
);
mov_write_string_metadata
(
s
,
pb_buf
,
"
\251
gen"
,
"genre"
,
0
);
mov_write_string_metadata
(
s
,
pb_buf
,
"
\251
cpy"
,
"copyright"
,
0
);
mov_write_raw_metadata_tag
(
s
,
pb_buf
,
"XMP_"
,
"xmp"
);
}
else
{
/* iTunes meta data */
mov_write_meta_tag
(
pb_buf
,
mov
,
s
);
...
...
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