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
0633d87a
Commit
0633d87a
authored
Oct 07, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_adelay: add option which changes how unset channels are delayed
Fixes #8032.
parent
9a53e012
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
filters.texi
doc/filters.texi
+10
-0
af_adelay.c
libavfilter/af_adelay.c
+7
-0
No files found.
doc/filters.texi
View file @
0633d87a
...
@@ -688,6 +688,10 @@ Unused delays will be silently ignored. If number of given delays is
...
@@ -688,6 +688,10 @@ Unused delays will be silently ignored. If number of given delays is
smaller
than
number
of
channels
all
remaining
channels
will
not
be
delayed
.
smaller
than
number
of
channels
all
remaining
channels
will
not
be
delayed
.
If
you
want
to
delay
exact
number
of
samples
,
append
'S'
to
number
.
If
you
want
to
delay
exact
number
of
samples
,
append
'S'
to
number
.
If
you
want
instead
to
delay
in
seconds
,
append
's'
to
number
.
If
you
want
instead
to
delay
in
seconds
,
append
's'
to
number
.
@
item
all
Use
last
set
delay
for
all
remaining
channels
.
By
default
is
disabled
.
This
option
if
enabled
changes
how
option
@
code
{
delays
}
is
interpreted
.
@
end
table
@
end
table
@
subsection
Examples
@
subsection
Examples
...
@@ -706,6 +710,12 @@ the first channel (and any other channels that may be present) unchanged.
...
@@ -706,6 +710,12 @@ the first channel (and any other channels that may be present) unchanged.
@
example
@
example
adelay
=
0
|
500
S
|
700
S
adelay
=
0
|
500
S
|
700
S
@
end
example
@
end
example
@
item
Delay
all
channels
by
same
number
of
samples
:
@
example
adelay
=
delays
=
64
S
:
all
=
1
@
end
example
@
end
itemize
@
end
itemize
@
section
aderivative
,
aintegral
@
section
aderivative
,
aintegral
...
...
libavfilter/af_adelay.c
View file @
0633d87a
...
@@ -36,6 +36,7 @@ typedef struct ChanDelay {
...
@@ -36,6 +36,7 @@ typedef struct ChanDelay {
typedef
struct
AudioDelayContext
{
typedef
struct
AudioDelayContext
{
const
AVClass
*
class
;
const
AVClass
*
class
;
int
all
;
char
*
delays
;
char
*
delays
;
ChanDelay
*
chandelay
;
ChanDelay
*
chandelay
;
int
nb_delays
;
int
nb_delays
;
...
@@ -54,6 +55,7 @@ typedef struct AudioDelayContext {
...
@@ -54,6 +55,7 @@ typedef struct AudioDelayContext {
static
const
AVOption
adelay_options
[]
=
{
static
const
AVOption
adelay_options
[]
=
{
{
"delays"
,
"set list of delays for each channel"
,
OFFSET
(
delays
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
A
},
{
"delays"
,
"set list of delays for each channel"
,
OFFSET
(
delays
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
A
},
{
"all"
,
"use last available delay for remained channels"
,
OFFSET
(
all
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
A
},
{
NULL
}
{
NULL
}
};
};
...
@@ -163,6 +165,11 @@ static int config_input(AVFilterLink *inlink)
...
@@ -163,6 +165,11 @@ static int config_input(AVFilterLink *inlink)
}
}
}
}
if
(
s
->
all
)
{
for
(
int
j
=
i
+
1
;
j
<
s
->
nb_delays
;
j
++
)
s
->
chandelay
[
j
].
delay
=
s
->
chandelay
[
i
].
delay
;
}
s
->
padding
=
s
->
chandelay
[
0
].
delay
;
s
->
padding
=
s
->
chandelay
[
0
].
delay
;
for
(
i
=
1
;
i
<
s
->
nb_delays
;
i
++
)
{
for
(
i
=
1
;
i
<
s
->
nb_delays
;
i
++
)
{
ChanDelay
*
d
=
&
s
->
chandelay
[
i
];
ChanDelay
*
d
=
&
s
->
chandelay
[
i
];
...
...
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