Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:X0F:branches:multimedia
pulseeffects
pulseeffects_revert-not-move1.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pulseeffects_revert-not-move1.patch of Package pulseeffects
commit 5f207c83ff9f4dea64dfa0e97811dccb3334f5f8 Author: wwmm <wellingtonwallace@gmail.com> Date: Tue Jun 18 12:00:14 2024 -0300 pipe_manager: do not move streams that set PW_KEY_TARGET_OBJECT to a different device than the one we are using diff --git a/src/pipe_manager.cpp b/src/pipe_manager.cpp index 5c537c4cf..dd2cdc249 100644 --- a/src/pipe_manager.cpp +++ b/src/pipe_manager.cpp @@ -308,6 +308,7 @@ void on_node_info(void* object, const struct pw_node_info* info) { } bool ignore_input_stream = false; + bool ignore_output_stream = false; if (nd->nd_info->media_class == tags::pipewire::media_class::input_stream && !pm->input_device.name.empty()) { if (const auto* target_object = spa_dict_lookup(info->props, PW_KEY_TARGET_OBJECT)) { @@ -336,6 +337,33 @@ void on_node_info(void* object, const struct pw_node_info* info) { } } + if (nd->nd_info->media_class == tags::pipewire::media_class::output_stream && !pm->output_device.name.empty()) { + if (const auto* target_object = spa_dict_lookup(info->props, PW_KEY_TARGET_OBJECT)) { + /* + target.object can a name or serial number: + https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/keys.h#L334 + */ + + uint64_t serial = SPA_ID_INVALID; + + util::str_to_num(target_object, serial); + + if (target_object != pm->output_device.name) { + ignore_output_stream = true; + } else if (serial != SPA_ID_INVALID && serial != pm->output_device.serial) { + ignore_output_stream = true; + } + + if (ignore_output_stream) { + util::debug("The output stream " + nd->nd_info->name + + " does not have as target the same output device used as EE: " + pm->output_device.name + + "\n The user wants it to play to device " + target_object + ". We will ignore this stream."); + + remove_node = true; + } + } + } + if (remove_node) { nd->nd_info->proxy = nullptr;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor