Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
860f1ae1
Commit
860f1ae1
authored
Apr 24, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make resampler configurable with --audio-resampler
parent
11860310
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
src/audio_output/filters.c
src/audio_output/filters.c
+17
-9
src/libvlc-module.c
src/libvlc-module.c
+7
-0
No files found.
src/audio_output/filters.c
View file @
860f1ae1
...
...
@@ -44,25 +44,33 @@
* FindFilter: find an audio filter for a specific transformation
*****************************************************************************/
static
filter_t
*
FindFilter
(
vlc_object_t
*
obj
,
const
audio_sample_format_t
*
p_input_forma
t
,
const
audio_sample_format_t
*
p_output_forma
t
)
const
audio_sample_format_t
*
infm
t
,
const
audio_sample_format_t
*
outfm
t
)
{
static
const
char
typename
[]
=
"audio filter"
;
const
char
*
type
=
"audio filter"
,
*
name
=
NULL
;
filter_t
*
p_filter
;
p_filter
=
vlc_custom_create
(
obj
,
sizeof
(
*
p_filter
),
typename
);
if
(
p_filter
==
NULL
)
return
NULL
;
memcpy
(
&
p_filter
->
fmt_in
.
audio
,
p_input_format
,
sizeof
(
audio_sample_format_t
)
);
p_filter
->
fmt_in
.
i_codec
=
p_input_format
->
i_format
;
memcpy
(
&
p_filter
->
fmt_out
.
audio
,
p_output_format
,
sizeof
(
audio_sample_format_t
)
);
p_filter
->
fmt_out
.
i_codec
=
p_output_format
->
i_format
;
p_filter
->
fmt_in
.
audio
=
*
infmt
;
p_filter
->
fmt_in
.
i_codec
=
infmt
->
i_format
;
p_filter
->
fmt_out
.
audio
=
*
outfmt
;
p_filter
->
fmt_out
.
i_codec
=
outfmt
->
i_format
;
p_filter
->
p_owner
=
NULL
;
p_filter
->
p_module
=
module_need
(
p_filter
,
"audio filter"
,
NULL
,
false
);
if
(
infmt
->
i_format
==
outfmt
->
i_format
&&
infmt
->
i_physical_channels
==
outfmt
->
i_physical_channels
&&
infmt
->
i_original_channels
==
outfmt
->
i_original_channels
)
{
assert
(
infmt
->
i_rate
!=
outfmt
->
i_rate
);
type
=
"audio resampler"
;
name
=
"$audio-resampler"
;
}
p_filter
->
p_module
=
module_need
(
p_filter
,
type
,
name
,
false
);
if
(
p_filter
->
p_module
==
NULL
)
{
vlc_object_release
(
p_filter
);
...
...
src/libvlc-module.c
View file @
860f1ae1
...
...
@@ -295,6 +295,10 @@ static const char *const ppsz_snap_formats[] =
"This delays the audio output. The delay must be given in milliseconds. " \
"This can be handy if you notice a lag between the video and the audio.")
#define AUDIO_RESAMPLER_TEXT N_("Audio resampler")
#define AUDIO_RESAMPLER_LONGTEXT N_( \
"This selects which plugin to use for audio resampling." )
#define MULTICHA_TEXT N_("Audio output channels mode")
#define MULTICHA_LONGTEXT N_( \
"This sets the audio output channels mode that will " \
...
...
@@ -1605,6 +1609,9 @@ vlc_module_begin ()
DESYNC_LONGTEXT
,
true
)
change_safe
()
add_module
(
"audio-resampler"
,
"audio resampler"
,
NULL
,
AUDIO_RESAMPLER_TEXT
,
AUDIO_RESAMPLER_LONGTEXT
,
true
)
/* FIXME TODO create a subcat replay gain ? */
add_string
(
"audio-replay-gain-mode"
,
ppsz_replay_gain_mode
[
0
],
AUDIO_REPLAY_GAIN_MODE_TEXT
,
AUDIO_REPLAY_GAIN_MODE_LONGTEXT
,
false
)
...
...
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