* commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e': Give less generic names to global library option arrays Conflicts: libavcodec/options_table.h libavfilter/avfilter.c libavformat/options_table.h libswscale/options.c
Unified · Split
| @@ -99,7 +99,7 @@ static void show_format_opts(void) · 98 unmodified lines | |||
| 99 | #include "libavformat/options_table.h" | 99 | #include "libavformat/options_table.h" |
| 100 | 100 | ||
| 101 | printf("@section Format AVOptions\n"); | 101 | printf("@section Format AVOptions\n"); |
| 102 | show_opts(options, 0); | 102 | show_opts(avformat_options, 0); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | static void show_codec_opts(void) | 105 | static void show_codec_opts(void) |
| @@ -107,7 +107,7 @@ static void show_codec_opts(void) · 1 unmodified line | |||
| 107 | #include "libavcodec/options_table.h" | 107 | #include "libavcodec/options_table.h" |
| 108 | 108 | ||
| 109 | printf("@section Codec AVOptions\n"); | 109 | printf("@section Codec AVOptions\n"); |
| 110 | show_opts(options, 1); | 110 | show_opts(avcodec_options, 1); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | int main(int argc, char **argv) | 113 | int main(int argc, char **argv) |
| @@ -77,7 +77,7 @@ static AVClassCategory get_category(void *ptr) · 76 unmodified lines | |||
| 77 | static const AVClass av_codec_context_class = { | 77 | static const AVClass av_codec_context_class = { |
| 78 | .class_name = "AVCodecContext", | 78 | .class_name = "AVCodecContext", |
| 79 | .item_name = context_to_name, | 79 | .item_name = context_to_name, |
| 80 | .option = options, | 80 | .option = avcodec_options, |
| 81 | .version = LIBAVUTIL_VERSION_INT, | 81 | .version = LIBAVUTIL_VERSION_INT, |
| 82 | .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset), | 82 | .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset), |
| 83 | .child_next = codec_child_next, | 83 | .child_next = codec_child_next, |
| @@ -40,7 +40,7 @@ · 39 unmodified lines | |||
| 40 | 40 | ||
| 41 | #define AV_CODEC_DEFAULT_BITRATE 200*1000 | 41 | #define AV_CODEC_DEFAULT_BITRATE 200*1000 |
| 42 | 42 | ||
| 43 | static const AVOption options[]={ | 43 | static const AVOption avcodec_options[] = { |
| 44 | {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, | 44 | {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, |
| 45 | {"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, | 45 | {"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, |
| 46 | {"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far " | 46 | {"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far " |
| @@ -539,7 +539,7 @@ static const AVClass *filter_child_class_next(const AVClass *prev) · 538 unmodified lines | |||
| 539 | 539 | ||
| 540 | #define OFFSET(x) offsetof(AVFilterContext, x) | 540 | #define OFFSET(x) offsetof(AVFilterContext, x) |
| 541 | #define FLAGS AV_OPT_FLAG_FILTERING_PARAM | 541 | #define FLAGS AV_OPT_FLAG_FILTERING_PARAM |
| 542 | static const AVOption options[] = { | 542 | static const AVOption avfilter_options[] = { |
| 543 | { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, | 543 | { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, |
| 544 | { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" }, | 544 | { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" }, |
| 545 | { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .unit = "thread_type" }, | 545 | { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .unit = "thread_type" }, |
| @@ -554,7 +554,7 @@ static const AVClass avfilter_class = { · 8 unmodified lines | |||
| 554 | .category = AV_CLASS_CATEGORY_FILTER, | 554 | .category = AV_CLASS_CATEGORY_FILTER, |
| 555 | .child_next = filter_child_next, | 555 | .child_next = filter_child_next, |
| 556 | .child_class_next = filter_child_class_next, | 556 | .child_class_next = filter_child_class_next, |
| 557 | .option = options, | 557 | .option = avfilter_options, |
| 558 | }; | 558 | }; |
| 559 | 559 | ||
| 560 | static int default_execute(AVFilterContext *ctx, action_func *func, void *arg, | 560 | static int default_execute(AVFilterContext *ctx, action_func *func, void *arg, |
| @@ -86,7 +86,7 @@ static AVClassCategory get_category(void *ptr) · 85 unmodified lines | |||
| 86 | static const AVClass av_format_context_class = { | 86 | static const AVClass av_format_context_class = { |
| 87 | .class_name = "AVFormatContext", | 87 | .class_name = "AVFormatContext", |
| 88 | .item_name = format_to_name, | 88 | .item_name = format_to_name, |
| 89 | .option = options, | 89 | .option = avformat_options, |
| 90 | .version = LIBAVUTIL_VERSION_INT, | 90 | .version = LIBAVUTIL_VERSION_INT, |
| 91 | .child_next = format_child_next, | 91 | .child_next = format_child_next, |
| 92 | .child_class_next = format_child_class_next, | 92 | .child_class_next = format_child_class_next, |
| @@ -32,7 +32,7 @@ · 31 unmodified lines | |||
| 32 | #define E AV_OPT_FLAG_ENCODING_PARAM | 32 | #define E AV_OPT_FLAG_ENCODING_PARAM |
| 33 | #define D AV_OPT_FLAG_DECODING_PARAM | 33 | #define D AV_OPT_FLAG_DECODING_PARAM |
| 34 | 34 | ||
| 35 | static const AVOption options[]={ | 35 | static const AVOption avformat_options[] = { |
| 36 | {"avioflags", NULL, OFFSET(avio_flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "avioflags"}, | 36 | {"avioflags", NULL, OFFSET(avio_flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "avioflags"}, |
| 37 | {"direct", "reduce buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVIO_FLAG_DIRECT }, INT_MIN, INT_MAX, D|E, "avioflags"}, | 37 | {"direct", "reduce buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVIO_FLAG_DIRECT }, INT_MIN, INT_MAX, D|E, "avioflags"}, |
| 38 | {"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT, {.i64 = 5000000 }, 32, INT_MAX, D}, | 38 | {"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT, {.i64 = 5000000 }, 32, INT_MAX, D}, |
| @@ -33,7 +33,7 @@ · 32 unmodified lines | |||
| 33 | #define OFFSET(x) offsetof(AVAudioResampleContext, x) | 33 | #define OFFSET(x) offsetof(AVAudioResampleContext, x) |
| 34 | #define PARAM AV_OPT_FLAG_AUDIO_PARAM | 34 | #define PARAM AV_OPT_FLAG_AUDIO_PARAM |
| 35 | 35 | ||
| 36 | static const AVOption options[] = { | 36 | static const AVOption avresample_options[] = { |
| 37 | { "in_channel_layout", "Input Channel Layout", OFFSET(in_channel_layout), AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM }, | 37 | { "in_channel_layout", "Input Channel Layout", OFFSET(in_channel_layout), AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM }, |
| 38 | { "in_sample_fmt", "Input Sample Format", OFFSET(in_sample_fmt), AV_OPT_TYPE_INT, { .i64 = AV_SAMPLE_FMT_S16 }, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NB-1, PARAM }, | 38 | { "in_sample_fmt", "Input Sample Format", OFFSET(in_sample_fmt), AV_OPT_TYPE_INT, { .i64 = AV_SAMPLE_FMT_S16 }, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NB-1, PARAM }, |
| 39 | { "in_sample_rate", "Input Sample Rate", OFFSET(in_sample_rate), AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM }, | 39 | { "in_sample_rate", "Input Sample Rate", OFFSET(in_sample_rate), AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM }, |
| @@ -87,7 +87,7 @@ static const AVOption options[] = { · 47 unmodified lines | |||
| 87 | static const AVClass av_resample_context_class = { | 87 | static const AVClass av_resample_context_class = { |
| 88 | .class_name = "AVAudioResampleContext", | 88 | .class_name = "AVAudioResampleContext", |
| 89 | .item_name = av_default_item_name, | 89 | .item_name = av_default_item_name, |
| 90 | .option = options, | 90 | .option = avresample_options, |
| 91 | .version = LIBAVUTIL_VERSION_INT, | 91 | .version = LIBAVUTIL_VERSION_INT, |
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| @@ -64,7 +64,7 @@ · 63 unmodified lines | |||
| 64 | * int bin_len; | 64 | * int bin_len; |
| 65 | * } test_struct; | 65 | * } test_struct; |
| 66 | * | 66 | * |
| 67 | * static const AVOption options[] = { | 67 | * static const AVOption test_options[] = { |
| 68 | * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt), | 68 | * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt), |
| 69 | * AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX }, | 69 | * AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX }, |
| 70 | * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt), | 70 | * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt), |
| @@ -77,7 +77,7 @@ · 6 unmodified lines | |||
| 77 | * static const AVClass test_class = { | 77 | * static const AVClass test_class = { |
| 78 | * .class_name = "test class", | 78 | * .class_name = "test class", |
| 79 | * .item_name = av_default_item_name, | 79 | * .item_name = av_default_item_name, |
| 80 | * .option = options, | 80 | * .option = test_options, |
| 81 | * .version = LIBAVUTIL_VERSION_INT, | 81 | * .version = LIBAVUTIL_VERSION_INT, |
| 82 | * }; | 82 | * }; |
| 83 | * @endcode | 83 | * @endcode |
| @@ -33,7 +33,7 @@ static const char *sws_context_to_name(void *ptr) · 32 unmodified lines | |||
| 33 | #define DEFAULT 0 | 33 | #define DEFAULT 0 |
| 34 | #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM | 34 | #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
| 35 | 35 | ||
| 36 | static const AVOption options[] = { | 36 | static const AVOption swscale_options[] = { |
| 37 | { "sws_flags", "scaler flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = DEFAULT }, 0, UINT_MAX, VE, "sws_flags" }, | 37 | { "sws_flags", "scaler flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = DEFAULT }, 0, UINT_MAX, VE, "sws_flags" }, |
| 38 | { "fast_bilinear", "fast bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_FAST_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" }, | 38 | { "fast_bilinear", "fast bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_FAST_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" }, |
| 39 | { "bilinear", "bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" }, | 39 | { "bilinear", "bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" }, |
| @@ -75,7 +75,7 @@ static const AVOption options[] = { · 35 unmodified lines | |||
| 75 | const AVClass sws_context_class = { | 75 | const AVClass sws_context_class = { |
| 76 | .class_name = "SWScaler", | 76 | .class_name = "SWScaler", |
| 77 | .item_name = sws_context_to_name, | 77 | .item_name = sws_context_to_name, |
| 78 | .option = options, | 78 | .option = swscale_options, |
| 79 | .category = AV_CLASS_CATEGORY_SWSCALER, | 79 | .category = AV_CLASS_CATEGORY_SWSCALER, |
| 80 | .version = LIBAVUTIL_VERSION_INT, | 80 | .version = LIBAVUTIL_VERSION_INT, |
| 81 | }; | 81 | }; |