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
bd465fdc
Commit
bd465fdc
authored
Dec 02, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/framestep: switch to ff_filter_frame API
parent
fbc339ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
26 deletions
+7
-26
vf_framestep.c
libavfilter/vf_framestep.c
+7
-26
No files found.
libavfilter/vf_framestep.c
View file @
bd465fdc
...
@@ -66,35 +66,18 @@ static int config_output_props(AVFilterLink *outlink)
...
@@ -66,35 +66,18 @@ static int config_output_props(AVFilterLink *outlink)
return
0
;
return
0
;
}
}
static
int
start
_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
ref
)
static
int
filter
_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
ref
)
{
{
FrameStepContext
*
framestep
=
inlink
->
dst
->
priv
;
FrameStepContext
*
framestep
=
inlink
->
dst
->
priv
;
framestep
->
frame_selected
=
0
;
if
(
!
(
framestep
->
frame_count
++
%
framestep
->
frame_step
))
{
if
(
!
(
framestep
->
frame_count
++
%
framestep
->
frame_step
))
{
inlink
->
cur_buf
=
NULL
;
framestep
->
frame_selected
=
1
;
framestep
->
frame_selected
=
1
;
return
ff_start_frame
(
inlink
->
dst
->
outputs
[
0
],
ref
);
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
ref
);
}
}
else
{
return
0
;
framestep
->
frame_selected
=
0
;
}
avfilter_unref_buffer
(
ref
);
static
int
draw_slice
(
AVFilterLink
*
inlink
,
int
y
,
int
h
,
int
slice_dir
)
{
FrameStepContext
*
framestep
=
inlink
->
dst
->
priv
;
if
(
framestep
->
frame_selected
)
return
ff_draw_slice
(
inlink
->
dst
->
outputs
[
0
],
y
,
h
,
slice_dir
);
return
0
;
}
static
int
end_frame
(
AVFilterLink
*
inlink
)
{
FrameStepContext
*
framestep
=
inlink
->
dst
->
priv
;
if
(
framestep
->
frame_selected
)
return
ff_end_frame
(
inlink
->
dst
->
outputs
[
0
]);
return
0
;
return
0
;
}
}
}
static
int
request_frame
(
AVFilterLink
*
outlink
)
static
int
request_frame
(
AVFilterLink
*
outlink
)
...
@@ -116,9 +99,7 @@ static const AVFilterPad framestep_inputs[] = {
...
@@ -116,9 +99,7 @@ static const AVFilterPad framestep_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
=
start_frame
,
.
filter_frame
=
filter_frame
,
.
draw_slice
=
draw_slice
,
.
end_frame
=
end_frame
,
},
},
{
NULL
}
{
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