mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
control: add control objects
Add control objects for all controllable properties on ports. Try to link compatible control properties in autolink. Allocate shared memory for the output property memory and configure the io area on the ports when the controls are linked. Send the shared memfd to clients when the io area is configured. Add port_set_io support in remote.c, mmap the control io area and set on the port. Add some param helpers Add volume control to export-source update the volume before sending each buffer.
This commit is contained in:
parent
91a3670610
commit
541553be1c
19 changed files with 577 additions and 34 deletions
|
|
@ -32,6 +32,8 @@ extern "C" {
|
|||
#define SPA_TYPE_PARAM_IO__id SPA_TYPE_PARAM_IO_BASE "id"
|
||||
/** size of the io area for a port */
|
||||
#define SPA_TYPE_PARAM_IO__size SPA_TYPE_PARAM_IO_BASE "size"
|
||||
/** type of the io area for a port, this is an enum spa_pod_type */
|
||||
#define SPA_TYPE_PARAM_IO__type SPA_TYPE_PARAM_IO_BASE "type"
|
||||
|
||||
/** enumerate buffer io areas */
|
||||
#define SPA_TYPE_PARAM_ID_IO__Buffers SPA_TYPE_PARAM_ID_IO_BASE "Buffers"
|
||||
|
|
@ -64,6 +66,7 @@ extern "C" {
|
|||
struct spa_type_param_io {
|
||||
uint32_t id; /**< id to configure the io area */
|
||||
uint32_t size; /**< size of io area */
|
||||
uint32_t type; /**< type of io area */
|
||||
uint32_t idBuffers; /**< id to enumerate buffer io */
|
||||
uint32_t Buffers; /**< object type of buffer io area */
|
||||
uint32_t idControl; /**< id to enumerate control io */
|
||||
|
|
@ -82,6 +85,7 @@ spa_type_param_io_map(struct spa_type_map *map,
|
|||
if (type->id == 0) {
|
||||
type->id = spa_type_map_get_id(map, SPA_TYPE_PARAM_IO__id);
|
||||
type->size = spa_type_map_get_id(map, SPA_TYPE_PARAM_IO__size);
|
||||
type->type = spa_type_map_get_id(map, SPA_TYPE_PARAM_IO__type);
|
||||
type->idBuffers = spa_type_map_get_id(map, SPA_TYPE_PARAM_ID_IO__Buffers);
|
||||
type->Buffers = spa_type_map_get_id(map, SPA_TYPE_PARAM_IO__Buffers);
|
||||
type->idControl = spa_type_map_get_id(map, SPA_TYPE_PARAM_ID_IO__Control);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue