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
d72aef4e
Commit
d72aef4e
authored
Aug 21, 2012
by
bbraun
Committed by
Michael Niedermayer
Oct 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: add more metadata types
Fixes Ticket1052 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ac090fa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
movenc.c
libavformat/movenc.c
+23
-0
No files found.
libavformat/movenc.c
View file @
d72aef4e
...
...
@@ -2012,6 +2012,24 @@ static int mov_write_trkn_tag(AVIOContext *pb, MOVMuxContext *mov,
return
size
;
}
static
int
mov_write_int8_metadata
(
AVFormatContext
*
s
,
AVIOContext
*
pb
,
const
char
*
name
,
const
char
*
tag
,
int
len
)
{
AVDictionaryEntry
*
t
=
NULL
;
uint8_t
num
;
if
(
!
(
t
=
av_dict_get
(
s
->
metadata
,
tag
,
NULL
,
0
)))
return
0
;
num
=
t
?
atoi
(
t
->
value
)
:
0
;
avio_wb32
(
pb
,
len
+
8
);
ffio_wfourcc
(
pb
,
name
);
if
(
len
==
4
)
avio_wb32
(
pb
,
num
);
else
avio_w8
(
pb
,
num
);
return
len
+
8
;
}
/* iTunes meta data list */
static
int
mov_write_ilst_tag
(
AVIOContext
*
pb
,
MOVMuxContext
*
mov
,
AVFormatContext
*
s
)
...
...
@@ -2036,6 +2054,11 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_string_metadata
(
s
,
pb
,
"tvsh"
,
"show"
,
1
);
mov_write_string_metadata
(
s
,
pb
,
"tven"
,
"episode_id"
,
1
);
mov_write_string_metadata
(
s
,
pb
,
"tvnn"
,
"network"
,
1
);
mov_write_int8_metadata
(
s
,
pb
,
"tves"
,
"episode_sort"
,
4
);
mov_write_int8_metadata
(
s
,
pb
,
"tvsn"
,
"season_number"
,
4
);
mov_write_int8_metadata
(
s
,
pb
,
"stik"
,
"media_type"
,
1
);
mov_write_int8_metadata
(
s
,
pb
,
"hdvd"
,
"hd_video"
,
1
);
mov_write_int8_metadata
(
s
,
pb
,
"pgap"
,
"gapless_playback"
,
1
);
mov_write_trkn_tag
(
pb
,
mov
,
s
);
mov_write_tmpo_tag
(
pb
,
s
);
return
update_size
(
pb
,
pos
);
...
...
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