Cvc.MixerControl¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Name to display for this mixer control |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Cvc.MixerControl(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- change_input(input)¶
- Parameters:
input (
Cvc.MixerUIDevice
) –This method is called from the UI when the user selects a previously unselected device.
Firstly it queries the stream from the device.
It assumes that if the stream is null that it cannot be a bluetooth or network stream (they never show unless they have valid sinks and sources) In the scenario of a
None
stream on the deviceIt fetches the device’s preferred profile or if NUll the profile with the highest priority on that device.
It then caches this device in control->priv->cached_desired_input_id so that when the update_source triggered from when we attempt to change profile we will know exactly what device to highlight on that stream.
It attempts to swap the profile on the card from that device and returns.
Next, it handles network or bluetooth streams that only require their stream to be made the default.
Next it deals with port changes so if the stream’s active port is not the same as the port on the device it will attempt to change the port on that stream to be same as the device. If this fails it will return.
Finally it will set this new stream to be the default stream and emit a signal for the UI confirming the active input device.
- change_output(output)¶
- Parameters:
output (
Cvc.MixerUIDevice
) –This method is called from the UI when the user selects a previously unselected device.
Firstly it queries the stream from the device.
It assumes that if the stream is null that it cannot be a bluetooth or network stream (they never show unless they have valid sinks and sources) In the scenario of a
None
stream on the deviceIt fetches the device’s preferred profile or if NUll the profile with the highest priority on that device.
It then caches this device in control->priv->cached_desired_output_id so that when the update_sink triggered from when we attempt to change profile we will know exactly what device to highlight on that stream.
It attempts to swap the profile on the card from that device and returns.
Next, it handles network or bluetooth streams that only require their stream to be made the default.
Next it deals with port changes so if the stream’s active port is not the same as the port on the device it will attempt to change the port on that stream to be same as the device. If this fails it will return.
Finally it will set this new stream to be the default stream and emit a signal for the UI confirming the active output device.
- change_profile_on_selected_device(device, profile)¶
- Parameters:
device (
Cvc.MixerUIDevice
) –profile (
str
orNone
) – Can beNone
if any profile present on this port is okay
- Returns:
This method will attempt to swap the profile on the card of the device with given profile name. If successfull it will set the preferred profile on that device so as we know the next time the user moves to that device it should have this profile active.
- Return type:
- get_cards()¶
- Return type:
- get_default_sink()¶
- Return type:
- get_default_source()¶
- Return type:
- get_event_sink_input()¶
- Return type:
- get_sink_inputs()¶
- Return type:
- get_sinks()¶
- Return type:
- get_source_outputs()¶
- Return type:
- get_sources()¶
- Return type:
- get_state()¶
- Return type:
- get_stream_from_device(device)¶
- Parameters:
device (
Cvc.MixerUIDevice
) –- Return type:
- get_streams()¶
- Return type:
- lookup_device_from_stream(stream)¶
- Parameters:
stream (
Cvc.MixerStream
) –- Returns:
a #GvcUIDevice or
None
- Return type:
- set_default_sink(stream)¶
- Parameters:
stream (
Cvc.MixerStream
) –- Return type:
- set_default_source(stream)¶
- Parameters:
stream (
Cvc.MixerStream
) –- Return type:
- set_headset_port(id, choices)¶
- Parameters:
id (
int
) –choices (
Cvc.HeadsetPortChoice
) –
- do_audio_device_selection_needed(id, show_dialog, choices) virtual¶
- Parameters:
id (
int
) –show_dialog (
bool
) –choices (
Cvc.HeadsetPortChoice
) –
- do_state_changed(new_state) virtual¶
- Parameters:
new_state (
Cvc.MixerControlState
) –
Signal Details¶
- Cvc.MixerControl.signals.active_input_update(mixer_control, object)¶
- Signal Name:
active-input-update
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.active_output_update(mixer_control, object)¶
- Signal Name:
active-output-update
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.audio_device_selection_needed(mixer_control, object, p0, p1)¶
- Signal Name:
audio-device-selection-needed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –p0 (
bool
) –p1 (
int
) –
- Cvc.MixerControl.signals.card_added(mixer_control, object)¶
- Signal Name:
card-added
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.card_removed(mixer_control, object)¶
- Signal Name:
card-removed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.default_sink_changed(mixer_control, object)¶
- Signal Name:
default-sink-changed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.default_source_changed(mixer_control, object)¶
- Signal Name:
default-source-changed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.input_added(mixer_control, object)¶
- Signal Name:
input-added
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.input_removed(mixer_control, object)¶
- Signal Name:
input-removed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.output_added(mixer_control, object)¶
- Signal Name:
output-added
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.output_removed(mixer_control, object)¶
- Signal Name:
output-removed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.state_changed(mixer_control, object)¶
- Signal Name:
state-changed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.stream_added(mixer_control, object)¶
- Signal Name:
stream-added
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.stream_changed(mixer_control, object)¶
- Signal Name:
stream-changed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –
- Cvc.MixerControl.signals.stream_removed(mixer_control, object)¶
- Signal Name:
stream-removed
- Flags:
- Parameters:
mixer_control (
Cvc.MixerControl
) – The object which received the signalobject (
int
) –