keys: move NODE_TARGET to deprecated properties

Add PW_ENABLE_DEPRECATED to some places where we can not yet
avoid removing support.
This commit is contained in:
Wim Taymans 2023-01-10 17:17:34 +01:00
parent 95f87301c7
commit c3032c70b6
5 changed files with 15 additions and 6 deletions

View file

@ -33,6 +33,8 @@
* </refsect2> * </refsect2>
*/ */
#define PW_ENABLE_DEPRECATED
#include "config.h" #include "config.h"
#include "gstpipewiresink.h" #include "gstpipewiresink.h"

View file

@ -33,6 +33,8 @@
* </refsect2> * </refsect2>
*/ */
#define PW_ENABLE_DEPRECATED
#include "config.h" #include "config.h"
#include "gstpipewiresrc.h" #include "gstpipewiresrc.h"
#include "gstpipewireformat.h" #include "gstpipewireformat.h"

View file

@ -38,6 +38,8 @@
#include <spa/pod/filter.h> #include <spa/pod/filter.h>
#include <spa/utils/keys.h> #include <spa/utils/keys.h>
#define PW_ENABLE_DEPRECATED
#include "pipewire/pipewire.h" #include "pipewire/pipewire.h"
#include "pipewire/private.h" #include "pipewire/private.h"

View file

@ -155,8 +155,6 @@ extern "C" {
#define PW_KEY_NODE_EXCLUSIVE "node.exclusive" /**< node wants exclusive access to resources */ #define PW_KEY_NODE_EXCLUSIVE "node.exclusive" /**< node wants exclusive access to resources */
#define PW_KEY_NODE_AUTOCONNECT "node.autoconnect" /**< node wants to be automatically connected #define PW_KEY_NODE_AUTOCONNECT "node.autoconnect" /**< node wants to be automatically connected
* to a compatible node */ * to a compatible node */
#define PW_KEY_NODE_TARGET "node.target" /**< node wants to be connected to the target
* node/session */
#define PW_KEY_NODE_LATENCY "node.latency" /**< the requested latency of the node as #define PW_KEY_NODE_LATENCY "node.latency" /**< the requested latency of the node as
* a fraction. Ex: 128/48000 */ * a fraction. Ex: 128/48000 */
#define PW_KEY_NODE_MAX_LATENCY "node.max-latency" /**< the maximum supported latency of the #define PW_KEY_NODE_MAX_LATENCY "node.max-latency" /**< the maximum supported latency of the
@ -173,9 +171,9 @@ extern "C" {
* active */ * active */
#define PW_KEY_NODE_DONT_RECONNECT "node.dont-reconnect" /**< don't reconnect this node. The node is #define PW_KEY_NODE_DONT_RECONNECT "node.dont-reconnect" /**< don't reconnect this node. The node is
* initially linked to node.target or * initially linked to target.object or the
* target.object or the default node. If the * default node. If the target is removed,
* targets is removed, the node is destroyed */ * the node is destroyed */
#define PW_KEY_NODE_ALWAYS_PROCESS "node.always-process" /**< process even when unlinked */ #define PW_KEY_NODE_ALWAYS_PROCESS "node.always-process" /**< process even when unlinked */
#define PW_KEY_NODE_WANT_DRIVER "node.want-driver" /**< the node wants to be grouped with a driver #define PW_KEY_NODE_WANT_DRIVER "node.want-driver" /**< the node wants to be grouped with a driver
* node in order to schedule the graph. */ * node in order to schedule the graph. */
@ -338,9 +336,11 @@ extern "C" {
#ifdef PW_ENABLE_DEPRECATED #ifdef PW_ENABLE_DEPRECATED
#define PW_KEY_PRIORITY_MASTER "priority.master" /**< deprecated */ #define PW_KEY_PRIORITY_MASTER "priority.master" /**< deprecated */
#define PW_KEY_NODE_TARGET "node.target" /**< deprecated since 0.3.64, use target.object. */
#endif /* PW_ENABLE_DEPRECATED */ #endif /* PW_ENABLE_DEPRECATED */
#define PW_KEY_TARGET_OBJECT "target.object" /**< a target object to link to */ #define PW_KEY_TARGET_OBJECT "target.object" /**< a target object to link to. This can be
* and object name or object.serial */
/** \} /** \}
*/ */

View file

@ -39,6 +39,8 @@
#include <spa/debug/types.h> #include <spa/debug/types.h>
#include <spa/debug/pod.h> #include <spa/debug/pod.h>
#define PW_ENABLE_DEPRECATED
#include "pipewire/pipewire.h" #include "pipewire/pipewire.h"
#include "pipewire/stream.h" #include "pipewire/stream.h"
#include "pipewire/private.h" #include "pipewire/private.h"
@ -1890,6 +1892,7 @@ pw_stream_connect(struct pw_stream *stream,
stream_set_state(stream, PW_STREAM_STATE_CONNECTING, NULL); stream_set_state(stream, PW_STREAM_STATE_CONNECTING, NULL);
if (target_id != PW_ID_ANY) if (target_id != PW_ID_ANY)
/* this is deprecated but still used by the portal and its apps */
pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id); pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id);
else if ((str = getenv("PIPEWIRE_NODE")) != NULL) else if ((str = getenv("PIPEWIRE_NODE")) != NULL)
pw_properties_set(stream->properties, PW_KEY_TARGET_OBJECT, str); pw_properties_set(stream->properties, PW_KEY_TARGET_OBJECT, str);