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 /libavdevice/sdl2.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 'libavdevice/sdl2.c')
-rw-r--r-- | libavdevice/sdl2.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c index a9023153f1..342a253dc0 100644 --- a/libavdevice/sdl2.c +++ b/libavdevice/sdl2.c @@ -33,6 +33,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/time.h" #include "avdevice.h" +#include "libavformat/mux.h" typedef struct { AVClass *class; @@ -355,15 +356,15 @@ static const AVClass sdl2_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -const AVOutputFormat ff_sdl2_muxer = { - .name = "sdl,sdl2", - .long_name = NULL_IF_CONFIG_SMALL("SDL2 output device"), +const FFOutputFormat ff_sdl2_muxer = { + .p.name = "sdl,sdl2", + .p.long_name = NULL_IF_CONFIG_SMALL("SDL2 output device"), .priv_data_size = sizeof(SDLContext), - .audio_codec = AV_CODEC_ID_NONE, - .video_codec = AV_CODEC_ID_RAWVIDEO, + .p.audio_codec = AV_CODEC_ID_NONE, + .p.video_codec = AV_CODEC_ID_RAWVIDEO, .write_header = sdl2_write_header, .write_packet = sdl2_write_packet, .write_trailer = sdl2_write_trailer, - .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, - .priv_class = &sdl2_class, + .p.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, + .p.priv_class = &sdl2_class, }; |