mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 15:08:09 +08:00
avformat/avformat: Add FFInputFormat, hide internals of AVInputFormat
This commit does for AVInputFormat what commit 59c9dc82f450638a3068deeb1db5c56f6d155752 did for AVOutputFormat: It adds a new type FFInputFormat, moves all the internals of AVInputFormat to it and adds a now reduced AVInputFormat as first member. This does not affect/improve extensibility of both public or private fields for demuxers (it is still a mess due to lavd). This is possible since 50f34172e0cca2cabc5836308ec66dbf93f5f2a3 (which removed the last usage of an internal field of AVInputFormat in fftools). (Hint: tools/probetest.c accesses the internals of FFInputFormat as well, but given that it is a testing tool this is not considered a problem.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:

committed by
James Almer

parent
bb81c60927
commit
b800327f4c
@ -27,6 +27,7 @@
|
||||
#include "libavutil/opt.h"
|
||||
#include "avio_internal.h"
|
||||
#include "avformat.h"
|
||||
#include "demux.h"
|
||||
#include "internal.h"
|
||||
#include "mux.h"
|
||||
#include "rawenc.h"
|
||||
@ -294,18 +295,18 @@ static const AVClass codec2raw_demux_class = {
|
||||
};
|
||||
|
||||
#if CONFIG_CODEC2_DEMUXER
|
||||
const AVInputFormat ff_codec2_demuxer = {
|
||||
.name = "codec2",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("codec2 .c2 demuxer"),
|
||||
const FFInputFormat ff_codec2_demuxer = {
|
||||
.p.name = "codec2",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("codec2 .c2 demuxer"),
|
||||
.p.extensions = "c2",
|
||||
.p.flags = AVFMT_GENERIC_INDEX,
|
||||
.p.priv_class = &codec2_demux_class,
|
||||
.priv_data_size = sizeof(Codec2Context),
|
||||
.extensions = "c2",
|
||||
.read_probe = codec2_probe,
|
||||
.read_header = codec2_read_header,
|
||||
.read_packet = codec2_read_packet,
|
||||
.read_seek = ff_pcm_read_seek,
|
||||
.flags = AVFMT_GENERIC_INDEX,
|
||||
.raw_codec_id = AV_CODEC_ID_CODEC2,
|
||||
.priv_class = &codec2_demux_class,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -324,15 +325,15 @@ const FFOutputFormat ff_codec2_muxer = {
|
||||
#endif
|
||||
|
||||
#if CONFIG_CODEC2RAW_DEMUXER
|
||||
const AVInputFormat ff_codec2raw_demuxer = {
|
||||
.name = "codec2raw",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("raw codec2 demuxer"),
|
||||
const FFInputFormat ff_codec2raw_demuxer = {
|
||||
.p.name = "codec2raw",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("raw codec2 demuxer"),
|
||||
.p.flags = AVFMT_GENERIC_INDEX,
|
||||
.p.priv_class = &codec2raw_demux_class,
|
||||
.priv_data_size = sizeof(Codec2Context),
|
||||
.read_header = codec2raw_read_header,
|
||||
.read_packet = codec2_read_packet,
|
||||
.read_seek = ff_pcm_read_seek,
|
||||
.flags = AVFMT_GENERIC_INDEX,
|
||||
.raw_codec_id = AV_CODEC_ID_CODEC2,
|
||||
.priv_class = &codec2raw_demux_class,
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user