History

fftools/cmdutils: change option flags to (1 << N) style

It is easier to read.

Anton Khirnov committed 2 years ago

Commit ca6f0191 parent 7a7550e1 file · +25 −22Browse files

Unified · Split

fftools/cmdutils.h+25−22
@@ -106,28 +106,31 @@ typedef struct SpecifierOpt { · 105 unmodified lines
106typedef struct OptionDef {106typedef struct OptionDef {
107 const char *name;107 const char *name;
108 int flags;108 int flags;
109#define HAS_ARG 0x0001109#define HAS_ARG (1 << 0)
110#define OPT_BOOL 0x0002110#define OPT_BOOL (1 << 1)
111#define OPT_EXPERT 0x0004111#define OPT_EXPERT (1 << 2)
112#define OPT_STRING 0x0008112#define OPT_STRING (1 << 3)
113#define OPT_VIDEO 0x0010113#define OPT_VIDEO (1 << 4)
114#define OPT_AUDIO 0x0020114#define OPT_AUDIO (1 << 5)
115#define OPT_INT 0x0080115#define OPT_INT (1 << 6)
116#define OPT_FLOAT 0x0100116#define OPT_FLOAT (1 << 7)
117#define OPT_SUBTITLE 0x0200117#define OPT_SUBTITLE (1 << 8)
118#define OPT_INT64 0x0400118#define OPT_INT64 (1 << 9)
119#define OPT_EXIT 0x0800119#define OPT_EXIT (1 << 10)
120#define OPT_DATA 0x1000120#define OPT_DATA (1 << 11)
121#define OPT_PERFILE 0x2000 /* the option is per-file (currently ffmpeg-only).121/* The option is per-file (currently ffmpeg-only).
122 implied by OPT_OFFSET or OPT_SPEC */122 implied by OPT_OFFSET or OPT_SPEC */
123#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */123#define OPT_PERFILE (1 << 12)
124#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt.124/* Option is specified as an offset in a passed optctx */
125 Implies OPT_OFFSET. Next element after the offset is125#define OPT_OFFSET (1 << 13)
126 an int containing element count in the array. */126/* Option is to be stored in an array of SpecifierOpt. Implies OPT_OFFSET.
127#define OPT_TIME 0x10000127 Next element after the offset is an int containing element count in the
128#define OPT_DOUBLE 0x20000128 array. */
129#define OPT_INPUT 0x40000129#define OPT_SPEC (1 << 14)
130#define OPT_OUTPUT 0x80000130#define OPT_TIME (1 << 15)
131#define OPT_DOUBLE (1 << 16)
132#define OPT_INPUT (1 << 17)
133#define OPT_OUTPUT (1 << 18)
131 union {134 union {
132 void *dst_ptr;135 void *dst_ptr;
133 int (*func_arg)(void *, const char *, const char *);136 int (*func_arg)(void *, const char *, const char *);

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