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
9a064546
Commit
9a064546
authored
Nov 01, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: move aout_ChannelsRestart()
parent
6bec4341
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
24 deletions
+17
-24
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+0
-1
src/audio_output/dec.c
src/audio_output/dec.c
+17
-1
src/audio_output/intf.c
src/audio_output/intf.c
+0
-22
No files found.
src/audio_output/aout_internal.h
View file @
9a064546
...
...
@@ -174,7 +174,6 @@ void aout_DecFlush(audio_output_t *);
bool
aout_DecIsEmpty
(
audio_output_t
*
);
void
aout_InputRequestRestart
(
audio_output_t
*
);
void
aout_RequestRestart
(
audio_output_t
*
);
/* Audio output locking */
static
inline
void
aout_lock
(
audio_output_t
*
p_aout
)
...
...
src/audio_output/dec.c
View file @
9a064546
...
...
@@ -166,7 +166,7 @@ static void aout_CheckRestart (audio_output_t *aout)
* Marks the audio output for restart, to update any parameter of the output
* plug-in (e.g. output device or channel mapping).
*/
void
aout_RequestRestart
(
audio_output_t
*
aout
)
static
void
aout_RequestRestart
(
audio_output_t
*
aout
)
{
aout_owner_t
*
owner
=
aout_owner
(
aout
);
...
...
@@ -174,6 +174,22 @@ void aout_RequestRestart (audio_output_t *aout)
vlc_atomic_set
(
&
owner
->
restart
,
AOUT_RESTART_OUTPUT
|
AOUT_RESTART_INPUT
);
}
int
aout_ChannelsRestart
(
vlc_object_t
*
obj
,
const
char
*
varname
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
data
)
{
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
(
void
)
oldval
;
(
void
)
newval
;
(
void
)
data
;
if
(
!
strcmp
(
varname
,
"audio-device"
))
{
/* This is supposed to be a significant change and supposes
* rebuilding the channel choices. */
var_Destroy
(
aout
,
"stereo-mode"
);
}
aout_RequestRestart
(
aout
);
return
0
;
}
/**
* This function will safely mark aout input to be restarted as soon as
* possible to take configuration changes into account
...
...
src/audio_output/intf.c
View file @
9a064546
...
...
@@ -131,26 +131,4 @@ int aout_MuteSet (vlc_object_t *obj, bool mute)
}
/*
* Pipelines management
*/
/*****************************************************************************
* aout_ChannelsRestart : change the audio device or channels and restart
*****************************************************************************/
int
aout_ChannelsRestart
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
audio_output_t
*
p_aout
=
(
audio_output_t
*
)
p_this
;
(
void
)
oldval
;
(
void
)
newval
;
(
void
)
p_data
;
if
(
!
strcmp
(
psz_variable
,
"audio-device"
)
)
{
/* This is supposed to be a significant change and supposes
* rebuilding the channel choices. */
var_Destroy
(
p_aout
,
"stereo-mode"
);
}
aout_RequestRestart
(
p_aout
);
return
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