diff options
author | Tanu Kaskinen <tanu.kaskinen@digia.com> | 2011-02-07 18:35:51 +0200 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2011-02-22 10:10:48 +0000 |
commit | 969c7c80fe380a7263472fa065f04990286ed7bb (patch) | |
tree | a763183a372f3099695cab2eb2c6c57f2ea40ea5 /src/modules/module-ladspa-sink.c | |
parent | 1f848f82c4571f169f18f86b4bd2ec6f863acca0 (diff) | |
download | pulseaudio-969c7c80fe380a7263472fa065f04990286ed7bb.tar.gz |
core: Link virtual sinks and sources to their streams.
This change doesn't add any functionality in itself, but it will be useful in
the future for operating on chains of sinks or sources that are piggy-backing
on each other.
For example, the PA_PROP_DEVICE_MASTER_DEVICE property could
be handled in the core so that each virtual device doesn't have to maintain it
separately. By using the origin_sink and destination_source pointers the core
is able to see at stream creation time that the stream is created by a virtual
device, and then update that device's property list using the name of the
master device that the stream is being connected to. The same thing can be done
also when the stream is being moved from a device to another, in which case the
_MASTER_DEVICE property needs updating.
Diffstat (limited to 'src/modules/module-ladspa-sink.c')
-rw-r--r-- | src/modules/module-ladspa-sink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c index 88df67eca..cdccf1a33 100644 --- a/src/modules/module-ladspa-sink.c +++ b/src/modules/module-ladspa-sink.c @@ -832,6 +832,7 @@ int pa__init(pa_module*m) { sink_input_data.driver = __FILE__; sink_input_data.module = m; sink_input_data.sink = master; + sink_input_data.origin_sink = u->sink; pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "LADSPA Stream"); pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "filter"); pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss); @@ -859,6 +860,8 @@ int pa__init(pa_module*m) { u->sink_input->mute_changed = sink_input_mute_changed_cb; u->sink_input->userdata = u; + u->sink->input_to_master = u->sink_input; + pa_sink_put(u->sink); pa_sink_input_put(u->sink_input); |