diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-07-16 22:18:12 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-07-17 06:58:37 +0200 |
commit | dfc2c4d900e48fa788ad9364ac408c01cfb62b94 (patch) | |
tree | eafdab4d3a81a427ddf30862f88af6a650eeaef0 /libavformat/movenc.c | |
parent | 62709956677d648cbf340dccd4549fa62142cb7e (diff) | |
download | ffmpeg-dfc2c4d900e48fa788ad9364ac408c01cfb62b94.tar.gz |
lavf: use designated initialisers for all (de)muxers.
It's more readable and less prone to breakage.
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 116 |
1 files changed, 56 insertions, 60 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 12ebef5426..185d89f43a 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2338,16 +2338,15 @@ static int mov_write_trailer(AVFormatContext *s) #if CONFIG_MOV_MUXER AVOutputFormat ff_mov_muxer = { - "mov", - NULL_IF_CONFIG_SMALL("MOV format"), - NULL, - "mov", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "mov", + .long_name = NULL_IF_CONFIG_SMALL("MOV format"), + .extensions = "mov", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_MPEG4, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0}, .priv_class = &mov_muxer_class, @@ -2355,16 +2354,15 @@ AVOutputFormat ff_mov_muxer = { #endif #if CONFIG_TGP_MUXER AVOutputFormat ff_tgp_muxer = { - "3gp", - NULL_IF_CONFIG_SMALL("3GP format"), - NULL, - "3gp", - sizeof(MOVMuxContext), - CODEC_ID_AMR_NB, - CODEC_ID_H263, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "3gp", + .long_name = NULL_IF_CONFIG_SMALL("3GP format"), + .extensions = "3gp", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AMR_NB, + .video_codec = CODEC_ID_H263, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0}, .priv_class = &mov_muxer_class, @@ -2372,16 +2370,16 @@ AVOutputFormat ff_tgp_muxer = { #endif #if CONFIG_MP4_MUXER AVOutputFormat ff_mp4_muxer = { - "mp4", - NULL_IF_CONFIG_SMALL("MP4 format"), - "application/mp4", - "mp4", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "mp4", + .long_name = NULL_IF_CONFIG_SMALL("MP4 format"), + .mime_type = "application/mp4", + .extensions = "mp4", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_MPEG4, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, .priv_class = &mov_muxer_class, @@ -2389,16 +2387,15 @@ AVOutputFormat ff_mp4_muxer = { #endif #if CONFIG_PSP_MUXER AVOutputFormat ff_psp_muxer = { - "psp", - NULL_IF_CONFIG_SMALL("PSP MP4 format"), - NULL, - "mp4,psp", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "psp", + .long_name = NULL_IF_CONFIG_SMALL("PSP MP4 format"), + .extensions = "mp4,psp", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_MPEG4, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, .priv_class = &mov_muxer_class, @@ -2406,16 +2403,15 @@ AVOutputFormat ff_psp_muxer = { #endif #if CONFIG_TG2_MUXER AVOutputFormat ff_tg2_muxer = { - "3g2", - NULL_IF_CONFIG_SMALL("3GP2 format"), - NULL, - "3g2", - sizeof(MOVMuxContext), - CODEC_ID_AMR_NB, - CODEC_ID_H263, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "3g2", + .long_name = NULL_IF_CONFIG_SMALL("3GP2 format"), + .extensions = "3g2", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AMR_NB, + .video_codec = CODEC_ID_H263, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0}, .priv_class = &mov_muxer_class, @@ -2423,16 +2419,16 @@ AVOutputFormat ff_tg2_muxer = { #endif #if CONFIG_IPOD_MUXER AVOutputFormat ff_ipod_muxer = { - "ipod", - NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"), - "application/mp4", - "m4v,m4a", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_H264, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "ipod", + .long_name = NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"), + .mime_type = "application/mp4", + .extensions = "m4v,m4a", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_H264, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_ipod_tags, 0}, .priv_class = &mov_muxer_class, |