Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
508d6a23
Commit
508d6a23
authored
Feb 25, 2015
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: allow to set the thread message queue size.
parent
a92193f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
1 deletion
+15
-1
ffmpeg.texi
doc/ffmpeg.texi
+6
-0
ffmpeg.c
ffmpeg.c
+1
-1
ffmpeg.h
ffmpeg.h
+2
-0
ffmpeg_opt.c
ffmpeg_opt.c
+6
-0
No files found.
doc/ffmpeg.texi
View file @
508d6a23
...
...
@@ -1158,6 +1158,12 @@ This option enables or disables accurate seeking in input files with the
transcoding. Use @option
{
-noaccurate
_
seek
}
to disable it, which may be useful
e.g. when copying some streams and transcoding the others.
@item -thread
_
message
_
queue @var
{
size
}
(@emph
{
input
}
)
This option sets the maximum number of queued packets when reading from the
file or device. With low latency / high rate live streams, packets may be
discarded if they are not read in a timely manner; raising this value can
avoid it.
@item -override
_
ffserver (@emph
{
global
}
)
Overrides the input specifications from @command
{
ffserver
}
. Using this
option you can map any input stream to @command
{
ffserver
}
and control
...
...
ffmpeg.c
View file @
508d6a23
...
...
@@ -3420,7 +3420,7 @@ static int init_input_threads(void)
strcmp
(
f
->
ctx
->
iformat
->
name
,
"lavfi"
))
f
->
non_blocking
=
1
;
ret
=
av_thread_message_queue_alloc
(
&
f
->
in_thread_queue
,
8
,
sizeof
(
AVPacket
));
f
->
thread_queue_size
,
sizeof
(
AVPacket
));
if
(
ret
<
0
)
return
ret
;
...
...
ffmpeg.h
View file @
508d6a23
...
...
@@ -111,6 +111,7 @@ typedef struct OptionsContext {
int64_t
input_ts_offset
;
int
rate_emu
;
int
accurate_seek
;
int
thread_queue_size
;
SpecifierOpt
*
ts_scale
;
int
nb_ts_scale
;
...
...
@@ -350,6 +351,7 @@ typedef struct InputFile {
pthread_t
thread
;
/* thread reading from this file */
int
non_blocking
;
/* reading packets from the thread should not block */
int
joined
;
/* the thread has been joined */
int
thread_queue_size
;
/* maximum number of queued packets */
#endif
}
InputFile
;
...
...
ffmpeg_opt.c
View file @
508d6a23
...
...
@@ -951,6 +951,9 @@ static int open_input_file(OptionsContext *o, const char *filename)
f
->
nb_streams
=
ic
->
nb_streams
;
f
->
rate_emu
=
o
->
rate_emu
;
f
->
accurate_seek
=
o
->
accurate_seek
;
#if HAVE_PTHREADS
f
->
thread_queue_size
=
o
->
thread_queue_size
>
0
?
o
->
thread_queue_size
:
8
;
#endif
/* check if all codec options have been used */
unused_opts
=
strip_specifiers
(
o
->
g
->
codec_opts
);
...
...
@@ -2957,6 +2960,9 @@ const OptionDef options[] = {
{
"disposition"
,
OPT_STRING
|
HAS_ARG
|
OPT_SPEC
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
disposition
)
},
"disposition"
,
""
},
{
"thread_queue_size"
,
HAS_ARG
|
OPT_INT
|
OPT_OFFSET
|
OPT_EXPERT
|
OPT_INPUT
,
{
.
off
=
OFFSET
(
thread_queue_size
)
},
"set the maximum number of queued packets from the demuxer"
},
/* video options */
{
"vframes"
,
OPT_VIDEO
|
HAS_ARG
|
OPT_PERFILE
|
OPT_OUTPUT
,
{
.
func_arg
=
opt_video_frames
},
...
...
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