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
7cab5471
Commit
7cab5471
authored
Feb 02, 2019
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: add support for setting the number of filter threads
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
fe99a51c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ffplay.texi
doc/ffplay.texi
+6
-0
ffplay.c
fftools/ffplay.c
+4
-0
No files found.
doc/ffplay.texi
View file @
7cab5471
...
...
@@ -195,6 +195,12 @@ input as soon as possible. Enabled by default for realtime streams, where data
may be dropped if not read in time. Use this option to enable infinite buffers
for all inputs, use @option
{
-noinfbuf
}
to disable it.
@item -filter
_
threads @var
{
nb
_
threads
}
Defines how many threads are used to process a filter pipeline. Each pipeline
will produce a thread pool with this many threads available for parallel
processing. The default is 0 which means that the thread count will be
determined by the number of available CPUs.
@end table
@section While playing
...
...
fftools/ffplay.c
View file @
7cab5471
...
...
@@ -353,6 +353,7 @@ static char *afilters = NULL;
#endif
static
int
autorotate
=
1
;
static
int
find_stream_info
=
1
;
static
int
filter_nbthreads
=
0
;
/* current context */
static
int
is_full_screen
;
...
...
@@ -1954,6 +1955,7 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
avfilter_graph_free
(
&
is
->
agraph
);
if
(
!
(
is
->
agraph
=
avfilter_graph_alloc
()))
return
AVERROR
(
ENOMEM
);
is
->
agraph
->
nb_threads
=
filter_nbthreads
;
while
((
e
=
av_dict_get
(
swr_opts
,
""
,
e
,
AV_DICT_IGNORE_SUFFIX
)))
av_strlcatf
(
aresample_swr_opts
,
sizeof
(
aresample_swr_opts
),
"%s=%s:"
,
e
->
key
,
e
->
value
);
...
...
@@ -2162,6 +2164,7 @@ static int video_thread(void *arg)
ret
=
AVERROR
(
ENOMEM
);
goto
the_end
;
}
graph
->
nb_threads
=
filter_nbthreads
;
if
((
ret
=
configure_video_filters
(
graph
,
is
,
vfilters_list
?
vfilters_list
[
is
->
vfilter_idx
]
:
NULL
,
frame
))
<
0
)
{
SDL_Event
event
;
event
.
type
=
FF_QUIT_EVENT
;
...
...
@@ -3611,6 +3614,7 @@ static const OptionDef options[] = {
{
"autorotate"
,
OPT_BOOL
,
{
&
autorotate
},
"automatically rotate video"
,
""
},
{
"find_stream_info"
,
OPT_BOOL
|
OPT_INPUT
|
OPT_EXPERT
,
{
&
find_stream_info
},
"read and decode the streams to fill missing information with heuristics"
},
{
"filter_threads"
,
HAS_ARG
|
OPT_INT
|
OPT_EXPERT
,
{
&
filter_nbthreads
},
"number of filter threads per graph"
},
{
NULL
,
},
};
...
...
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