Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
1b1688bf
Commit
1b1688bf
authored
Apr 10, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/silencedetect: switch to an AVOptions-based system.
parent
7c11c216
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
17 deletions
+3
-17
filters.texi
doc/filters.texi
+2
-0
af_silencedetect.c
libavfilter/af_silencedetect.c
+0
-17
avfilter.c
libavfilter/avfilter.c
+1
-0
No files found.
doc/filters.texi
View file @
1b1688bf
...
...
@@ -1117,6 +1117,8 @@ minimum detected noise duration.
The printed times and duration are expressed in seconds.
The filter accepts the following options:
@table @option
@item duration, d
Set silence duration until notification (default is 2 seconds).
...
...
libavfilter/af_silencedetect.c
View file @
1b1688bf
...
...
@@ -54,22 +54,6 @@ static const AVOption silencedetect_options[] = {
AVFILTER_DEFINE_CLASS
(
silencedetect
);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
int
ret
;
SilenceDetectContext
*
silence
=
ctx
->
priv
;
silence
->
class
=
&
silencedetect_class
;
av_opt_set_defaults
(
silence
);
if
((
ret
=
av_set_options_string
(
silence
,
args
,
"="
,
":"
))
<
0
)
return
ret
;
av_opt_free
(
silence
);
return
0
;
}
static
char
*
get_metadata_val
(
AVFrame
*
insamples
,
const
char
*
key
)
{
AVDictionaryEntry
*
e
=
av_dict_get
(
insamples
->
metadata
,
key
,
NULL
,
0
);
...
...
@@ -176,7 +160,6 @@ AVFilter avfilter_af_silencedetect = {
.
name
=
"silencedetect"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Detect silence."
),
.
priv_size
=
sizeof
(
SilenceDetectContext
),
.
init
=
init
,
.
query_formats
=
query_formats
,
.
inputs
=
silencedetect_inputs
,
.
outputs
=
silencedetect_outputs
,
...
...
libavfilter/avfilter.c
View file @
1b1688bf
...
...
@@ -681,6 +681,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!
strcmp
(
filter
->
filter
->
name
,
"format"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"noformat"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"resample"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"silencedetect"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"thumbnail"
)
||
// !strcmp(filter->filter->name, "scale" ) ||
0
...
...
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