Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-16 23:09:54 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-21 03:33:09 +0300
commit20f972701806be20a77f808db332d9489343bb78 (patch)
tree8d8b588c0ca06fa652518a5685db8280b0bf532d /libavcodec/mpegaudiodec_float.c
parenta688f3c13ce55c2ba51dbbb344564649f1bb52fe (diff)
avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegaudiodec_float.c')
-rw-r--r--libavcodec/mpegaudiodec_float.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c
index bef4918a90..c4fd64a85f 100644
--- a/libavcodec/mpegaudiodec_float.c
+++ b/libavcodec/mpegaudiodec_float.c
@@ -74,91 +74,91 @@ static const float csa_table[8][4] = {
#include "mpegaudiodec_template.c"
#if CONFIG_MP1FLOAT_DECODER
-const AVCodec ff_mp1float_decoder = {
- .name = "mp1float",
- .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
- .type = AVMEDIA_TYPE_AUDIO,
- .id = AV_CODEC_ID_MP1,
+const FFCodec ff_mp1float_decoder = {
+ .p.name = "mp1float",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
+ .p.type = AVMEDIA_TYPE_AUDIO,
+ .p.id = AV_CODEC_ID_MP1,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.flush = flush,
- .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP2FLOAT_DECODER
-const AVCodec ff_mp2float_decoder = {
- .name = "mp2float",
- .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
- .type = AVMEDIA_TYPE_AUDIO,
- .id = AV_CODEC_ID_MP2,
+const FFCodec ff_mp2float_decoder = {
+ .p.name = "mp2float",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+ .p.type = AVMEDIA_TYPE_AUDIO,
+ .p.id = AV_CODEC_ID_MP2,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.flush = flush,
- .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP3FLOAT_DECODER
-const AVCodec ff_mp3float_decoder = {
- .name = "mp3float",
- .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
- .type = AVMEDIA_TYPE_AUDIO,
- .id = AV_CODEC_ID_MP3,
+const FFCodec ff_mp3float_decoder = {
+ .p.name = "mp3float",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
+ .p.type = AVMEDIA_TYPE_AUDIO,
+ .p.id = AV_CODEC_ID_MP3,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.flush = flush,
- .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP3ADUFLOAT_DECODER
-const AVCodec ff_mp3adufloat_decoder = {
- .name = "mp3adufloat",
- .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
- .type = AVMEDIA_TYPE_AUDIO,
- .id = AV_CODEC_ID_MP3ADU,
+const FFCodec ff_mp3adufloat_decoder = {
+ .p.name = "mp3adufloat",
+ .p.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
+ .p.type = AVMEDIA_TYPE_AUDIO,
+ .p.id = AV_CODEC_ID_MP3ADU,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
- .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.flush = flush,
- .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP3ON4FLOAT_DECODER
-const AVCodec ff_mp3on4float_decoder = {
- .name = "mp3on4float",
- .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
- .type = AVMEDIA_TYPE_AUDIO,
- .id = AV_CODEC_ID_MP3ON4,
+const FFCodec ff_mp3on4float_decoder = {
+ .p.name = "mp3on4float",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
+ .p.type = AVMEDIA_TYPE_AUDIO,
+ .p.id = AV_CODEC_ID_MP3ON4,
.priv_data_size = sizeof(MP3On4DecodeContext),
.init = decode_init_mp3on4,
.close = decode_close_mp3on4,
.decode = decode_frame_mp3on4,
- .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.flush = flush_mp3on4,
- .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
+ .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};