1
0

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>
This commit is contained in:
Andreas Rheinhardt 2022-03-16 21:09:54 +01:00
parent a688f3c13c
commit 20f9727018
513 changed files with 5330 additions and 5260 deletions

6
configure vendored
View File

@ -3985,8 +3985,8 @@ OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c o
INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c indev)
MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat libavformat/allformats.c)
ENCODER_LIST=$(find_things_extern encoder AVCodec libavcodec/allcodecs.c)
DECODER_LIST=$(find_things_extern decoder AVCodec libavcodec/allcodecs.c)
ENCODER_LIST=$(find_things_extern encoder FFCodec libavcodec/allcodecs.c)
DECODER_LIST=$(find_things_extern decoder FFCodec libavcodec/allcodecs.c)
CODEC_LIST="
$ENCODER_LIST
$DECODER_LIST
@ -7867,7 +7867,7 @@ print_enabled_components(){
}
print_enabled_components libavfilter/filter_list.c AVFilter filter_list $FILTER_LIST
print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
print_enabled_components libavcodec/codec_list.c FFCodec codec_list $CODEC_LIST
print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST
print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $DEMUXER_LIST

View File

@ -145,13 +145,13 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
return avpkt->size;
}
const AVCodec ff_zero12v_decoder = {
.name = "012v",
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_012V,
const FFCodec ff_zero12v_decoder = {
.p.name = "012v",
.p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_012V,
.init = zero12v_decode_init,
.decode = zero12v_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -1027,15 +1027,15 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_fourxm_decoder = {
.name = "4xm",
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_4XM,
const FFCodec ff_fourxm_decoder = {
.p.name = "4xm",
.p.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_4XM,
.priv_data_size = sizeof(FourXContext),
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};

View File

@ -174,14 +174,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_eightbps_decoder = {
.name = "8bps",
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_8BPS,
const FFCodec ff_eightbps_decoder = {
.p.name = "8bps",
.p.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_8BPS,
.priv_data_size = sizeof(EightBpsContext),
.init = decode_init,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -188,33 +188,33 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
}
#if CONFIG_EIGHTSVX_FIB_DECODER
const AVCodec ff_eightsvx_fib_decoder = {
.name = "8svx_fib",
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_8SVX_FIB,
const FFCodec ff_eightsvx_fib_decoder = {
.p.name = "8svx_fib",
.p.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_8SVX_FIB,
.priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init,
.decode = eightsvx_decode_frame,
.close = eightsvx_decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
.p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_EIGHTSVX_EXP_DECODER
const AVCodec ff_eightsvx_exp_decoder = {
.name = "8svx_exp",
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_8SVX_EXP,
const FFCodec ff_eightsvx_exp_decoder = {
.p.name = "8svx_exp",
.p.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_8SVX_EXP,
.priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init,
.decode = eightsvx_decode_frame,
.close = eightsvx_decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
.p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -393,32 +393,32 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
#if CONFIG_A64MULTI_ENCODER
const AVCodec ff_a64multi_encoder = {
.name = "a64multi",
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_A64_MULTI,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
const FFCodec ff_a64multi_encoder = {
.p.name = "a64multi",
.p.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_A64_MULTI,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.priv_data_size = sizeof(A64Context),
.init = a64multi_encode_init,
.encode2 = a64multi_encode_frame,
.close = a64multi_close_encoder,
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_A64MULTI5_ENCODER
const AVCodec ff_a64multi5_encoder = {
.name = "a64multi5",
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_A64_MULTI5,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
const FFCodec ff_a64multi5_encoder = {
.p.name = "a64multi5",
.p.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_A64_MULTI5,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.priv_data_size = sizeof(A64Context),
.init = a64multi_encode_init,
.encode2 = a64multi_encode_frame,
.close = a64multi_close_encoder,
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif

View File

@ -552,27 +552,27 @@ static av_cold int latm_decode_init(AVCodecContext *avctx)
return ret;
}
const AVCodec ff_aac_decoder = {
.name = "aac",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AAC,
const FFCodec ff_aac_decoder = {
.p.name = "aac",
.p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_decode_init,
.close = aac_decode_close,
.decode = aac_decode_frame,
.sample_fmts = (const enum AVSampleFormat[]) {
.p.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
},
.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = aac_channel_layout,
.p.channel_layouts = aac_channel_layout,
#endif
.ch_layouts = aac_ch_layout,
.p.ch_layouts = aac_ch_layout,
.flush = flush,
.priv_class = &aac_decoder_class,
.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
.p.priv_class = &aac_decoder_class,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
};
/*
@ -580,24 +580,24 @@ const AVCodec ff_aac_decoder = {
in MPEG transport streams which only contain one program.
To do a more complex LATM demuxing a separate LATM demuxer should be used.
*/
const AVCodec ff_aac_latm_decoder = {
.name = "aac_latm",
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AAC_LATM,
const FFCodec ff_aac_latm_decoder = {
.p.name = "aac_latm",
.p.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AAC_LATM,
.priv_data_size = sizeof(struct LATMContext),
.init = latm_decode_init,
.close = aac_decode_close,
.decode = latm_decode_frame,
.sample_fmts = (const enum AVSampleFormat[]) {
.p.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
},
.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = aac_channel_layout,
.p.channel_layouts = aac_channel_layout,
#endif
.ch_layouts = aac_ch_layout,
.p.ch_layouts = aac_ch_layout,
.flush = flush,
.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
.p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
};

View File

@ -450,24 +450,24 @@ static void apply_independent_coupling_fixed(AACContext *ac,
#include "aacdec_template.c"
const AVCodec ff_aac_fixed_decoder = {
.name = "aac_fixed",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AAC,
const FFCodec ff_aac_fixed_decoder = {
.p.name = "aac_fixed",
.p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_decode_init,
.close = aac_decode_close,
.decode = aac_decode_frame,
.sample_fmts = (const enum AVSampleFormat[]) {
.p.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_NONE
},
.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = aac_channel_layout,
.p.channel_layouts = aac_channel_layout,
#endif
.ch_layouts = aac_ch_layout,
.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
.p.ch_layouts = aac_ch_layout,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
.flush = flush,
};

View File

@ -1137,20 +1137,20 @@ static const AVCodecDefault aac_encode_defaults[] = {
{ NULL }
};
const AVCodec ff_aac_encoder = {
.name = "aac",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AAC,
const FFCodec ff_aac_encoder = {
.p.name = "aac",
.p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACEncContext),
.init = aac_encode_init,
.encode2 = aac_encode_frame,
.close = aac_encode_end,
.defaults = aac_encode_defaults,
.supported_samplerates = ff_mpeg4audio_sample_rates,
.p.supported_samplerates = ff_mpeg4audio_sample_rates,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
.p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.priv_class = &aacenc_class,
.p.priv_class = &aacenc_class,
};

View File

@ -150,15 +150,15 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_aasc_decoder = {
.name = "aasc",
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_AASC,
const FFCodec ff_aasc_decoder = {
.p.name = "aasc",
.p.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_AASC,
.priv_data_size = sizeof(AascContext),
.init = aasc_decode_init,
.close = aasc_decode_end,
.decode = aasc_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -169,19 +169,19 @@ static const AVClass ac3_decoder_class = {
.version = LIBAVUTIL_VERSION_INT,
};
const AVCodec ff_ac3_fixed_decoder = {
.name = "ac3_fixed",
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AC3,
const FFCodec ff_ac3_fixed_decoder = {
.p.name = "ac3_fixed",
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AC3,
.p.priv_class = &ac3_decoder_class,
.priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
.priv_class = &ac3_decoder_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};

View File

@ -59,38 +59,38 @@ static const AVClass ac3_eac3_decoder_class = {
.version = LIBAVUTIL_VERSION_INT,
};
const AVCodec ff_ac3_decoder = {
.name = "ac3",
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AC3,
const FFCodec ff_ac3_decoder = {
.p.name = "ac3",
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.priv_class = &ac3_eac3_decoder_class,
.p.priv_class = &ac3_eac3_decoder_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
#if CONFIG_EAC3_DECODER
const AVCodec ff_eac3_decoder = {
.name = "eac3",
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_EAC3,
const FFCodec ff_eac3_decoder = {
.p.name = "eac3",
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_EAC3,
.priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.priv_class = &ac3_eac3_decoder_class,
.p.priv_class = &ac3_eac3_decoder_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
#endif

View File

@ -120,25 +120,25 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
FF_DISABLE_DEPRECATION_WARNINGS
const AVCodec ff_ac3_fixed_encoder = {
.name = "ac3_fixed",
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AC3,
.capabilities = AV_CODEC_CAP_DR1,
const FFCodec ff_ac3_fixed_encoder = {
.p.name = "ac3_fixed",
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AC3,
.p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ac3_fixed_encode_init,
.encode2 = ff_ac3_fixed_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
.priv_class = &ff_ac3enc_class,
.p.priv_class = &ff_ac3enc_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
.supported_samplerates = ff_ac3_sample_rate_tab,
.p.supported_samplerates = ff_ac3_sample_rate_tab,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = ff_ac3_channel_layouts,
.p.channel_layouts = ff_ac3_channel_layouts,
#endif
.ch_layouts = ff_ac3_ch_layouts,
.p.ch_layouts = ff_ac3_ch_layouts,
.defaults = ff_ac3_enc_defaults,
};
FF_ENABLE_DEPRECATION_WARNINGS

View File

@ -124,24 +124,24 @@ av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
}
FF_DISABLE_DEPRECATION_WARNINGS
const AVCodec ff_ac3_encoder = {
.name = "ac3",
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AC3,
.capabilities = AV_CODEC_CAP_DR1,
const FFCodec ff_ac3_encoder = {
.p.name = "ac3",
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AC3,
.p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_float_encode_init,
.encode2 = ff_ac3_float_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.priv_class = &ff_ac3enc_class,
.supported_samplerates = ff_ac3_sample_rate_tab,
.p.priv_class = &ff_ac3enc_class,
.p.supported_samplerates = ff_ac3_sample_rate_tab,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = ff_ac3_channel_layouts,
.p.channel_layouts = ff_ac3_channel_layouts,
#endif
.ch_layouts = ff_ac3_ch_layouts,
.p.ch_layouts = ff_ac3_ch_layouts,
.defaults = ff_ac3_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};

View File

@ -2286,17 +2286,17 @@ static const enum AVSampleFormat sample_fmts_both[] = { AV_SAMPLE_FMT_S16,
#define ADPCM_DECODER_0(id_, sample_fmts_, name_, long_name_)
#define ADPCM_DECODER_1(id_, sample_fmts_, name_, long_name_) \
const AVCodec ff_ ## name_ ## _decoder = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.type = AVMEDIA_TYPE_AUDIO, \
.id = id_, \
const FFCodec ff_ ## name_ ## _decoder = { \
.p.name = #name_, \
.p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.p.type = AVMEDIA_TYPE_AUDIO, \
.p.id = id_, \
.p.capabilities = AV_CODEC_CAP_DR1, \
.p.sample_fmts = sample_fmts_, \
.priv_data_size = sizeof(ADPCMDecodeContext), \
.init = adpcm_decode_init, \
.decode = adpcm_decode_frame, \
.flush = adpcm_flush, \
.capabilities = AV_CODEC_CAP_DR1, \
.sample_fmts = sample_fmts_, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
};
#define ADPCM_DECODER_2(enabled, codec_id, name, sample_fmts, long_name) \

View File

@ -996,20 +996,20 @@ static const AVClass adpcm_encoder_class = {
#define ADPCM_ENCODER_0(id_, name_, sample_fmts_, capabilities_, long_name_)
#define ADPCM_ENCODER_1(id_, name_, sample_fmts_, capabilities_, long_name_) \
const AVCodec ff_ ## name_ ## _encoder = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.type = AVMEDIA_TYPE_AUDIO, \
.id = id_, \
const FFCodec ff_ ## name_ ## _encoder = { \
.p.name = #name_, \
.p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.p.type = AVMEDIA_TYPE_AUDIO, \
.p.id = id_, \
.p.sample_fmts = sample_fmts_, \
.p.ch_layouts = ch_layouts, \
.p.capabilities = capabilities_ | AV_CODEC_CAP_DR1, \
.p.priv_class = &adpcm_encoder_class, \
.priv_data_size = sizeof(ADPCMEncodeContext), \
.init = adpcm_encode_init, \
.encode2 = adpcm_encode_frame, \
.close = adpcm_encode_close, \
.sample_fmts = sample_fmts_, \
.ch_layouts = ch_layouts, \
.capabilities = capabilities_ | AV_CODEC_CAP_DR1, \
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \
.priv_class = &adpcm_encoder_class, \
};
#define ADPCM_ENCODER_2(enabled, codec_id, name, sample_fmts, capabilities, long_name) \
ADPCM_ENCODER_ ## enabled(codec_id, name, sample_fmts, capabilities, long_name)

View File

@ -191,18 +191,18 @@ static void adx_decode_flush(AVCodecContext *avctx)
c->eof = 0;
}
const AVCodec ff_adpcm_adx_decoder = {
.name = "adpcm_adx",
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_ADPCM_ADX,
const FFCodec ff_adpcm_adx_decoder = {
.p.name = "adpcm_adx",
.p.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_ADPCM_ADX,
.priv_data_size = sizeof(ADXContext),
.init = adx_decode_init,
.decode = adx_decode_frame,
.flush = adx_decode_flush,
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -189,16 +189,16 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
return 0;
}
const AVCodec ff_adpcm_adx_encoder = {
.name = "adpcm_adx",
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_ADPCM_ADX,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
const FFCodec ff_adpcm_adx_encoder = {
.p.name = "adpcm_adx",
.p.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_ADPCM_ADX,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.priv_data_size = sizeof(ADXContext),
.init = adx_encode_init,
.encode2 = adx_encode_frame,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -1286,17 +1286,17 @@ static av_cold int decode_close(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_agm_decoder = {
.name = "agm",
.long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_AGM,
const FFCodec ff_agm_decoder = {
.p.name = "agm",
.p.long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_AGM,
.p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(AGMContext),
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
.flush = decode_flush,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP |
FF_CODEC_CAP_EXPORTS_CROPPING,

View File

@ -495,15 +495,15 @@ static av_cold int aic_decode_close(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_aic_decoder = {
.name = "aic",
.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_AIC,
const FFCodec ff_aic_decoder = {
.p.name = "aic",
.p.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_AIC,
.priv_data_size = sizeof(AICContext),
.init = aic_decode_init,
.close = aic_decode_close,
.decode = aic_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -611,16 +611,16 @@ static const AVClass alac_class = {
.version = LIBAVUTIL_VERSION_INT,
};
const AVCodec ff_alac_decoder = {
.name = "alac",
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_ALAC,
const FFCodec ff_alac_decoder = {
.p.name = "alac",
.p.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_ALAC,
.priv_data_size = sizeof(ALACContext),
.init = alac_decode_init,
.close = alac_decode_close,
.decode = alac_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
.priv_class = &alac_class
.p.priv_class = &alac_class
};

View File

@ -649,22 +649,22 @@ static const AVClass alacenc_class = {
};
FF_DISABLE_DEPRECATION_WARNINGS
const AVCodec ff_alac_encoder = {
.name = "alac",
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_ALAC,
const FFCodec ff_alac_encoder = {
.p.name = "alac",
.p.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_ALAC,
.priv_data_size = sizeof(AlacEncodeContext),
.priv_class = &alacenc_class,
.p.priv_class = &alacenc_class,
.init = alac_encode_init,
.encode2 = alac_encode_frame,
.close = alac_encode_close,
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
.p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = alac_channel_layouts,
.p.channel_layouts = alac_channel_layouts,
#endif
.ch_layouts = ff_alac_ch_layouts,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
.p.ch_layouts = ff_alac_ch_layouts,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,

View File

@ -23,6 +23,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#define ALIAS_HEADER_SIZE 10
@ -121,11 +122,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return avpkt->size;
}
const AVCodec ff_alias_pix_decoder = {
.name = "alias_pix",
.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ALIAS_PIX,
const FFCodec ff_alias_pix_decoder = {
.p.name = "alias_pix",
.p.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ALIAS_PIX,
.p.capabilities = AV_CODEC_CAP_DR1,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
};

View File

@ -23,6 +23,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"
#define ALIAS_HEADER_SIZE 10
@ -100,13 +101,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
const AVCodec ff_alias_pix_encoder = {
.name = "alias_pix",
.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ALIAS_PIX,
const FFCodec ff_alias_pix_encoder = {
.p.name = "alias_pix",
.p.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ALIAS_PIX,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) {
.p.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_BGR24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
},
};

File diff suppressed because it is too large Load Diff

View File

@ -2176,16 +2176,16 @@ static av_cold void flush(AVCodecContext *avctx)
}
const AVCodec ff_als_decoder = {
.name = "als",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_MP4ALS,
const FFCodec ff_als_decoder = {
.p.name = "als",
.p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_MP4ALS,
.priv_data_size = sizeof(ALSDecContext),
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
.flush = flush,
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};

View File

@ -378,21 +378,21 @@ static const AVClass h264_amf_class = {
.version = LIBAVUTIL_VERSION_INT,
};
const AVCodec ff_h264_amf_encoder = {
.name = "h264_amf",
.long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H264,
const FFCodec ff_h264_amf_encoder = {
.p.name = "h264_amf",
.p.long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_H264,
.init = amf_encode_init_h264,
.receive_packet = ff_amf_receive_packet,
.close = ff_amf_encode_close,
.priv_data_size = sizeof(AmfContext),
.priv_class = &h264_amf_class,
.p.priv_class = &h264_amf_class,
.defaults = defaults,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = ff_amf_pix_fmts,
.wrapper_name = "amf",
.p.pix_fmts = ff_amf_pix_fmts,
.p.wrapper_name = "amf",
.hw_configs = ff_amfenc_hw_configs,
};

View File

@ -310,21 +310,21 @@ static const AVClass hevc_amf_class = {
.version = LIBAVUTIL_VERSION_INT,
};
const AVCodec ff_hevc_amf_encoder = {
.name = "hevc_amf",
.long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_HEVC,
const FFCodec ff_hevc_amf_encoder = {
.p.name = "hevc_amf",
.p.long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_HEVC,
.init = amf_encode_init_hevc,
.receive_packet = ff_amf_receive_packet,
.close = ff_amf_encode_close,
.priv_data_size = sizeof(AmfContext),
.priv_class = &hevc_amf_class,
.p.priv_class = &hevc_amf_class,
.defaults = defaults,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = ff_amf_pix_fmts,
.wrapper_name = "amf",
.p.pix_fmts = ff_amf_pix_fmts,
.p.wrapper_name = "amf",
.hw_configs = ff_amfenc_hw_configs,
};

View File

@ -1097,16 +1097,16 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
}
const AVCodec ff_amrnb_decoder = {
.name = "amrnb",
.long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AMR_NB,
const FFCodec ff_amrnb_decoder = {
.p.name = "amrnb",
.p.long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AMR_NB,
.priv_data_size = sizeof(AMRChannelsContext),
.init = amrnb_decode_init,
.decode = amrnb_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -1293,16 +1293,16 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
return avpkt->size;
}
const AVCodec ff_amrwb_decoder = {
.name = "amrwb",
.long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AMR_WB,
const FFCodec ff_amrwb_decoder = {
.p.name = "amrwb",
.p.long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AMR_WB,
.priv_data_size = sizeof(AMRWBChannelsContext),
.init = amrwb_decode_init,
.decode = amrwb_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -190,15 +190,15 @@ static av_cold int decode_end(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_anm_decoder = {
.name = "anm",
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ANM,
const FFCodec ff_anm_decoder = {
.p.name = "anm",
.p.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ANM,
.priv_data_size = sizeof(AnmContext),
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

View File

@ -481,16 +481,16 @@ static const AVCodecDefault ansi_defaults[] = {
{ NULL },
};
const AVCodec ff_ansi_decoder = {
.name = "ansi",
.long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ANSI,
const FFCodec ff_ansi_decoder = {
.p.name = "ansi",
.p.long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ANSI,
.priv_data_size = sizeof(AnsiContext),
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
.defaults = ansi_defaults,
};

View File

@ -1659,22 +1659,22 @@ static const AVClass ape_decoder_class = {
.version = LIBAVUTIL_VERSION_INT,
};
const AVCodec ff_ape_decoder = {
.name = "ape",
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_APE,
const FFCodec ff_ape_decoder = {
.p.name = "ape",
.p.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_APE,
.priv_data_size = sizeof(APEContext),
.init = ape_decode_init,
.close = ape_decode_close,
.decode = ape_decode_frame,
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
.flush = ape_flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
.priv_class = &ape_decoder_class,
.p.priv_class = &ape_decoder_class,
};

View File

@ -175,41 +175,41 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data,
}
#if CONFIG_APTX_DECODER
const AVCodec ff_aptx_decoder = {
.name = "aptx",
.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_APTX,
const FFCodec ff_aptx_decoder = {
.p.name = "aptx",
.p.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_APTX,
.priv_data_size = sizeof(AptXContext),
.init = ff_aptx_init,
.decode = aptx_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
};
#endif
#if CONFIG_APTX_HD_DECODER
const AVCodec ff_aptx_hd_decoder = {
.name = "aptx_hd",
.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_APTX_HD,
const FFCodec ff_aptx_hd_decoder = {
.p.name = "aptx_hd",
.p.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_APTX_HD,
.priv_data_size = sizeof(AptXContext),
.init = ff_aptx_init,
.decode = aptx_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
};
#endif

View File

@ -245,45 +245,45 @@ static av_cold int aptx_close(AVCodecContext *avctx)
}
#if CONFIG_APTX_ENCODER
const AVCodec ff_aptx_encoder = {
.name = "aptx",
.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_APTX,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
const FFCodec ff_aptx_encoder = {
.p.name = "aptx",
.p.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_APTX,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
.priv_data_size = sizeof(AptXContext),
.init = ff_aptx_init,
.encode2 = aptx_encode_frame,
.close = aptx_close,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
.p.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
};
#endif
#if CONFIG_APTX_HD_ENCODER
const AVCodec ff_aptx_hd_encoder = {
.name = "aptx_hd",
.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_APTX_HD,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
const FFCodec ff_aptx_hd_encoder = {
.p.name = "aptx_hd",
.p.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_APTX_HD,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
.priv_data_size = sizeof(AptXContext),
.init = ff_aptx_init,
.encode2 = aptx_encode_frame,
.close = aptx_close,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
.p.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
};
#endif

View File

@ -212,16 +212,16 @@ static av_cold int decode_close(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_arbc_decoder = {
.name = "arbc",
.long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ARBC,
const FFCodec ff_arbc_decoder = {
.p.name = "arbc",
.p.long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ARBC,
.priv_data_size = sizeof(ARBCContext),
.init = decode_init,
.decode = decode_frame,
.flush = decode_flush,
.close = decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};

View File

@ -733,16 +733,16 @@ static av_cold int decode_close(AVCodecContext *avctx)
return 0;
}
const AVCodec ff_argo_decoder = {
.name = "argo",
.long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ARGO,
const FFCodec ff_argo_decoder = {
.p.name = "argo",
.p.long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_ARGO,
.priv_data_size = sizeof(ArgoContext),
.init = decode_init,
.decode = decode_frame,
.flush = decode_flush,
.close = decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1,