History

Give less generic names to global library option arrays

Diego Biurrun committed 13 years ago

Commit b5a13861 parent 0d6fa399 files · +14 −14Browse files

Unified · Split

9 files
  1. doc/print_options.c +2 −2
  2. libavcodec/options.c +1 −1
  3. libavcodec/options_table.h +1 −1
  4. libavfilter/avfilter.c +2 −2
  5. libavformat/options.c +1 −1
  6. libavformat/options_table.h +1 −1
  7. libavresample/options.c +2 −2
  8. libavutil/opt.h +2 −2
  9. libswscale/options.c +2 −2
doc/print_options.c+2−2
@@ -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
105static void show_codec_opts(void)105static 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
113int main(int argc, char **argv)113int main(int argc, char **argv)
libavcodec/options.c+1−1
@@ -70,7 +70,7 @@ static const AVClass *codec_child_class_next(const AVClass *prev) · 69 unmodified lines
70static const AVClass av_codec_context_class = {70static const AVClass av_codec_context_class = {
71 .class_name = "AVCodecContext",71 .class_name = "AVCodecContext",
72 .item_name = context_to_name,72 .item_name = context_to_name,
73 .option = options,73 .option = avcodec_options,
74 .version = LIBAVUTIL_VERSION_INT,74 .version = LIBAVUTIL_VERSION_INT,
75 .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset),75 .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset),
76 .child_next = codec_child_next,76 .child_next = codec_child_next,
libavcodec/options_table.h+1−1
@@ -39,7 +39,7 @@ · 38 unmodified lines
39 39
40#define AV_CODEC_DEFAULT_BITRATE 200*100040#define AV_CODEC_DEFAULT_BITRATE 200*1000
41 41
42static const AVOption options[]={42static const AVOption avcodec_options[] = {
43{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E},43{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E},
44{"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far "44{"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far "
45 "ratecontrol is willing to deviate from the target average bitrate value. This is not related "45 "ratecontrol is willing to deviate from the target average bitrate value. This is not related "
libavfilter/avfilter.c+2−2
@@ -354,7 +354,7 @@ static const AVClass *filter_child_class_next(const AVClass *prev) · 353 unmodified lines
354 354
355#define OFFSET(x) offsetof(AVFilterContext, x)355#define OFFSET(x) offsetof(AVFilterContext, x)
356#define FLAGS AV_OPT_FLAG_VIDEO_PARAM356#define FLAGS AV_OPT_FLAG_VIDEO_PARAM
357static const AVOption options[] = {357static const AVOption avfilter_options[] = {
358 { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,358 { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
359 { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },359 { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },
360 { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .unit = "thread_type" },360 { "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .unit = "thread_type" },
@@ -367,7 +367,7 @@ static const AVClass avfilter_class = { · 6 unmodified lines
367 .version = LIBAVUTIL_VERSION_INT,367 .version = LIBAVUTIL_VERSION_INT,
368 .child_next = filter_child_next,368 .child_next = filter_child_next,
369 .child_class_next = filter_child_class_next,369 .child_class_next = filter_child_class_next,
370 .option = options,370 .option = avfilter_options,
371};371};
372 372
373static int default_execute(AVFilterContext *ctx, action_func *func, void *arg,373static int default_execute(AVFilterContext *ctx, action_func *func, void *arg,
libavformat/options.c+1−1
@@ -79,7 +79,7 @@ static const AVClass *format_child_class_next(const AVClass *prev) · 78 unmodified lines
79static const AVClass av_format_context_class = {79static const AVClass av_format_context_class = {
80 .class_name = "AVFormatContext",80 .class_name = "AVFormatContext",
81 .item_name = format_to_name,81 .item_name = format_to_name,
82 .option = options,82 .option = avformat_options,
83 .version = LIBAVUTIL_VERSION_INT,83 .version = LIBAVUTIL_VERSION_INT,
84 .child_next = format_child_next,84 .child_next = format_child_next,
85 .child_class_next = format_child_class_next,85 .child_class_next = format_child_class_next,
libavformat/options_table.h+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#define E AV_OPT_FLAG_ENCODING_PARAM30#define E AV_OPT_FLAG_ENCODING_PARAM
31#define D AV_OPT_FLAG_DECODING_PARAM31#define D AV_OPT_FLAG_DECODING_PARAM
32 32
33static const AVOption options[]={33static const AVOption avformat_options[] = {
34{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT, {.i64 = 5000000 }, 32, INT_MAX, D},34{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT, {.i64 = 5000000 }, 32, INT_MAX, D},
35{"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, E},35{"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, E},
36{"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "fflags"},36{"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "fflags"},
libavresample/options.c+2−2
@@ -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_PARAM34#define PARAM AV_OPT_FLAG_AUDIO_PARAM
35 35
36static const AVOption options[] = {36static 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
87static const AVClass av_resample_context_class = {87static 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
libavutil/opt.h+2−2
@@ -62,7 +62,7 @@ · 61 unmodified lines
62 * int bin_len;62 * int bin_len;
63 * } test_struct;63 * } test_struct;
64 *64 *
65 * static const AVOption options[] = {65 * static const AVOption test_options[] = {
66 * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt),66 * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt),
67 * AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },67 * AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },
68 * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt),68 * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt),
@@ -75,7 +75,7 @@ · 6 unmodified lines
75 * static const AVClass test_class = {75 * static const AVClass test_class = {
76 * .class_name = "test class",76 * .class_name = "test class",
77 * .item_name = av_default_item_name,77 * .item_name = av_default_item_name,
78 * .option = options,78 * .option = test_options,
79 * .version = LIBAVUTIL_VERSION_INT,79 * .version = LIBAVUTIL_VERSION_INT,
80 * };80 * };
81 * @endcode81 * @endcode
libswscale/options.c+2−2
@@ -33,7 +33,7 @@ static const char *sws_context_to_name(void *ptr) · 32 unmodified lines
33#define DEFAULT 033#define DEFAULT 0
34#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM34#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
35 35
36static const AVOption options[] = {36static 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" },
@@ -66,7 +66,7 @@ static const AVOption options[] = { · 26 unmodified lines
66 { NULL }66 { NULL }
67};67};
68 68
69const AVClass sws_context_class = { "SWScaler", sws_context_to_name, options };69const AVClass sws_context_class = { "SWScaler", sws_context_to_name, swscale_options };
70 70
71const AVClass *sws_get_class(void)71const AVClass *sws_get_class(void)
72{72{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t