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
9999 #include "libavformat/options_table.h"
100100
101101 printf("@section Format AVOptions\n");
102− show_opts(options, 0);
102+ show_opts(avformat_options, 0);
103103 }
104104
105105 static void show_codec_opts(void)
@@ -107,7 +107,7 @@ static void show_codec_opts(void) · 1 unmodified line
107107 #include "libavcodec/options_table.h"
108108
109109 printf("@section Codec AVOptions\n");
110− show_opts(options, 1);
110+ show_opts(avcodec_options, 1);
111111 }
112112
113113 int 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
7070 static const AVClass av_codec_context_class = {
7171 .class_name = "AVCodecContext",
7272 .item_name = context_to_name,
73− .option = options,
73+ .option = avcodec_options,
7474 .version = LIBAVUTIL_VERSION_INT,
7575 .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset),
7676 .child_next = codec_child_next,
libavcodec/options_table.h+1−1
@@ -39,7 +39,7 @@ · 38 unmodified lines
3939
4040 #define AV_CODEC_DEFAULT_BITRATE 200*1000
4141
42−static const AVOption options[]={
42+static const AVOption avcodec_options[] = {
4343 {"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},
4444 {"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far "
4545 "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
354354
355355 #define OFFSET(x) offsetof(AVFilterContext, x)
356356 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM
357−static const AVOption options[] = {
357+static const AVOption avfilter_options[] = {
358358 { "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
359359 { .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },
360360 { "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
367367 .version = LIBAVUTIL_VERSION_INT,
368368 .child_next = filter_child_next,
369369 .child_class_next = filter_child_class_next,
370− .option = options,
370+ .option = avfilter_options,
371371 };
372372
373373 static 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
7979 static const AVClass av_format_context_class = {
8080 .class_name = "AVFormatContext",
8181 .item_name = format_to_name,
82− .option = options,
82+ .option = avformat_options,
8383 .version = LIBAVUTIL_VERSION_INT,
8484 .child_next = format_child_next,
8585 .child_class_next = format_child_class_next,
libavformat/options_table.h+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030 #define E AV_OPT_FLAG_ENCODING_PARAM
3131 #define D AV_OPT_FLAG_DECODING_PARAM
3232
33−static const AVOption options[]={
33+static const AVOption avformat_options[] = {
3434 {"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT, {.i64 = 5000000 }, 32, INT_MAX, D},
3535 {"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, E},
3636 {"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
3333 #define OFFSET(x) offsetof(AVAudioResampleContext, x)
3434 #define PARAM AV_OPT_FLAG_AUDIO_PARAM
3535
36−static const AVOption options[] = {
36+static const AVOption avresample_options[] = {
3737 { "in_channel_layout", "Input Channel Layout", OFFSET(in_channel_layout), AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM },
3838 { "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 },
3939 { "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
8787 static const AVClass av_resample_context_class = {
8888 .class_name = "AVAudioResampleContext",
8989 .item_name = av_default_item_name,
90− .option = options,
90+ .option = avresample_options,
9191 .version = LIBAVUTIL_VERSION_INT,
9292 };
9393
libavutil/opt.h+2−2
@@ -62,7 +62,7 @@ · 61 unmodified lines
6262 * int bin_len;
6363 * } test_struct;
6464 *
65− * static const AVOption options[] = {
65+ * static const AVOption test_options[] = {
6666 * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt),
6767 * AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },
6868 * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt),
@@ -75,7 +75,7 @@ · 6 unmodified lines
7575 * static const AVClass test_class = {
7676 * .class_name = "test class",
7777 * .item_name = av_default_item_name,
78− * .option = options,
78+ * .option = test_options,
7979 * .version = LIBAVUTIL_VERSION_INT,
8080 * };
8181 * @endcode
libswscale/options.c+2−2
@@ -33,7 +33,7 @@ static const char *sws_context_to_name(void *ptr) · 32 unmodified lines
3333 #define DEFAULT 0
3434 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
3535
36−static const AVOption options[] = {
36+static const AVOption swscale_options[] = {
3737 { "sws_flags", "scaler flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = DEFAULT }, 0, UINT_MAX, VE, "sws_flags" },
3838 { "fast_bilinear", "fast bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_FAST_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" },
3939 { "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
6666 { NULL }
6767 };
6868
69−const AVClass sws_context_class = { "SWScaler", sws_context_to_name, options };
69+const AVClass sws_context_class = { "SWScaler", sws_context_to_name, swscale_options };
7070
7171 const AVClass *sws_get_class(void)
7272 {

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