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
a8ffc3b8
Commit
a8ffc3b8
authored
Jul 27, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: propagate current device to parent input manager
parent
bd8485fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
lib/media_player.c
lib/media_player.c
+1
-0
src/audio_output/output.c
src/audio_output/output.c
+11
-0
src/playlist/engine.c
src/playlist/engine.c
+1
-0
No files found.
lib/media_player.c
View file @
a8ffc3b8
...
...
@@ -621,6 +621,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
/* Audio */
var_Create
(
mp
,
"aout"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
mp
,
"audio-device"
,
VLC_VAR_STRING
);
var_Create
(
mp
,
"mute"
,
VLC_VAR_BOOL
);
var_Create
(
mp
,
"volume"
,
VLC_VAR_FLOAT
);
var_Create
(
mp
,
"corks"
,
VLC_VAR_INTEGER
);
...
...
src/audio_output/output.c
View file @
a8ffc3b8
...
...
@@ -64,6 +64,15 @@ static int var_Copy (vlc_object_t *src, const char *name, vlc_value_t prev,
return
var_Set
(
dst
,
name
,
value
);
}
static
int
var_CopyDevice
(
vlc_object_t
*
src
,
const
char
*
name
,
vlc_value_t
prev
,
vlc_value_t
value
,
void
*
data
)
{
vlc_object_t
*
dst
=
data
;
(
void
)
src
;
(
void
)
name
;
(
void
)
prev
;
return
var_Set
(
dst
,
"audio-device"
,
value
);
}
/**
* Supply or update the current custom ("hardware") volume.
* @note This only makes sense after calling aout_VolumeHardInit().
...
...
@@ -192,6 +201,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
var_Create
(
aout
,
"mute"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_AddCallback
(
aout
,
"mute"
,
var_Copy
,
parent
);
var_Create
(
aout
,
"device"
,
VLC_VAR_STRING
);
var_AddCallback
(
aout
,
"device"
,
var_CopyDevice
,
parent
);
aout
->
event
.
volume_report
=
aout_VolumeNotify
;
aout
->
event
.
mute_report
=
aout_MuteNotify
;
...
...
@@ -324,6 +334,7 @@ void aout_Destroy (audio_output_t *aout)
aout_OutputUnlock
(
aout
);
var_DelCallback
(
aout
,
"audio-filter"
,
FilterCallback
,
NULL
);
var_DelCallback
(
aout
,
"device"
,
var_CopyDevice
,
aout
->
p_parent
);
var_DelCallback
(
aout
,
"mute"
,
var_Copy
,
aout
->
p_parent
);
var_SetFloat
(
aout
,
"volume"
,
-
1
.
f
);
var_DelCallback
(
aout
,
"volume"
,
var_Copy
,
aout
->
p_parent
);
...
...
src/playlist/engine.c
View file @
a8ffc3b8
...
...
@@ -480,6 +480,7 @@ static void VariablesInit( playlist_t *p_playlist )
var_Create
(
p_playlist
,
"video-wallpaper"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
/* Audio output parameters */
var_Create
(
p_playlist
,
"audio-device"
,
VLC_VAR_STRING
);
var_Create
(
p_playlist
,
"mute"
,
VLC_VAR_BOOL
);
var_Create
(
p_playlist
,
"volume"
,
VLC_VAR_FLOAT
);
var_SetFloat
(
p_playlist
,
"volume"
,
-
1
.
f
);
...
...
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