mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-01-05 06:20:16 +01:00
- make it a GObject so that it can emit its own signals and so that it can be shared between multiple proxies - share the WpProps instance between endpoints, endpoint-streams and their underlying nodes - introduce the concept of the caching mode that redirects _set to _set_param of the proxy that actually has the props; this allows shared WpProps to actually set changes on the correct proxy in a transparent way - change methods to consume the ref of the pod and reflect that also on wp_proxy_set_prop() - refactor the export process on endpoints & endpoint-streams so that they always get all the required features (info, props, bound) and make it async so that we can take time to prepare the underlying node to have FEATURE_PROPS - update the props & endpoint unit tests, bringing back all the checks that the endpoint unit test used to have
64 lines
1.3 KiB
C
64 lines
1.3 KiB
C
/* WirePlumber
|
|
*
|
|
* Copyright © 2020 Collabora Ltd.
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef __WIREPLUMBER_PROPS_H__
|
|
#define __WIREPLUMBER_PROPS_H__
|
|
|
|
#include "iterator.h"
|
|
#include "spa-pod.h"
|
|
#include "proxy.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
/**
|
|
* WpPropsMode:
|
|
* @WP_PROPS_MODE_CACHE: props are stored on the proxy and cached here
|
|
* @WP_PROPS_MODE_STORE: props are stored here directly
|
|
*/
|
|
typedef enum {
|
|
WP_PROPS_MODE_CACHE,
|
|
WP_PROPS_MODE_STORE,
|
|
} WpPropsMode;
|
|
|
|
/**
|
|
* WP_TYPE_PROPS:
|
|
*
|
|
* The #WpProps #GType
|
|
*/
|
|
#define WP_TYPE_PROPS (wp_props_get_type ())
|
|
WP_API
|
|
G_DECLARE_FINAL_TYPE (WpProps, wp_props, WP, PROPS, GObject)
|
|
|
|
WP_API
|
|
WpProps * wp_props_new (WpPropsMode mode, WpProxy * proxy);
|
|
|
|
WP_API
|
|
void wp_props_register (WpProps * self, const gchar * name,
|
|
const gchar * description, WpSpaPod * pod);
|
|
|
|
WP_API
|
|
void wp_props_register_from_info (WpProps * self, WpSpaPod * pod);
|
|
|
|
WP_API
|
|
WpIterator * wp_props_iterate_prop_info (WpProps * self);
|
|
|
|
WP_API
|
|
WpSpaPod * wp_props_get_all (WpProps * self);
|
|
|
|
WP_API
|
|
WpSpaPod * wp_props_get (WpProps * self, const gchar * name);
|
|
|
|
WP_API
|
|
void wp_props_set (WpProps * self, const gchar * name, WpSpaPod * value);
|
|
|
|
WP_API
|
|
void wp_props_store (WpProps * self, const gchar * name, WpSpaPod * value);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif
|