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
0f0f8407
Commit
0f0f8407
authored
Nov 08, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_aiir: implement rate option
parent
1d9fe1fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
af_aiir.c
libavfilter/af_aiir.c
+12
-4
No files found.
libavfilter/af_aiir.c
View file @
0f0f8407
...
...
@@ -63,6 +63,7 @@ typedef struct AudioIIRContext {
int
response
;
int
w
,
h
;
int
ir_channel
;
AVRational
rate
;
AVFrame
*
video
;
...
...
@@ -939,11 +940,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if
(
s
->
response
)
{
AVFilterLink
*
outlink
=
ctx
->
outputs
[
1
];
int64_t
old_pts
=
s
->
video
->
pts
;
int64_t
new_pts
=
av_rescale_q
(
out
->
pts
,
ctx
->
inputs
[
0
]
->
time_base
,
outlink
->
time_base
);
s
->
video
->
pts
=
out
->
pts
;
ret
=
ff_filter_frame
(
outlink
,
av_frame_clone
(
s
->
video
));
if
(
ret
<
0
)
return
ret
;
if
(
new_pts
>
old_pts
)
{
s
->
video
->
pts
=
new_pts
;
ret
=
ff_filter_frame
(
outlink
,
av_frame_clone
(
s
->
video
));
if
(
ret
<
0
)
return
ret
;
}
}
return
ff_filter_frame
(
outlink
,
out
);
...
...
@@ -957,6 +962,8 @@ static int config_video(AVFilterLink *outlink)
outlink
->
sample_aspect_ratio
=
(
AVRational
){
1
,
1
};
outlink
->
w
=
s
->
w
;
outlink
->
h
=
s
->
h
;
outlink
->
frame_rate
=
s
->
rate
;
outlink
->
time_base
=
av_inv_q
(
outlink
->
frame_rate
);
return
0
;
}
...
...
@@ -1070,6 +1077,7 @@ static const AVOption aiir_options[] = {
{
"response"
,
"show IR frequency response"
,
OFFSET
(
response
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
VF
},
{
"channel"
,
"set IR channel to display frequency response"
,
OFFSET
(
ir_channel
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1024
,
VF
},
{
"size"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"hd720"
},
0
,
0
,
VF
},
{
"rate"
,
"set video rate"
,
OFFSET
(
rate
),
AV_OPT_TYPE_VIDEO_RATE
,
{.
str
=
"25"
},
0
,
INT32_MAX
,
VF
},
{
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