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
8bee8f77
Commit
8bee8f77
authored
Nov 04, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lswr/swresample: use AV_OPT_TYPE_SAMPLE_FMT for sample format options
Improve usability and robustness.
parent
7e93b0ba
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
18 deletions
+12
-18
ffmpeg-resampler.texi
doc/ffmpeg-resampler.texi
+3
-9
swresample.c
libswresample/swresample.c
+6
-6
swresample.h
libswresample/swresample.h
+2
-2
version.h
libswresample/version.h
+1
-1
No files found.
doc/ffmpeg-resampler.texi
View file @
8bee8f77
...
...
@@ -52,19 +52,13 @@ Set the input sample rate. Default value is 0.
Set the output sample rate. Default value is 0.
@item isf, in
_
sample
_
fmt
Specify the input sample format. Must be an integer representing the
corresponding sample format specified in
@file
{
libavutil/samplefmt.h
}
header. Default value is -1
(corresponding to @code
{
AV
_
SAMPLE
_
FMT
_
NONE
}
).
Specify the input sample format. It is set by default to @code
{
none
}
.
@item osf, out
_
sample
_
fmt
Specify the output sample format. Must be an integer representing the
corresponding sample format specified in
@file
{
libavutil/samplefmt.h
}
header. Default value is -1
(corresponding to @code
{
AV
_
SAMPLE
_
FMT
_
NONE
}
).
Specify the output sample format. It is set by default to @code
{
none
}
.
@item tsf, internal
_
sample
_
fmt
Set the internal sample format. Default value is
-1
.
Set the internal sample format. Default value is
@code
{
none
}
.
@item icl, in
_
channel
_
layout
Set the input channel layout.
...
...
libswresample/swresample.c
View file @
8bee8f77
...
...
@@ -51,12 +51,12 @@ static const AVOption options[]={
{
"in_sample_rate"
,
"set input sample rate"
,
OFFSET
(
in_sample_rate
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
PARAM
},
{
"osr"
,
"set output sample rate"
,
OFFSET
(
out_sample_rate
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
PARAM
},
{
"out_sample_rate"
,
"set output sample rate"
,
OFFSET
(
out_sample_rate
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
PARAM
},
{
"isf"
,
"set input sample format"
,
OFFSET
(
in_sample_fmt
),
AV_OPT_TYPE_
INT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
+
256
,
PARAM
},
{
"in_sample_fmt"
,
"set input sample format"
,
OFFSET
(
in_sample_fmt
),
AV_OPT_TYPE_
INT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
+
256
,
PARAM
},
{
"osf"
,
"set output sample format"
,
OFFSET
(
out_sample_fmt
),
AV_OPT_TYPE_
INT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
+
256
,
PARAM
},
{
"out_sample_fmt"
,
"set output sample format"
,
OFFSET
(
out_sample_fmt
),
AV_OPT_TYPE_
INT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
+
256
,
PARAM
},
{
"tsf"
,
"set internal sample format"
,
OFFSET
(
int_sample_fmt
),
AV_OPT_TYPE_
INT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_FLTP
,
PARAM
},
{
"internal_sample_fmt"
,
"set internal sample format"
,
OFFSET
(
int_sample_fmt
),
AV_OPT_TYPE_
INT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_FLTP
,
PARAM
},
{
"isf"
,
"set input sample format"
,
OFFSET
(
in_sample_fmt
),
AV_OPT_TYPE_
SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
,
PARAM
},
{
"in_sample_fmt"
,
"set input sample format"
,
OFFSET
(
in_sample_fmt
),
AV_OPT_TYPE_
SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
,
PARAM
},
{
"osf"
,
"set output sample format"
,
OFFSET
(
out_sample_fmt
),
AV_OPT_TYPE_
SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
,
PARAM
},
{
"out_sample_fmt"
,
"set output sample format"
,
OFFSET
(
out_sample_fmt
),
AV_OPT_TYPE_
SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
,
PARAM
},
{
"tsf"
,
"set internal sample format"
,
OFFSET
(
int_sample_fmt
),
AV_OPT_TYPE_
SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
,
PARAM
},
{
"internal_sample_fmt"
,
"set internal sample format"
,
OFFSET
(
int_sample_fmt
),
AV_OPT_TYPE_
SAMPLE_FMT
,
{.
i64
=
AV_SAMPLE_FMT_NONE
},
-
1
,
AV_SAMPLE_FMT_NB
-
1
,
PARAM
},
{
"icl"
,
"set input channel layout"
,
OFFSET
(
in_ch_layout
),
AV_OPT_TYPE_INT64
,
{.
i64
=
0
},
0
,
INT64_MAX
,
PARAM
,
"channel_layout"
},
{
"in_channel_layout"
,
"set input channel layout"
,
OFFSET
(
in_ch_layout
),
AV_OPT_TYPE_INT64
,
{.
i64
=
0
},
0
,
INT64_MAX
,
PARAM
,
"channel_layout"
},
{
"ocl"
,
"set output channel layout"
,
OFFSET
(
out_ch_layout
),
AV_OPT_TYPE_INT64
,
{.
i64
=
0
},
0
,
INT64_MAX
,
PARAM
,
"channel_layout"
},
...
...
libswresample/swresample.h
View file @
8bee8f77
...
...
@@ -47,8 +47,8 @@
* av_opt_set_int(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
* av_opt_set_int(swr, "in_sample_rate", 48000, 0);
* av_opt_set_int(swr, "out_sample_rate", 44100, 0);
* av_opt_set_
int(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP,
0);
* av_opt_set_
int(swr, "out_sample_fmt, AV_SAMPLE_FMT_S16,
0);
* av_opt_set_
sample_fmt(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP,
0);
* av_opt_set_
sample_fmt(swr, "out_sample_fmt, AV_SAMPLE_FMT_S16,
0);
* @endcode
*
* Once all values have been set, it must be initialized with swr_init(). If
...
...
libswresample/version.h
View file @
8bee8f77
...
...
@@ -30,7 +30,7 @@
#define LIBSWRESAMPLE_VERSION_MAJOR 0
#define LIBSWRESAMPLE_VERSION_MINOR 17
#define LIBSWRESAMPLE_VERSION_MICRO 10
1
#define LIBSWRESAMPLE_VERSION_MICRO 10
2
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
LIBSWRESAMPLE_VERSION_MINOR, \
...
...
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