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
50be0b91
Commit
50be0b91
authored
Aug 28, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: Support queing filter commands for later times
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3d8176d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
ffmpeg.c
ffmpeg.c
+9
-4
No files found.
ffmpeg.c
View file @
50be0b91
...
...
@@ -2683,14 +2683,19 @@ static int transcode(AVFormatContext **output_files,
}
if
(
key
==
'c'
||
key
==
'C'
){
char
ret
[
4096
],
target
[
64
],
cmd
[
256
],
arg
[
256
]
=
{
0
};
fprintf
(
stderr
,
"
\n
Enter command: <target> <command>[ <argument>]
\n
"
);
if
(
scanf
(
"%4095[^
\n\r
]%*c"
,
ret
)
==
1
&&
sscanf
(
ret
,
"%63[^ ] %255[^ ] %255[^
\n
]"
,
target
,
cmd
,
arg
)
>=
2
){
double
ts
;
fprintf
(
stderr
,
"
\n
Enter command: <target> <time> <command>[ <argument>]
\n
"
);
if
(
scanf
(
"%4095[^
\n\r
]%*c"
,
ret
)
==
1
&&
sscanf
(
ret
,
"%63[^ ] %lf %255[^ ] %255[^
\n
]"
,
target
,
&
ts
,
cmd
,
arg
)
>=
3
){
for
(
i
=
0
;
i
<
nb_ostreams
;
i
++
)
{
int
r
;
ost
=
ost_table
[
i
];
if
(
ost
->
graph
){
r
=
avfilter_graph_send_command
(
ost
->
graph
,
target
,
cmd
,
arg
,
ret
,
sizeof
(
ret
),
key
==
'c'
?
AVFILTER_CMD_FLAG_ONE
:
0
);
fprintf
(
stderr
,
"Command reply for %d: %d, %s
\n
"
,
i
,
r
,
ret
);
if
(
ts
<
0
){
r
=
avfilter_graph_send_command
(
ost
->
graph
,
target
,
cmd
,
arg
,
ret
,
sizeof
(
ret
),
key
==
'c'
?
AVFILTER_CMD_FLAG_ONE
:
0
);
fprintf
(
stderr
,
"Command reply for %d: %d, %s
\n
"
,
i
,
r
,
ret
);
}
else
{
r
=
avfilter_graph_queue_command
(
ost
->
graph
,
target
,
cmd
,
arg
,
0
,
ts
);
}
}
}
}
else
{
...
...
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