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
35e81441
Commit
35e81441
authored
12 years ago
by
Stefano Sabatini
Browse files
Options
Downloads
Patches
Plain Diff
lavfi/sendcmd: switch to filter_frame API
parent
3eae531d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavfilter/f_sendcmd.c
+7
-9
7 additions, 9 deletions
libavfilter/f_sendcmd.c
with
7 additions
and
9 deletions
libavfilter/f_sendcmd.c
+
7
−
9
View file @
35e81441
...
@@ -448,7 +448,7 @@ static void av_cold uninit(AVFilterContext *ctx)
...
@@ -448,7 +448,7 @@ static void av_cold uninit(AVFilterContext *ctx)
av_freep
(
&
sendcmd
->
intervals
);
av_freep
(
&
sendcmd
->
intervals
);
}
}
static
int
process
_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
ref
)
static
int
filter
_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
ref
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
SendCmdContext
*
sendcmd
=
ctx
->
priv
;
SendCmdContext
*
sendcmd
=
ctx
->
priv
;
...
@@ -504,13 +504,12 @@ static int process_frame(AVFilterLink *inlink, AVFilterBufferRef *ref)
...
@@ -504,13 +504,12 @@ static int process_frame(AVFilterLink *inlink, AVFilterBufferRef *ref)
}
}
end:
end:
/* give the reference away, do not store in cur_buf */
inlink
->
cur_buf
=
NULL
;
switch
(
inlink
->
type
)
{
switch
(
inlink
->
type
)
{
case
AVMEDIA_TYPE_VIDEO
:
return
ff_start_frame
(
inlink
->
dst
->
outputs
[
0
],
ref
);
case
AVMEDIA_TYPE_VIDEO
:
case
AVMEDIA_TYPE_AUDIO
:
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
ref
);
case
AVMEDIA_TYPE_AUDIO
:
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
ref
);
}
}
return
AVERROR
(
ENOSYS
);
return
AVERROR
(
ENOSYS
);
}
}
...
@@ -529,8 +528,7 @@ static const AVFilterPad sendcmd_inputs[] = {
...
@@ -529,8 +528,7 @@ static const AVFilterPad sendcmd_inputs[] = {
.
name
=
"default"
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
get_video_buffer
=
ff_null_get_video_buffer
,
.
get_video_buffer
=
ff_null_get_video_buffer
,
.
start_frame
=
process_frame
,
.
filter_frame
=
filter_frame
,
.
end_frame
=
ff_null_end_frame
,
},
},
{
NULL
}
{
NULL
}
};
};
...
@@ -572,7 +570,7 @@ static const AVFilterPad asendcmd_inputs[] = {
...
@@ -572,7 +570,7 @@ static const AVFilterPad asendcmd_inputs[] = {
.
name
=
"default"
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
get_audio_buffer
=
ff_null_get_audio_buffer
,
.
get_audio_buffer
=
ff_null_get_audio_buffer
,
.
filter_frame
=
process
_frame
,
.
filter_frame
=
filter
_frame
,
},
},
{
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