mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 03:20:00 +01:00
avformat/avformat: Add FFInputFormat, hide internals of AVInputFormat
This commit does for AVInputFormat what commit59c9dc82f4did 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 since50f34172e0(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
@@ -34,6 +34,7 @@
|
||||
#include "libavutil/channel_layout.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "avformat.h"
|
||||
#include "demux.h"
|
||||
#include "internal.h"
|
||||
|
||||
typedef struct OpenMPTContext {
|
||||
@@ -278,9 +279,15 @@ static const AVClass class_openmpt = {
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
};
|
||||
|
||||
const AVInputFormat ff_libopenmpt_demuxer = {
|
||||
.name = "libopenmpt",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Tracker formats (libopenmpt)"),
|
||||
const FFInputFormat ff_libopenmpt_demuxer = {
|
||||
.p.name = "libopenmpt",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Tracker formats (libopenmpt)"),
|
||||
.p.priv_class = &class_openmpt,
|
||||
#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
|
||||
.p.extensions = "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
|
||||
#else
|
||||
.p.extensions = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
|
||||
#endif
|
||||
.priv_data_size = sizeof(OpenMPTContext),
|
||||
.flags_internal = FF_FMT_INIT_CLEANUP,
|
||||
.read_probe = read_probe_openmpt,
|
||||
@@ -288,10 +295,4 @@ const AVInputFormat ff_libopenmpt_demuxer = {
|
||||
.read_packet = read_packet_openmpt,
|
||||
.read_close = read_close_openmpt,
|
||||
.read_seek = read_seek_openmpt,
|
||||
.priv_class = &class_openmpt,
|
||||
#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
|
||||
.extensions = "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
|
||||
#else
|
||||
.extensions = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user