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
f521746b
Commit
f521746b
authored
13 years ago
by
Stefano Sabatini
Browse files
Options
Downloads
Patches
Plain Diff
ffplay: implement -showmode option
The new option allows to select the starting show mode.
parent
f8b8c694
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/ffplay.texi
+18
-0
18 additions, 0 deletions
doc/ffplay.texi
ffplay.c
+13
-0
13 additions, 0 deletions
ffplay.c
with
31 additions
and
0 deletions
doc/ffplay.texi
+
18
−
0
View file @
f521746b
...
@@ -58,6 +58,24 @@ Force format.
...
@@ -58,6 +58,24 @@ Force format.
Set window title (default is the input filename).
Set window title (default is the input filename).
@item -loop @var
{
number
}
@item -loop @var
{
number
}
Loops movie playback <number> times. 0 means forever.
Loops movie playback <number> times. 0 means forever.
@item -showmode @var
{
mode
}
Set the show mode to use.
Available values for @var
{
mode
}
are:
@table @samp
@item 0, video
show video
@item 1, waves
show audio waves
@item 2, rdft
show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
@end table
Default value is "video", if video is not present or cannot be played
"rdft" is automatically selected.
You can interactively cycle through the available show modes by
pressing the key @key
{
w
}
.
@item -vf @var
{
filter
_
graph
}
@item -vf @var
{
filter
_
graph
}
@var
{
filter
_
graph
}
is a description of the filter graph to apply to
@var
{
filter
_
graph
}
is a description of the filter graph to apply to
the input video.
the input video.
...
...
This diff is collapsed.
Click to expand it.
ffplay.c
+
13
−
0
View file @
f521746b
...
@@ -265,6 +265,7 @@ static int exit_on_keydown;
...
@@ -265,6 +265,7 @@ static int exit_on_keydown;
static
int
exit_on_mousedown
;
static
int
exit_on_mousedown
;
static
int
loop
=
1
;
static
int
loop
=
1
;
static
int
framedrop
=
1
;
static
int
framedrop
=
1
;
static
int
show_mode
=
SHOW_MODE_VIDEO
;
static
int
rdftspeed
=
20
;
static
int
rdftspeed
=
20
;
#if CONFIG_AVFILTER
#if CONFIG_AVFILTER
...
@@ -2461,6 +2462,8 @@ static int decode_thread(void *arg)
...
@@ -2461,6 +2462,8 @@ static int decode_thread(void *arg)
av_dump_format
(
ic
,
0
,
is
->
filename
,
0
);
av_dump_format
(
ic
,
0
,
is
->
filename
,
0
);
}
}
is
->
show_mode
=
show_mode
;
/* open the streams */
/* open the streams */
if
(
st_index
[
AVMEDIA_TYPE_AUDIO
]
>=
0
)
{
if
(
st_index
[
AVMEDIA_TYPE_AUDIO
]
>=
0
)
{
stream_component_open
(
is
,
st_index
[
AVMEDIA_TYPE_AUDIO
]);
stream_component_open
(
is
,
st_index
[
AVMEDIA_TYPE_AUDIO
]);
...
@@ -2970,6 +2973,15 @@ static int opt_thread_count(const char *opt, const char *arg)
...
@@ -2970,6 +2973,15 @@ static int opt_thread_count(const char *opt, const char *arg)
return
0
;
return
0
;
}
}
static
int
opt_show_mode
(
const
char
*
opt
,
const
char
*
arg
)
{
show_mode
=
!
strcmp
(
arg
,
"video"
)
?
SHOW_MODE_VIDEO
:
!
strcmp
(
arg
,
"waves"
)
?
SHOW_MODE_WAVES
:
!
strcmp
(
arg
,
"rdft"
)
?
SHOW_MODE_RDFT
:
parse_number_or_die
(
opt
,
arg
,
OPT_INT
,
0
,
SHOW_MODE_NB
-
1
);
return
0
;
}
static
const
OptionDef
options
[]
=
{
static
const
OptionDef
options
[]
=
{
#include
"cmdutils_common_opts.h"
#include
"cmdutils_common_opts.h"
{
"x"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_width
},
"force displayed width"
,
"width"
},
{
"x"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_width
},
"force displayed width"
,
"width"
},
...
@@ -3013,6 +3025,7 @@ static const OptionDef options[] = {
...
@@ -3013,6 +3025,7 @@ static const OptionDef options[] = {
{
"vf"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
vfilters
},
"video filters"
,
"filter list"
},
{
"vf"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
vfilters
},
"video filters"
,
"filter list"
},
#endif
#endif
{
"rdftspeed"
,
OPT_INT
|
HAS_ARG
|
OPT_AUDIO
|
OPT_EXPERT
,
{(
void
*
)
&
rdftspeed
},
"rdft speed"
,
"msecs"
},
{
"rdftspeed"
,
OPT_INT
|
HAS_ARG
|
OPT_AUDIO
|
OPT_EXPERT
,
{(
void
*
)
&
rdftspeed
},
"rdft speed"
,
"msecs"
},
{
"showmode"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_show_mode
},
"select show mode (0 = video, 1 = waves, 2 = RDFT)"
,
"mode"
},
{
"default"
,
OPT_FUNC2
|
HAS_ARG
|
OPT_AUDIO
|
OPT_VIDEO
|
OPT_EXPERT
,
{(
void
*
)
opt_default
},
"generic catch all option"
,
""
},
{
"default"
,
OPT_FUNC2
|
HAS_ARG
|
OPT_AUDIO
|
OPT_VIDEO
|
OPT_EXPERT
,
{(
void
*
)
opt_default
},
"generic catch all option"
,
""
},
{
"i"
,
OPT_DUMMY
,
{
NULL
},
"ffmpeg compatibility dummy option"
,
""
},
{
"i"
,
OPT_DUMMY
,
{
NULL
},
"ffmpeg compatibility dummy option"
,
""
},
{
NULL
,
},
{
NULL
,
},
...
...
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