Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
122de16d
Commit
122de16d
authored
May 17, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace cmdutils_common_opts.h by a macro
parent
2a2889e1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
23 deletions
+24
-23
Makefile
Makefile
+1
-2
avconv_opt.c
avconv_opt.c
+1
-1
avplay.c
avplay.c
+1
-1
avprobe.c
avprobe.c
+1
-1
cmdutils.h
cmdutils.h
+20
-0
cmdutils_common_opts.h
cmdutils_common_opts.h
+0
-18
No files found.
Makefile
View file @
122de16d
...
...
@@ -103,8 +103,7 @@ FFLIBS := avutil
DATA_FILES
:=
$
(
wildcard
$(SRC_PATH)
/presets/
*
.avpreset
)
SKIPHEADERS
=
cmdutils_common_opts.h
\
compat/w32pthreads.h
SKIPHEADERS
=
compat/w32pthreads.h
# first so "all" becomes default target
all
:
all-yes
...
...
avconv_opt.c
View file @
122de16d
...
...
@@ -2474,7 +2474,7 @@ fail:
#define OFFSET(x) offsetof(OptionsContext, x)
const
OptionDef
options
[]
=
{
/* main options */
#include "cmdutils_common_opts.h"
CMDUTILS_COMMON_OPTIONS
{
"f"
,
HAS_ARG
|
OPT_STRING
|
OPT_OFFSET
|
OPT_INPUT
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
format
)
},
"force format"
,
"fmt"
},
...
...
avplay.c
View file @
122de16d
...
...
@@ -2904,7 +2904,7 @@ static int opt_duration(void *optctx, const char *opt, const char *arg)
#define OFF(x) offsetof(PlayerState, x)
static
const
OptionDef
options
[]
=
{
#include "cmdutils_common_opts.h"
CMDUTILS_COMMON_OPTIONS
{
"x"
,
HAS_ARG
,
{
.
func_arg
=
opt_width
},
"force displayed width"
,
"width"
},
{
"y"
,
HAS_ARG
,
{
.
func_arg
=
opt_height
},
"force displayed height"
,
"height"
},
{
"s"
,
HAS_ARG
|
OPT_VIDEO
,
{
.
func_arg
=
opt_frame_size
},
"set frame size (WxH or abbreviation)"
,
"size"
},
...
...
avprobe.c
View file @
122de16d
...
...
@@ -1094,7 +1094,7 @@ static int opt_pretty(void *optctx, const char *opt, const char *arg)
}
static
const
OptionDef
real_options
[]
=
{
#include "cmdutils_common_opts.h"
CMDUTILS_COMMON_OPTIONS
{
"f"
,
HAS_ARG
,
{.
func_arg
=
opt_format
},
"force format"
,
"format"
},
{
"of"
,
HAS_ARG
,
{.
func_arg
=
opt_output_format
},
"output the document either as ini or json"
,
"output_format"
},
{
"unit"
,
OPT_BOOL
,
{
&
show_value_unit
},
...
...
cmdutils.h
View file @
122de16d
...
...
@@ -182,6 +182,26 @@ typedef struct OptionDef {
void
show_help_options
(
const
OptionDef
*
options
,
const
char
*
msg
,
int
req_flags
,
int
rej_flags
,
int
alt_flags
);
#define CMDUTILS_COMMON_OPTIONS \
{ "L", OPT_EXIT, { .func_arg = show_license }, "show license" }, \
{ "h", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
{ "?", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
{ "help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
{ "-help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
{ "version", OPT_EXIT, { .func_arg = show_version }, "show version" }, \
{ "formats", OPT_EXIT, { .func_arg = show_formats }, "show available formats" }, \
{ "codecs", OPT_EXIT, { .func_arg = show_codecs }, "show available codecs" }, \
{ "decoders", OPT_EXIT, { .func_arg = show_decoders }, "show available decoders" }, \
{ "encoders", OPT_EXIT, { .func_arg = show_encoders }, "show available encoders" }, \
{ "bsfs", OPT_EXIT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \
{ "protocols", OPT_EXIT, { .func_arg = show_protocols }, "show available protocols" }, \
{ "filters", OPT_EXIT, { .func_arg = show_filters }, "show available filters" }, \
{ "pix_fmts", OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \
{ "sample_fmts", OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \
{ "loglevel", HAS_ARG, { .func_arg = opt_loglevel }, "set libav* logging level", "loglevel" }, \
{ "v", HAS_ARG, { .func_arg = opt_loglevel }, "set libav* logging level", "loglevel" }, \
{ "cpuflags", HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "set CPU flags mask", "mask" }, \
/**
* Show help for all options with given flags in class and all its
* children.
...
...
cmdutils_common_opts.h
deleted
100644 → 0
View file @
2a2889e1
{
"L"
,
OPT_EXIT
,
{.
func_arg
=
show_license
},
"show license"
},
{
"h"
,
OPT_EXIT
,
{.
func_arg
=
show_help
},
"show help"
,
"topic"
},
{
"?"
,
OPT_EXIT
,
{.
func_arg
=
show_help
},
"show help"
,
"topic"
},
{
"help"
,
OPT_EXIT
,
{.
func_arg
=
show_help
},
"show help"
,
"topic"
},
{
"-help"
,
OPT_EXIT
,
{.
func_arg
=
show_help
},
"show help"
,
"topic"
},
{
"version"
,
OPT_EXIT
,
{.
func_arg
=
show_version
},
"show version"
},
{
"formats"
,
OPT_EXIT
,
{.
func_arg
=
show_formats
},
"show available formats"
},
{
"codecs"
,
OPT_EXIT
,
{.
func_arg
=
show_codecs
},
"show available codecs"
},
{
"decoders"
,
OPT_EXIT
,
{.
func_arg
=
show_decoders
},
"show available decoders"
},
{
"encoders"
,
OPT_EXIT
,
{.
func_arg
=
show_encoders
},
"show available encoders"
},
{
"bsfs"
,
OPT_EXIT
,
{.
func_arg
=
show_bsfs
},
"show available bit stream filters"
},
{
"protocols"
,
OPT_EXIT
,
{.
func_arg
=
show_protocols
},
"show available protocols"
},
{
"filters"
,
OPT_EXIT
,
{.
func_arg
=
show_filters
},
"show available filters"
},
{
"pix_fmts"
,
OPT_EXIT
,
{.
func_arg
=
show_pix_fmts
},
"show available pixel formats"
},
{
"sample_fmts"
,
OPT_EXIT
,
{.
func_arg
=
show_sample_fmts
},
"show available audio sample formats"
},
{
"loglevel"
,
HAS_ARG
,
{.
func_arg
=
opt_loglevel
},
"set libav* logging level"
,
"loglevel"
},
{
"v"
,
HAS_ARG
,
{.
func_arg
=
opt_loglevel
},
"set libav* logging level"
,
"loglevel"
},
{
"cpuflags"
,
HAS_ARG
|
OPT_EXPERT
,
{
.
func_arg
=
opt_cpuflags
},
"set CPU flags mask"
,
"mask"
},
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment