Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
4e268285
Commit
4e268285
authored
11 years ago
by
Stefano Sabatini
Browse files
Options
Downloads
Patches
Plain Diff
cmdutils: add -colors option
parent
d61617a5
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmdutils.c
+12
-0
12 additions, 0 deletions
cmdutils.c
cmdutils.h
+6
-0
6 additions, 0 deletions
cmdutils.h
cmdutils_common_opts.h
+1
-0
1 addition, 0 deletions
cmdutils_common_opts.h
doc/fftools-common-opts.texi
+3
-0
3 additions, 0 deletions
doc/fftools-common-opts.texi
with
22 additions
and
0 deletions
cmdutils.c
+
12
−
0
View file @
4e268285
...
@@ -1518,6 +1518,18 @@ int show_filters(void *optctx, const char *opt, const char *arg)
...
@@ -1518,6 +1518,18 @@ int show_filters(void *optctx, const char *opt, const char *arg)
return
0
;
return
0
;
}
}
void
show_colors
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
)
{
const
char
*
name
;
const
uint8_t
*
rgb
;
int
i
;
printf
(
"%-32s #RRGGBB
\n
"
,
"name"
);
for
(
i
=
0
;
name
=
av_get_known_color_name
(
i
,
&
rgb
);
i
++
)
printf
(
"%-32s #%02x%02x%02x
\n
"
,
name
,
rgb
[
0
],
rgb
[
1
],
rgb
[
2
]);
}
int
show_pix_fmts
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
)
int
show_pix_fmts
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
)
{
{
const
AVPixFmtDescriptor
*
pix_desc
=
NULL
;
const
AVPixFmtDescriptor
*
pix_desc
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
cmdutils.h
+
6
−
0
View file @
4e268285
...
@@ -488,6 +488,12 @@ int show_layouts(void *optctx, const char *opt, const char *arg);
...
@@ -488,6 +488,12 @@ int show_layouts(void *optctx, const char *opt, const char *arg);
*/
*/
int
show_sample_fmts
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
);
int
show_sample_fmts
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
);
/**
* Print a listing containing all the color names and values recognized
* by the program.
*/
void
show_colors
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
);
/**
/**
* Return a positive value if a line read from standard input
* Return a positive value if a line read from standard input
* starts with [yY], otherwise return 0.
* starts with [yY], otherwise return 0.
...
...
This diff is collapsed.
Click to expand it.
cmdutils_common_opts.h
+
1
−
0
View file @
4e268285
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
{
"pix_fmts"
,
OPT_EXIT
,
{.
func_arg
=
show_pix_fmts
},
"show available pixel formats"
},
{
"pix_fmts"
,
OPT_EXIT
,
{.
func_arg
=
show_pix_fmts
},
"show available pixel formats"
},
{
"layouts"
,
OPT_EXIT
,
{.
func_arg
=
show_layouts
},
"show standard channel layouts"
},
{
"layouts"
,
OPT_EXIT
,
{.
func_arg
=
show_layouts
},
"show standard channel layouts"
},
{
"sample_fmts"
,
OPT_EXIT
,
{.
func_arg
=
show_sample_fmts
},
"show available audio sample formats"
},
{
"sample_fmts"
,
OPT_EXIT
,
{.
func_arg
=
show_sample_fmts
},
"show available audio sample formats"
},
{
"colors"
,
OPT_EXIT
,
{.
func_arg
=
show_colors
},
"show available color names"
},
{
"loglevel"
,
HAS_ARG
,
{.
func_arg
=
opt_loglevel
},
"set logging level"
,
"loglevel"
},
{
"loglevel"
,
HAS_ARG
,
{.
func_arg
=
opt_loglevel
},
"set logging level"
,
"loglevel"
},
{
"v"
,
HAS_ARG
,
{.
func_arg
=
opt_loglevel
},
"set logging level"
,
"loglevel"
},
{
"v"
,
HAS_ARG
,
{.
func_arg
=
opt_loglevel
},
"set logging level"
,
"loglevel"
},
{
"report"
,
0
,
{(
void
*
)
opt_report
},
"generate a report"
},
{
"report"
,
0
,
{(
void
*
)
opt_report
},
"generate a report"
},
...
...
This diff is collapsed.
Click to expand it.
doc/fftools-common-opts.texi
+
3
−
0
View file @
4e268285
...
@@ -128,6 +128,9 @@ Show available sample formats.
...
@@ -128,6 +128,9 @@ Show available sample formats.
@item -layouts
@item -layouts
Show channel names and standard channel layouts.
Show channel names and standard channel layouts.
@item -colors
Show recognized color names.
@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
Set the logging level used by the library.
Set the logging level used by the library.
Adding "repeat+" indicates that repeated log output should not be compressed
Adding "repeat+" indicates that repeated log output should not be compressed
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment