Merge commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24'

* commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24':
  Convert all AVClass struct declarations to designated initializers.

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2017-11-01 20:05:09 -03:00
commit e621b1ca64
14 changed files with 63 additions and 32 deletions

View File

@ -1066,10 +1066,10 @@ static const AVOption aacenc_options[] = {
};
static const AVClass aacenc_class = {
"AAC encoder",
av_default_item_name,
aacenc_options,
LIBAVUTIL_VERSION_INT,
.class_name = "AAC encoder",
.item_name = av_default_item_name,
.option = aacenc_options,
.version = LIBAVUTIL_VERSION_INT,
};
static const AVCodecDefault aac_encode_defaults[] = {

View File

@ -79,7 +79,10 @@ static const AVOption fdk_aac_dec_options[] = {
};
static const AVClass fdk_aac_dec_class = {
"libfdk-aac decoder", av_default_item_name, fdk_aac_dec_options, LIBAVUTIL_VERSION_INT
.class_name = "libfdk-aac decoder",
.item_name = av_default_item_name,
.option = fdk_aac_dec_options,
.version = LIBAVUTIL_VERSION_INT,
};
static int get_stream_info(AVCodecContext *avctx)

View File

@ -54,7 +54,10 @@ static const AVOption aac_enc_options[] = {
};
static const AVClass aac_enc_class = {
"libfdk_aac", av_default_item_name, aac_enc_options, LIBAVUTIL_VERSION_INT
.class_name = "libfdk_aac",
.item_name = av_default_item_name,
.option = aac_enc_options,
.version = LIBAVUTIL_VERSION_INT,
};
static const char *aac_get_error(AACENC_ERROR err)

View File

@ -183,7 +183,10 @@ static const AVOption options[] = {
};
static const AVClass amrnb_class = {
"libopencore_amrnb", av_default_item_name, options, LIBAVUTIL_VERSION_INT
.class_name = "libopencore_amrnb",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
static av_cold int amr_nb_encode_init(AVCodecContext *avctx)

View File

@ -75,7 +75,10 @@ static const AVOption options[] = {
};
static const AVClass class = {
"libopenh264enc", av_default_item_name, options, LIBAVUTIL_VERSION_INT
.class_name = "libvo_amrwbenc",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
static av_cold int svc_encode_close(AVCodecContext *avctx)

View File

@ -46,7 +46,10 @@ static const AVOption options[] = {
};
static const AVClass amrwb_class = {
"libvo_amrwbenc", av_default_item_name, options, LIBAVUTIL_VERSION_INT
.class_name = "libvo_amrwbenc",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
static int get_wb_bitrate_mode(int bitrate, void *log_ctx)

View File

@ -2823,10 +2823,10 @@ static const AVOption mpeg4_options[] = {
};
static const AVClass mpeg4_class = {
"MPEG4 Video Decoder",
av_default_item_name,
mpeg4_options,
LIBAVUTIL_VERSION_INT,
.class_name = "MPEG4 Video Decoder",
.item_name = av_default_item_name,
.option = mpeg4_options,
.version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_mpeg4_decoder = {

View File

@ -212,10 +212,10 @@ static const AVOption s302m_options[] = {
};
static const AVClass s302m_class = {
"SMPTE 302M Decoder",
av_default_item_name,
s302m_options,
LIBAVUTIL_VERSION_INT,
.class_name = "SMPTE 302M Decoder",
.item_name = av_default_item_name,
.option = s302m_options,
.version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_s302m_decoder = {

View File

@ -162,10 +162,10 @@ static const AVOption v210dec_options[] = {
};
static const AVClass v210dec_class = {
"V210 Decoder",
av_default_item_name,
v210dec_options,
LIBAVUTIL_VERSION_INT,
.class_name = "V210 Decoder",
.item_name = av_default_item_name,
.option = v210dec_options,
.version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_v210_decoder = {

View File

@ -57,7 +57,14 @@ typedef struct Parser {
double *var;
} Parser;
static const AVClass eval_class = { "Eval", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(Parser,log_offset), offsetof(Parser,log_ctx) };
static const AVClass eval_class = {
.class_name = "Eval",
.item_name = av_default_item_name,
.option = NULL,
.version = LIBAVUTIL_VERSION_INT,
.log_level_offset_offset = offsetof(Parser, log_offset),
.parent_log_context_offset = offsetof(Parser, log_ctx),
};
static const struct {
double bin_val;

View File

@ -42,8 +42,12 @@ typedef struct FileLogContext {
} FileLogContext;
static const AVClass file_log_ctx_class = {
"FILE", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT,
offsetof(FileLogContext, log_offset), offsetof(FileLogContext, log_ctx)
.class_name = "FILE",
.item_name = av_default_item_name,
.option = NULL,
.version = LIBAVUTIL_VERSION_INT,
.log_level_offset_offset = offsetof(FileLogContext, log_offset),
.parent_log_context_offset = offsetof(FileLogContext, log_ctx),
};
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,

View File

@ -99,8 +99,12 @@ typedef struct FileLogContext {
} FileLogContext;
static const AVClass file_log_ctx_class = {
"TEMPFILE", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT,
offsetof(FileLogContext, log_offset), offsetof(FileLogContext, log_ctx)
.class_name = "TEMPFILE",
.item_name = av_default_item_name,
.option = NULL,
.version = LIBAVUTIL_VERSION_INT,
.log_level_offset_offset = offsetof(FileLogContext, log_offset),
.parent_log_context_offset = offsetof(FileLogContext, log_ctx),
};
int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx)

View File

@ -242,9 +242,10 @@ typedef struct ImgUtils {
} ImgUtils;
static const AVClass imgutils_class = {
.class_name = "IMGUTILS",
.item_name = av_default_item_name,
.version = LIBAVUTIL_VERSION_INT,
.class_name = "IMGUTILS",
.item_name = av_default_item_name,
.option = NULL,
.version = LIBAVUTIL_VERSION_INT,
.log_level_offset_offset = offsetof(ImgUtils, log_offset),
.parent_log_context_offset = offsetof(ImgUtils, log_ctx),
};

View File

@ -98,9 +98,9 @@ static const char *test_get_name(void *ctx)
}
static const AVClass test_class = {
"TestContext",
test_get_name,
test_options
.class_name = "TestContext",
.item_name = test_get_name,
.option = test_options,
};
static void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)