Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
794079e8
Commit
794079e8
authored
Sep 21, 2018
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/matroskaenc: implement AVOutputFormat.query_codec for webm
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
14ac62f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
matroska.c
libavformat/matroska.c
+16
-0
matroska.h
libavformat/matroska.h
+1
-0
matroskaenc.c
libavformat/matroskaenc.c
+11
-0
version.h
libavformat/version.h
+1
-1
No files found.
libavformat/matroska.c
View file @
794079e8
...
...
@@ -103,6 +103,22 @@ const CodecTags ff_mkv_codec_tags[]={
{
""
,
AV_CODEC_ID_NONE
}
};
const
CodecTags
ff_webm_codec_tags
[]
=
{
{
"V_VP8"
,
AV_CODEC_ID_VP8
},
{
"V_VP9"
,
AV_CODEC_ID_VP9
},
{
"V_AV1"
,
AV_CODEC_ID_AV1
},
{
"A_VORBIS"
,
AV_CODEC_ID_VORBIS
},
{
"A_OPUS"
,
AV_CODEC_ID_OPUS
},
{
"D_WEBVTT/SUBTITLES"
,
AV_CODEC_ID_WEBVTT
},
{
"D_WEBVTT/CAPTIONS"
,
AV_CODEC_ID_WEBVTT
},
{
"D_WEBVTT/DESCRIPTIONS"
,
AV_CODEC_ID_WEBVTT
},
{
"D_WEBVTT/METADATA"
,
AV_CODEC_ID_WEBVTT
},
{
""
,
AV_CODEC_ID_NONE
}
};
const
CodecMime
ff_mkv_image_mime_tags
[]
=
{
{
"image/gif"
,
AV_CODEC_ID_GIF
},
{
"image/jpeg"
,
AV_CODEC_ID_MJPEG
},
...
...
libavformat/matroska.h
View file @
794079e8
...
...
@@ -360,6 +360,7 @@ typedef struct CodecTags{
#define MATROSKA_VIDEO_STEREO_PLANE_COUNT 3
extern
const
CodecTags
ff_mkv_codec_tags
[];
extern
const
CodecTags
ff_webm_codec_tags
[];
extern
const
CodecMime
ff_mkv_mime_tags
[];
extern
const
CodecMime
ff_mkv_image_mime_tags
[];
extern
const
AVMetadataConv
ff_mkv_metadata_conv
[];
...
...
libavformat/matroskaenc.c
View file @
794079e8
...
...
@@ -2680,6 +2680,16 @@ static int mkv_query_codec(enum AVCodecID codec_id, int std_compliance)
return
0
;
}
static
int
webm_query_codec
(
enum
AVCodecID
codec_id
,
int
std_compliance
)
{
int
i
;
for
(
i
=
0
;
ff_webm_codec_tags
[
i
].
id
!=
AV_CODEC_ID_NONE
;
i
++
)
if
(
ff_webm_codec_tags
[
i
].
id
==
codec_id
)
return
1
;
return
0
;
}
static
int
mkv_init
(
struct
AVFormatContext
*
s
)
{
int
i
;
...
...
@@ -2832,6 +2842,7 @@ AVOutputFormat ff_webm_muxer = {
.
write_header
=
mkv_write_header
,
.
write_packet
=
mkv_write_flush_packet
,
.
write_trailer
=
mkv_write_trailer
,
.
query_codec
=
webm_query_codec
,
.
check_bitstream
=
mkv_check_bitstream
,
.
flags
=
AVFMT_GLOBALHEADER
|
AVFMT_VARIABLE_FPS
|
AVFMT_TS_NONSTRICT
|
AVFMT_ALLOW_FLUSH
,
...
...
libavformat/version.h
View file @
794079e8
...
...
@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 18
#define LIBAVFORMAT_VERSION_MICRO 10
2
#define LIBAVFORMAT_VERSION_MICRO 10
3
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
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