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
110a2f44
Commit
110a2f44
authored
Sep 24, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_ladspa: allow changing controls dynamically
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
4d86a945
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
filters.texi
doc/filters.texi
+10
-0
af_ladspa.c
libavfilter/af_ladspa.c
+13
-0
No files found.
doc/filters.texi
View file @
110a2f44
...
@@ -1502,6 +1502,16 @@ ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
...
@@ -1502,6 +1502,16 @@ ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
@end example
@end example
@end itemize
@end itemize
@subsection Commands
This filter supports the following commands:
@table @option
@item cN
Modify the @var{N}-th control value.
If the specified value is not valid, it is ignored and prior one is kept.
@end table
@section lowpass
@section lowpass
Apply a low-pass filter with 3dB point frequency.
Apply a low-pass filter with 3dB point frequency.
...
...
libavfilter/af_ladspa.c
View file @
110a2f44
...
@@ -662,6 +662,18 @@ static av_cold void uninit(AVFilterContext *ctx)
...
@@ -662,6 +662,18 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep
(
&
ctx
->
input_pads
[
0
].
name
);
av_freep
(
&
ctx
->
input_pads
[
0
].
name
);
}
}
static
int
process_command
(
AVFilterContext
*
ctx
,
const
char
*
cmd
,
const
char
*
args
,
char
*
res
,
int
res_len
,
int
flags
)
{
LADSPA_Data
value
;
unsigned
long
port
;
if
(
sscanf
(
cmd
,
"c%ld"
,
&
port
)
+
sscanf
(
args
,
"%f"
,
&
value
)
!=
2
)
return
AVERROR
(
EINVAL
);
return
set_control
(
ctx
,
port
,
value
);
}
static
const
AVFilterPad
ladspa_outputs
[]
=
{
static
const
AVFilterPad
ladspa_outputs
[]
=
{
{
{
.
name
=
"default"
,
.
name
=
"default"
,
...
@@ -680,6 +692,7 @@ AVFilter avfilter_af_ladspa = {
...
@@ -680,6 +692,7 @@ AVFilter avfilter_af_ladspa = {
.
init
=
init
,
.
init
=
init
,
.
uninit
=
uninit
,
.
uninit
=
uninit
,
.
query_formats
=
query_formats
,
.
query_formats
=
query_formats
,
.
process_command
=
process_command
,
.
inputs
=
0
,
.
inputs
=
0
,
.
outputs
=
ladspa_outputs
,
.
outputs
=
ladspa_outputs
,
.
flags
=
AVFILTER_FLAG_DYNAMIC_INPUTS
,
.
flags
=
AVFILTER_FLAG_DYNAMIC_INPUTS
,
...
...
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