diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-01-27 15:06:00 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-02-09 15:24:15 +0100 |
commit | 59c9dc82f450638a3068deeb1db5c56f6d155752 (patch) | |
tree | 936dabca4a3e593553f6e0c8409e530111c99c0c /libavformat/img2enc.c | |
parent | f23ae839fc184c4492e10f371cde5c1b55e51522 (diff) | |
download | ffmpeg-59c9dc82f450638a3068deeb1db5c56f6d155752.tar.gz |
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/img2enc.c')
-rw-r--r-- | libavformat/img2enc.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index c05f37e22b..9b8ec06cea 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -33,6 +33,7 @@ #include "avio_internal.h" #include "internal.h" #include "img2.h" +#include "mux.h" typedef struct VideoMuxData { const AVClass *class; /**< Class for private options. */ @@ -268,30 +269,30 @@ static const AVClass img2mux_class = { .version = LIBAVUTIL_VERSION_INT, }; -const AVOutputFormat ff_image2_muxer = { - .name = "image2", - .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), - .extensions = "bmp,dpx,exr,jls,jpeg,jpg,jxl,ljpg,pam,pbm,pcx,pfm,pgm,pgmyuv,phm," +const FFOutputFormat ff_image2_muxer = { + .p.name = "image2", + .p.long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), + .p.extensions = "bmp,dpx,exr,jls,jpeg,jpg,jxl,ljpg,pam,pbm,pcx,pfm,pgm,pgmyuv,phm," "png,ppm,sgi,tga,tif,tiff,jp2,j2c,j2k,xwd,sun,ras,rs,im1,im8," "im24,sunras,vbn,xbm,xface,pix,y,avif,qoi,hdr,wbmp", .priv_data_size = sizeof(VideoMuxData), - .video_codec = AV_CODEC_ID_MJPEG, + .p.video_codec = AV_CODEC_ID_MJPEG, .write_header = write_header, .write_packet = write_packet, .query_codec = query_codec, - .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE, - .priv_class = &img2mux_class, + .p.flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE, + .p.priv_class = &img2mux_class, }; #endif #if CONFIG_IMAGE2PIPE_MUXER -const AVOutputFormat ff_image2pipe_muxer = { - .name = "image2pipe", - .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"), +const FFOutputFormat ff_image2pipe_muxer = { + .p.name = "image2pipe", + .p.long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"), .priv_data_size = sizeof(VideoMuxData), - .video_codec = AV_CODEC_ID_MJPEG, + .p.video_codec = AV_CODEC_ID_MJPEG, .write_header = write_header, .write_packet = write_packet_pipe, .query_codec = query_codec, - .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS + .p.flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS }; #endif |