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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Samuel Mira
ffmpeg
Commits
0e3d2496
Commit
0e3d2496
authored
8 years ago
by
Nicolas George
Browse files
Options
Downloads
Patches
Plain Diff
lavfi: add ff_inlink_process_commands().
parent
846f1421
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavfilter/avfilter.c
+16
-9
16 additions, 9 deletions
libavfilter/avfilter.c
libavfilter/filters.h
+7
-0
7 additions, 0 deletions
libavfilter/filters.h
with
23 additions
and
9 deletions
libavfilter/avfilter.c
+
16
−
9
View file @
0e3d2496
...
@@ -1100,7 +1100,6 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
...
@@ -1100,7 +1100,6 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
AVFilterContext
*
dstctx
=
link
->
dst
;
AVFilterContext
*
dstctx
=
link
->
dst
;
AVFilterPad
*
dst
=
link
->
dstpad
;
AVFilterPad
*
dst
=
link
->
dstpad
;
int
ret
;
int
ret
;
AVFilterCommand
*
cmd
=
link
->
dst
->
command_queue
;
int64_t
pts
;
int64_t
pts
;
if
(
!
(
filter_frame
=
dst
->
filter_frame
))
if
(
!
(
filter_frame
=
dst
->
filter_frame
))
...
@@ -1112,14 +1111,7 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
...
@@ -1112,14 +1111,7 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
goto
fail
;
goto
fail
;
}
}
while
(
cmd
&&
cmd
->
time
<=
frame
->
pts
*
av_q2d
(
link
->
time_base
)){
ff_inlink_process_commands
(
link
,
frame
);
av_log
(
link
->
dst
,
AV_LOG_DEBUG
,
"Processing command time:%f command:%s arg:%s
\n
"
,
cmd
->
time
,
cmd
->
command
,
cmd
->
arg
);
avfilter_process_command
(
link
->
dst
,
cmd
->
command
,
cmd
->
arg
,
0
,
0
,
cmd
->
flags
);
ff_command_queue_pop
(
link
->
dst
);
cmd
=
link
->
dst
->
command_queue
;
}
pts
=
frame
->
pts
;
pts
=
frame
->
pts
;
if
(
dstctx
->
enable_str
)
{
if
(
dstctx
->
enable_str
)
{
...
@@ -1568,6 +1560,21 @@ int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe)
...
@@ -1568,6 +1560,21 @@ int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe)
return
0
;
return
0
;
}
}
int
ff_inlink_process_commands
(
AVFilterLink
*
link
,
const
AVFrame
*
frame
)
{
AVFilterCommand
*
cmd
=
link
->
dst
->
command_queue
;
while
(
cmd
&&
cmd
->
time
<=
frame
->
pts
*
av_q2d
(
link
->
time_base
)){
av_log
(
link
->
dst
,
AV_LOG_DEBUG
,
"Processing command time:%f command:%s arg:%s
\n
"
,
cmd
->
time
,
cmd
->
command
,
cmd
->
arg
);
avfilter_process_command
(
link
->
dst
,
cmd
->
command
,
cmd
->
arg
,
0
,
0
,
cmd
->
flags
);
ff_command_queue_pop
(
link
->
dst
);
cmd
=
link
->
dst
->
command_queue
;
}
return
0
;
}
const
AVClass
*
avfilter_get_class
(
void
)
const
AVClass
*
avfilter_get_class
(
void
)
{
{
return
&
avfilter_class
;
return
&
avfilter_class
;
...
...
This diff is collapsed.
Click to expand it.
libavfilter/filters.h
+
7
−
0
View file @
0e3d2496
...
@@ -39,6 +39,13 @@
...
@@ -39,6 +39,13 @@
*/
*/
void
ff_filter_set_ready
(
AVFilterContext
*
filter
,
unsigned
priority
);
void
ff_filter_set_ready
(
AVFilterContext
*
filter
,
unsigned
priority
);
/**
* Process the commands queued in the link up to the time of the frame.
* Commands will trigger the process_command() callback.
* @return >= 0 or AVERROR code.
*/
int
ff_inlink_process_commands
(
AVFilterLink
*
link
,
const
AVFrame
*
frame
);
/**
/**
* Make sure a frame is writable.
* Make sure a frame is writable.
* This is similar to av_frame_make_writable() except it uses the link's
* This is similar to av_frame_make_writable() except it uses the link's
...
...
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