summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-01-27 15:06:00 +0100
committerAnton Khirnov <anton@khirnov.net>2023-02-09 15:24:15 +0100
commit59c9dc82f450638a3068deeb1db5c56f6d155752 (patch)
tree936dabca4a3e593553f6e0c8409e530111c99c0c /libavformat/matroskaenc.c
parentf23ae839fc184c4492e10f371cde5c1b55e51522 (diff)
avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit 20f972701806be20a77f808db332d9489343bb78 did for AVCodec: It adds a new type FFOutputFormat, moves all the internals of AVOutputFormat to it and adds a now reduced AVOutputFormat as first member. This does not affect/improve extensibility of both public or private fields for muxers (it is still a mess due to lavd). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 2deb4284e8..113541bd9a 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -3321,31 +3321,31 @@ static int mkv_query_codec(enum AVCodecID codec_id, int std_compliance)
return 0;
}
-const AVOutputFormat ff_matroska_muxer = {
- .name = "matroska",
- .long_name = NULL_IF_CONFIG_SMALL("Matroska"),
- .mime_type = "video/x-matroska",
- .extensions = "mkv",
+const FFOutputFormat ff_matroska_muxer = {
+ .p.name = "matroska",
+ .p.long_name = NULL_IF_CONFIG_SMALL("Matroska"),
+ .p.mime_type = "video/x-matroska",
+ .p.extensions = "mkv",
.priv_data_size = sizeof(MatroskaMuxContext),
- .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
+ .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
- .video_codec = CONFIG_LIBX264_ENCODER ?
+ .p.video_codec = CONFIG_LIBX264_ENCODER ?
AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
.init = mkv_init,
.deinit = mkv_deinit,
.write_header = mkv_write_header,
.write_packet = mkv_write_flush_packet,
.write_trailer = mkv_write_trailer,
- .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
+ .p.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
- .codec_tag = (const AVCodecTag* const []){
+ .p.codec_tag = (const AVCodecTag* const []){
ff_codec_bmp_tags, ff_codec_wav_tags,
additional_audio_tags, additional_video_tags, additional_subtitle_tags, 0
},
- .subtitle_codec = AV_CODEC_ID_ASS,
+ .p.subtitle_codec = AV_CODEC_ID_ASS,
.query_codec = mkv_query_codec,
.check_bitstream = mkv_check_bitstream,
- .priv_class = &matroska_webm_class,
+ .p.priv_class = &matroska_webm_class,
};
#endif
@@ -3359,15 +3359,15 @@ static int webm_query_codec(enum AVCodecID codec_id, int std_compliance)
return 0;
}
-const AVOutputFormat ff_webm_muxer = {
- .name = "webm",
- .long_name = NULL_IF_CONFIG_SMALL("WebM"),
- .mime_type = "video/webm",
- .extensions = "webm",
+const FFOutputFormat ff_webm_muxer = {
+ .p.name = "webm",
+ .p.long_name = NULL_IF_CONFIG_SMALL("WebM"),
+ .p.mime_type = "video/webm",
+ .p.extensions = "webm",
.priv_data_size = sizeof(MatroskaMuxContext),
- .audio_codec = CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : AV_CODEC_ID_VORBIS,
- .video_codec = CONFIG_LIBVPX_VP9_ENCODER? AV_CODEC_ID_VP9 : AV_CODEC_ID_VP8,
- .subtitle_codec = AV_CODEC_ID_WEBVTT,
+ .p.audio_codec = CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : AV_CODEC_ID_VORBIS,
+ .p.video_codec = CONFIG_LIBVPX_VP9_ENCODER? AV_CODEC_ID_VP9 : AV_CODEC_ID_VP8,
+ .p.subtitle_codec = AV_CODEC_ID_WEBVTT,
.init = mkv_init,
.deinit = mkv_deinit,
.write_header = mkv_write_header,
@@ -3375,33 +3375,33 @@ const AVOutputFormat ff_webm_muxer = {
.write_trailer = mkv_write_trailer,
.query_codec = webm_query_codec,
.check_bitstream = mkv_check_bitstream,
- .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
+ .p.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
- .priv_class = &matroska_webm_class,
+ .p.priv_class = &matroska_webm_class,
};
#endif
#if CONFIG_MATROSKA_AUDIO_MUXER
-const AVOutputFormat ff_matroska_audio_muxer = {
- .name = "matroska",
- .long_name = NULL_IF_CONFIG_SMALL("Matroska Audio"),
- .mime_type = "audio/x-matroska",
- .extensions = "mka",
+const FFOutputFormat ff_matroska_audio_muxer = {
+ .p.name = "matroska",
+ .p.long_name = NULL_IF_CONFIG_SMALL("Matroska Audio"),
+ .p.mime_type = "audio/x-matroska",
+ .p.extensions = "mka",
.priv_data_size = sizeof(MatroskaMuxContext),
- .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
+ .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
- .video_codec = AV_CODEC_ID_NONE,
+ .p.video_codec = AV_CODEC_ID_NONE,
.init = mkv_init,
.deinit = mkv_deinit,
.write_header = mkv_write_header,
.write_packet = mkv_write_flush_packet,
.write_trailer = mkv_write_trailer,
.check_bitstream = mkv_check_bitstream,
- .flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT |
+ .p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT |
AVFMT_ALLOW_FLUSH,
- .codec_tag = (const AVCodecTag* const []){
+ .p.codec_tag = (const AVCodecTag* const []){
ff_codec_wav_tags, additional_audio_tags, 0
},
- .priv_class = &matroska_webm_class,
+ .p.priv_class = &matroska_webm_class,
};
#endif