mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-13 05:33:55 -04:00
Add a new SPA_TYPE_OBJECT_ParamDict object that contains a struct with key/value pairs. We're using something similar for Tags but this is a more generic version. Make a new Capability param that uses the ParamDict object. This is meant to be used to describe capabilities with the generic key/value struct. Make a new PeerParam object where the keys are generic ids of the peer objects and the values any Pod. The idea is to use this object to store a peer objects. Make some helpers to iterate the peers and their objects. Add a new PeerCapability param that uses the PeerParam object with Capability objects. This can be used to send the collection of Capabilities from all peers to a port. This is a bit like the tags but in a more generic way. The tags could also be implemented in this new generic way later. Make the PeerFormats use the same PeerParam of Format objects. The Capability param is set on ports. impl-link will collect all Capability objects into a PeerCapability object and send this to the peer. The difference with the Tag param is that these Capability params are not in any way forwared on the node automatically (like what is done in the loopback module) because they represent the capabilities of the ports betweem the link.
37 lines
652 B
C
37 lines
652 B
C
/* Simple Plugin API */
|
|
/* SPDX-FileCopyrightText: Copyright © 2025 Wim Taymans */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef SPA_PARAM_PEER_PARAM_H
|
|
#define SPA_PARAM_PEER_PARAM_H
|
|
|
|
#include <spa/param/param.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* \addtogroup spa_param
|
|
* \{
|
|
*/
|
|
|
|
/** properties for SPA_TYPE_OBJECT_PeerParam */
|
|
enum spa_peer_param {
|
|
SPA_PEER_PARAM_START, /**< id of peer as key, SPA_TYPE_Pod as value */
|
|
SPA_PEER_PARAM_END = 0xfffffffe,
|
|
};
|
|
|
|
struct spa_peer_param_info {
|
|
uint32_t peer_id;
|
|
const struct spa_pod *param;
|
|
};
|
|
/**
|
|
* \}
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* SPA_PARAM_PEER_PARAM_H */
|