mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
use TARGET_OBJECT instead of the deprecated NODE_TARGET
Clarify the docs.
This commit is contained in:
parent
a7df07c449
commit
2254c74fb9
6 changed files with 14 additions and 15 deletions
|
|
@ -580,8 +580,8 @@ static int snd_pcm_pipewire_prepare(snd_pcm_ioplug_t *io)
|
|||
if (pw_properties_get(props, PW_KEY_NODE_RATE) == NULL)
|
||||
pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%u", io->rate);
|
||||
if (pw->target != NULL && !spa_streq(pw->target, "-1") &&
|
||||
pw_properties_get(props, PW_KEY_NODE_TARGET) == NULL)
|
||||
pw_properties_setf(props, PW_KEY_NODE_TARGET, "%s", pw->target);
|
||||
pw_properties_get(props, PW_KEY_TARGET_OBJECT) == NULL)
|
||||
pw_properties_setf(props, PW_KEY_TARGET_OBJECT, "%s", pw->target);
|
||||
|
||||
if (pw_properties_get(props, PW_KEY_MEDIA_TYPE) == NULL)
|
||||
pw_properties_set(props, PW_KEY_MEDIA_TYPE, "Audio");
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
|
|||
"[ node.latency=<latency as fraction> ] " \
|
||||
"[ node.name=<name of the nodes> ] " \
|
||||
"[ node.description=<description of the nodes> ] " \
|
||||
"[ target.object=<remote node target name> ] " \
|
||||
"[ target.object=<remote node target name or serial> ] "\
|
||||
"[ audio.format=<sample format> ] " \
|
||||
"[ audio.rate=<sample rate> ] " \
|
||||
"[ audio.channels=<number of channels> ] " \
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@
|
|||
* for each connected client.
|
||||
* - `playback`: boolean if playback is enabled. This will create a playback
|
||||
* stream for each connected client.
|
||||
* - `capture.node`: an optional node id or name to use for capture.
|
||||
* - `playback.node`: an optional node id or name to use for playback.
|
||||
* - `capture.node`: an optional node serial or name to use for capture.
|
||||
* - `playback.node`: an optional node serial or name to use for playback.
|
||||
* - `server.address = []`: an array of server addresses to listen on as
|
||||
* tcp:<ip>:<port>.
|
||||
*
|
||||
|
|
@ -449,7 +449,7 @@ static int create_streams(struct impl *impl, struct client *client)
|
|||
props = pw_properties_new(
|
||||
PW_KEY_NODE_LATENCY, latency,
|
||||
PW_KEY_NODE_RATE, pw_properties_get(impl->props, PW_KEY_NODE_RATE),
|
||||
PW_KEY_NODE_TARGET, pw_properties_get(impl->props, "capture.node"),
|
||||
PW_KEY_TARGET_OBJECT, pw_properties_get(impl->props, "capture.node"),
|
||||
PW_KEY_STREAM_CAPTURE_SINK, pw_properties_get(impl->props,
|
||||
PW_KEY_STREAM_CAPTURE_SINK),
|
||||
PW_KEY_NODE_NETWORK, "true",
|
||||
|
|
@ -472,7 +472,7 @@ static int create_streams(struct impl *impl, struct client *client)
|
|||
props = pw_properties_new(
|
||||
PW_KEY_NODE_LATENCY, latency,
|
||||
PW_KEY_NODE_RATE, pw_properties_get(impl->props, PW_KEY_NODE_RATE),
|
||||
PW_KEY_NODE_TARGET, pw_properties_get(impl->props, "playback.node"),
|
||||
PW_KEY_TARGET_OBJECT, pw_properties_get(impl->props, "playback.node"),
|
||||
PW_KEY_NODE_NETWORK, "true",
|
||||
NULL);
|
||||
if (props == NULL)
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
|
|||
"[ node.latency=<latency as fraction> ] " \
|
||||
"[ node.name=<name of the nodes> ] " \
|
||||
"[ node.description=<description of the nodes> ] " \
|
||||
"[ node.target=<remote node target name> ] " \
|
||||
"[ node.target=<remote node target name or serial> ] " \
|
||||
"[ audio.format=<sample format> ] " \
|
||||
"[ audio.rate=<sample rate> ] " \
|
||||
"[ audio.channels=<number of channels> ] " \
|
||||
|
|
@ -708,8 +708,6 @@ static int create_pulse_stream(struct impl *impl)
|
|||
pa_stream_set_latency_update_callback(impl->pa_stream, stream_latency_update_cb, impl);
|
||||
|
||||
remote_node_target = pw_properties_get(impl->props, PW_KEY_TARGET_OBJECT);
|
||||
if (remote_node_target == NULL)
|
||||
remote_node_target = pw_properties_get(impl->props, PW_KEY_NODE_TARGET);
|
||||
|
||||
bufferattr.fragsize = (uint32_t) -1;
|
||||
bufferattr.minreq = (uint32_t) -1;
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ static void pw_properties_from_avahi_string(const char *key, const char *value,
|
|||
struct pw_properties *props)
|
||||
{
|
||||
if (spa_streq(key, "device")) {
|
||||
pw_properties_set(props, PW_KEY_NODE_TARGET, value);
|
||||
pw_properties_set(props, PW_KEY_TARGET_OBJECT, value);
|
||||
}
|
||||
else if (spa_streq(key, "rate")) {
|
||||
pw_properties_set(props, PW_KEY_AUDIO_RATE, value);
|
||||
|
|
@ -307,7 +307,7 @@ static void resolver_cb(AvahiServiceResolver *r, AvahiIfIndex interface, AvahiPr
|
|||
avahi_free(value);
|
||||
}
|
||||
|
||||
if ((device = pw_properties_get(props, PW_KEY_NODE_TARGET)) != NULL)
|
||||
if ((device = pw_properties_get(props, PW_KEY_TARGET_OBJECT)) != NULL)
|
||||
pw_properties_setf(props, PW_KEY_NODE_NAME,
|
||||
"tunnel.%s.%s", host_name, device);
|
||||
else
|
||||
|
|
@ -330,7 +330,7 @@ static void resolver_cb(AvahiServiceResolver *r, AvahiIfIndex interface, AvahiPr
|
|||
if (desc == NULL)
|
||||
desc = pw_properties_get(props, PW_KEY_DEVICE_PRODUCT_NAME);
|
||||
if (desc == NULL)
|
||||
desc = pw_properties_get(props, PW_KEY_NODE_TARGET);
|
||||
desc = pw_properties_get(props, PW_KEY_TARGET_OBJECT);
|
||||
if (desc == NULL)
|
||||
desc = _("Unknown device");
|
||||
|
||||
|
|
|
|||
|
|
@ -85,8 +85,9 @@ extern "C" {
|
|||
* \subsection ssec_stream_target Stream target
|
||||
*
|
||||
* To make the newly connected stream automatically connect to an existing
|
||||
* PipeWire node, use the \ref PW_STREAM_FLAG_AUTOCONNECT and the port_path
|
||||
* argument while connecting.
|
||||
* PipeWire node, use the \ref PW_STREAM_FLAG_AUTOCONNECT and set the
|
||||
* PW_KEY_OBJECT_SERIAL or the PW_KEY_NODE_NAME value of the target node
|
||||
* in the PW_KEY_TARGET_OBJECT property before connecting.
|
||||
*
|
||||
* \subsection ssec_stream_formats Stream formats
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue