Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
528e05f0
Commit
528e05f0
authored
Aug 10, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/pipewire: add config option "remote"
parent
269583f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
plugins.rst
doc/plugins.rst
+3
-0
PipeWireOutputPlugin.cxx
src/output/plugins/PipeWireOutputPlugin.cxx
+6
-0
No files found.
doc/plugins.rst
View file @
528e05f0
...
...
@@ -1084,6 +1084,9 @@ Connect to a `PipeWire <https://pipewire.org/>`_ server. Requires
- Link to the given target. If not specified, let the PipeWire
manager select a target. To get a list of available targets,
type ``pw-cli dump short Node``
* - **remote NAME**
- The name of the remote to connect to. The default is
``pipewire-0``.
.. _pulse_plugin:
...
...
src/output/plugins/PipeWireOutputPlugin.cxx
View file @
528e05f0
...
...
@@ -54,6 +54,7 @@ static constexpr Domain pipewire_output_domain("pipewire_output");
class
PipeWireOutput
final
:
AudioOutput
{
const
char
*
const
name
;
const
char
*
const
remote
;
const
char
*
const
target
;
struct
pw_thread_loop
*
thread_loop
=
nullptr
;
...
...
@@ -185,6 +186,7 @@ inline
PipeWireOutput
::
PipeWireOutput
(
const
ConfigBlock
&
block
)
:
AudioOutput
(
FLAG_ENABLE_DISABLE
),
name
(
block
.
GetBlockValue
(
"name"
,
"pipewire"
)),
remote
(
block
.
GetBlockValue
(
"remote"
,
nullptr
)),
target
(
block
.
GetBlockValue
(
"target"
,
nullptr
))
{
if
(
target
!=
nullptr
)
{
...
...
@@ -366,6 +368,10 @@ PipeWireOutput::Open(AudioFormat &audio_format)
PW_KEY_APP_NAME
,
"Music Player Daemon"
,
PW_KEY_NODE_NAME
,
"mpd"
,
nullptr
);
if
(
remote
!=
nullptr
&&
target_id
==
PW_ID_ANY
)
pw_properties_setf
(
props
,
PW_KEY_REMOTE_NAME
,
"%s"
,
remote
);
if
(
target
!=
nullptr
&&
target_id
==
PW_ID_ANY
)
pw_properties_setf
(
props
,
PW_KEY_NODE_TARGET
,
"%s"
,
target
);
...
...
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