Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ff429160
Commit
ff429160
authored
Mar 10, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: reset the audio output when selecting amem or custom plugin
parent
b1ff0c7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
lib/audio.c
lib/audio.c
+9
-0
lib/media_player.c
lib/media_player.c
+8
-0
No files found.
lib/audio.c
View file @
ff429160
...
...
@@ -127,6 +127,15 @@ int libvlc_audio_output_set( libvlc_media_player_t *mp, const char *psz_name )
return
-
1
;
var_SetString
(
mp
,
"aout"
,
value
);
free
(
value
);
/* Forget the existing audio output */
input_resource_ResetAout
(
mp
->
input
.
p_resource
);
/* Create a new audio output */
audio_output_t
*
aout
=
input_resource_GetAout
(
mp
->
input
.
p_resource
);
if
(
aout
!=
NULL
)
input_resource_PutAout
(
mp
->
input
.
p_resource
,
aout
);
return
0
;
}
...
...
lib/media_player.c
View file @
ff429160
...
...
@@ -988,12 +988,16 @@ void libvlc_audio_set_callbacks( libvlc_media_player_t *mp,
var_SetAddress
(
mp
,
"amem-drain"
,
drain_cb
);
var_SetAddress
(
mp
,
"amem-data"
,
opaque
);
var_SetString
(
mp
,
"aout"
,
"amem,none"
);
input_resource_ResetAout
(
mp
->
input
.
p_resource
);
}
void
libvlc_audio_set_volume_callback
(
libvlc_media_player_t
*
mp
,
libvlc_audio_set_volume_cb
cb
)
{
var_SetAddress
(
mp
,
"amem-set-volume"
,
cb
);
input_resource_ResetAout
(
mp
->
input
.
p_resource
);
}
void
libvlc_audio_set_format_callbacks
(
libvlc_media_player_t
*
mp
,
...
...
@@ -1002,6 +1006,8 @@ void libvlc_audio_set_format_callbacks( libvlc_media_player_t *mp,
{
var_SetAddress
(
mp
,
"amem-setup"
,
setup
);
var_SetAddress
(
mp
,
"amem-cleanup"
,
cleanup
);
input_resource_ResetAout
(
mp
->
input
.
p_resource
);
}
void
libvlc_audio_set_format
(
libvlc_media_player_t
*
mp
,
const
char
*
format
,
...
...
@@ -1010,6 +1016,8 @@ void libvlc_audio_set_format( libvlc_media_player_t *mp, const char *format,
var_SetString
(
mp
,
"amem-format"
,
format
);
var_SetInteger
(
mp
,
"amem-rate"
,
rate
);
var_SetInteger
(
mp
,
"amem-channels"
,
channels
);
input_resource_ResetAout
(
mp
->
input
.
p_resource
);
}
...
...
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