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
1b22bdf4
Commit
1b22bdf4
authored
Dec 03, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_agate: compile agate only when requested.
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
69070461
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
29 deletions
+33
-29
af_agate.c
libavfilter/af_agate.c
+33
-29
No files found.
libavfilter/af_agate.c
View file @
1b22bdf4
...
...
@@ -79,35 +79,6 @@ static const AVOption options[] = {
{
NULL
}
};
#define agate_options options
AVFILTER_DEFINE_CLASS
(
agate
);
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
AVFilterFormats
*
formats
=
NULL
;
AVFilterChannelLayouts
*
layouts
;
int
ret
;
if
((
ret
=
ff_add_format
(
&
formats
,
AV_SAMPLE_FMT_DBL
))
<
0
)
return
ret
;
ret
=
ff_set_common_formats
(
ctx
,
formats
);
if
(
ret
<
0
)
return
ret
;
layouts
=
ff_all_channel_counts
();
if
(
!
layouts
)
return
AVERROR
(
ENOMEM
);
ret
=
ff_set_common_channel_layouts
(
ctx
,
layouts
);
if
(
ret
<
0
)
return
ret
;
formats
=
ff_all_samplerates
();
if
(
!
formats
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_samplerates
(
ctx
,
formats
);
}
static
int
agate_config_input
(
AVFilterLink
*
inlink
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
...
...
@@ -197,6 +168,37 @@ static void gate(AudioGateContext *s,
}
}
#if CONFIG_AGATE_FILTER
#define agate_options options
AVFILTER_DEFINE_CLASS
(
agate
);
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
AVFilterFormats
*
formats
=
NULL
;
AVFilterChannelLayouts
*
layouts
;
int
ret
;
if
((
ret
=
ff_add_format
(
&
formats
,
AV_SAMPLE_FMT_DBL
))
<
0
)
return
ret
;
ret
=
ff_set_common_formats
(
ctx
,
formats
);
if
(
ret
<
0
)
return
ret
;
layouts
=
ff_all_channel_counts
();
if
(
!
layouts
)
return
AVERROR
(
ENOMEM
);
ret
=
ff_set_common_channel_layouts
(
ctx
,
layouts
);
if
(
ret
<
0
)
return
ret
;
formats
=
ff_all_samplerates
();
if
(
!
formats
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_samplerates
(
ctx
,
formats
);
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
in
)
{
const
double
*
src
=
(
const
double
*
)
in
->
data
[
0
];
...
...
@@ -254,6 +256,8 @@ AVFilter ff_af_agate = {
.
outputs
=
outputs
,
};
#endif
/* CONFIG_AGATE_FILTER */
#if CONFIG_SIDECHAINGATE_FILTER
#define sidechaingate_options options
...
...
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