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
5d21b65c
Commit
5d21b65c
authored
Jan 15, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: report current output device
parent
d6bbd83e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+6
-19
No files found.
modules/audio_output/pulse.c
View file @
5d21b65c
...
...
@@ -325,29 +325,16 @@ static void stream_moved_cb(pa_stream *s, void *userdata)
{
audio_output_t
*
aout
=
userdata
;
aout_sys_t
*
sys
=
aout
->
sys
;
const
char
*
name
=
pa_stream_get_device_name
(
s
);
pa_operation
*
op
;
uint32_t
idx
=
pa_stream_get_device_index
(
s
);
msg_Dbg
(
aout
,
"connected to sink %"
PRIu32
": %s"
,
idx
,
pa_stream_get_device_name
(
s
));
op
=
pa_context_get_sink_info_by_index
(
sys
->
context
,
idx
,
sink_info_cb
,
aout
);
msg_Dbg
(
aout
,
"connected to sink %s"
,
name
);
aout_DeviceReport
(
aout
,
name
);
op
=
pa_context_get_sink_info_by_name
(
sys
->
context
,
name
,
sink_info_cb
,
aout
);
if
(
likely
(
op
!=
NULL
))
pa_operation_unref
(
op
);
/* Update the variable if someone else moved our stream */
var_Change
(
aout
,
"audio-device"
,
VLC_VAR_SETVALUE
,
&
(
vlc_value_t
){
.
i_int
=
idx
},
NULL
);
/* Sink unknown as yet, create stub choice for it */
if
(
var_GetInteger
(
aout
,
"audio-device"
)
!=
idx
)
{
var_Change
(
aout
,
"audio-device"
,
VLC_VAR_ADDCHOICE
,
&
(
vlc_value_t
){
.
i_int
=
idx
},
&
(
vlc_value_t
){
.
psz_string
=
(
char
*
)
"?"
});
var_Change
(
aout
,
"audio-device"
,
VLC_VAR_SETVALUE
,
&
(
vlc_value_t
){
.
i_int
=
idx
},
NULL
);
}
}
static
void
stream_overflow_cb
(
pa_stream
*
s
,
void
*
userdata
)
...
...
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