mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-30 11:10:29 -04:00
spa: reorganize params
Split files into separate files. Move type annotations to a matching -types.h files. Move helpers to matching -utils.h files. Add helpers to parse generic audio and video info.
This commit is contained in:
parent
4e9c3b26d9
commit
00ae289a14
41 changed files with 2768 additions and 1337 deletions
|
|
@ -79,29 +79,10 @@ struct spa_param_info {
|
|||
|
||||
#define SPA_PARAM_INFO(id,flags) ((struct spa_param_info){ (id), (flags) })
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamBuffers */
|
||||
enum spa_param_buffers {
|
||||
SPA_PARAM_BUFFERS_START,
|
||||
SPA_PARAM_BUFFERS_buffers, /**< number of buffers (Int) */
|
||||
SPA_PARAM_BUFFERS_blocks, /**< number of data blocks per buffer (Int) */
|
||||
SPA_PARAM_BUFFERS_size, /**< size of a data block memory (Int)*/
|
||||
SPA_PARAM_BUFFERS_stride, /**< stride of data block memory (Int) */
|
||||
SPA_PARAM_BUFFERS_align, /**< alignment of data block memory (Int) */
|
||||
SPA_PARAM_BUFFERS_dataType, /**< possible memory types (Int, mask of enum spa_data_type) */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamMeta */
|
||||
enum spa_param_meta {
|
||||
SPA_PARAM_META_START,
|
||||
SPA_PARAM_META_type, /**< the metadata, one of enum spa_meta_type (Id enum spa_meta_type) */
|
||||
SPA_PARAM_META_size, /**< the expected maximum size the meta (Int) */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamIO */
|
||||
enum spa_param_io {
|
||||
SPA_PARAM_IO_START,
|
||||
SPA_PARAM_IO_id, /**< type ID, uniquely identifies the io area (Id enum spa_io_type) */
|
||||
SPA_PARAM_IO_size, /**< size of the io area (Int) */
|
||||
enum spa_param_bitorder {
|
||||
SPA_PARAM_BITORDER_unknown, /**< unknown bitorder */
|
||||
SPA_PARAM_BITORDER_msb, /**< most significant bit */
|
||||
SPA_PARAM_BITORDER_lsb, /**< least significant bit */
|
||||
};
|
||||
|
||||
enum spa_param_availability {
|
||||
|
|
@ -110,98 +91,10 @@ enum spa_param_availability {
|
|||
SPA_PARAM_AVAILABILITY_yes, /**< available */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamProfile */
|
||||
enum spa_param_profile {
|
||||
SPA_PARAM_PROFILE_START,
|
||||
SPA_PARAM_PROFILE_index, /**< profile index (Int) */
|
||||
SPA_PARAM_PROFILE_name, /**< profile name (String) */
|
||||
SPA_PARAM_PROFILE_description, /**< profile description (String) */
|
||||
SPA_PARAM_PROFILE_priority, /**< profile priority (Int) */
|
||||
SPA_PARAM_PROFILE_available, /**< availability of the profile
|
||||
* (Id enum spa_param_availability) */
|
||||
SPA_PARAM_PROFILE_info, /**< info (Struct(
|
||||
* Int : n_items,
|
||||
* (String : key,
|
||||
* String : value)*)) */
|
||||
SPA_PARAM_PROFILE_classes, /**< node classes provided by this profile
|
||||
* (Struct(
|
||||
* Int : number of items following
|
||||
* Struct(
|
||||
* String : class name (eg. "Audio/Source"),
|
||||
* Int : number of nodes
|
||||
* String : property (eg. "card.profile.devices"),
|
||||
* Array of Int: device indexes
|
||||
* )*)) */
|
||||
SPA_PARAM_PROFILE_save, /**< If profile should be saved (Bool) */
|
||||
};
|
||||
|
||||
enum spa_param_port_config_mode {
|
||||
SPA_PARAM_PORT_CONFIG_MODE_none, /**< no configuration */
|
||||
SPA_PARAM_PORT_CONFIG_MODE_passthrough, /**< passthrough configuration */
|
||||
SPA_PARAM_PORT_CONFIG_MODE_convert, /**< convert configuration */
|
||||
SPA_PARAM_PORT_CONFIG_MODE_dsp, /**< dsp configuration, depending on the external
|
||||
* format. For audio, ports will be configured for
|
||||
* the given number of channels with F32 format. */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamPortConfig */
|
||||
enum spa_param_port_config {
|
||||
SPA_PARAM_PORT_CONFIG_START,
|
||||
SPA_PARAM_PORT_CONFIG_direction, /**< direction, input/output (Id enum spa_direction) */
|
||||
SPA_PARAM_PORT_CONFIG_mode, /**< (Id enum spa_param_port_config_mode) mode */
|
||||
SPA_PARAM_PORT_CONFIG_monitor, /**< (Bool) enable monitor output ports on input ports */
|
||||
SPA_PARAM_PORT_CONFIG_control, /**< (Bool) enable control ports */
|
||||
SPA_PARAM_PORT_CONFIG_format, /**< (Object) format filter */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamRoute */
|
||||
enum spa_param_route {
|
||||
SPA_PARAM_ROUTE_START,
|
||||
SPA_PARAM_ROUTE_index, /**< index of the routing destination (Int) */
|
||||
SPA_PARAM_ROUTE_direction, /**< direction, input/output (Id enum spa_direction) */
|
||||
SPA_PARAM_ROUTE_device, /**< device id (Int) */
|
||||
SPA_PARAM_ROUTE_name, /**< name of the routing destination (String) */
|
||||
SPA_PARAM_ROUTE_description, /**< description of the destination (String) */
|
||||
SPA_PARAM_ROUTE_priority, /**< priority of the destination (Int) */
|
||||
SPA_PARAM_ROUTE_available, /**< availability of the destination
|
||||
* (Id enum spa_param_availability) */
|
||||
SPA_PARAM_ROUTE_info, /**< info (Struct(
|
||||
* Int : n_items,
|
||||
* (String : key,
|
||||
* String : value)*)) */
|
||||
SPA_PARAM_ROUTE_profiles, /**< associated profile indexes (Array of Int) */
|
||||
SPA_PARAM_ROUTE_props, /**< properties SPA_TYPE_OBJECT_Props */
|
||||
SPA_PARAM_ROUTE_devices, /**< associated device indexes (Array of Int) */
|
||||
SPA_PARAM_ROUTE_profile, /**< profile id (Int) */
|
||||
SPA_PARAM_ROUTE_save, /**< If route should be saved (Bool) */
|
||||
};
|
||||
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamLatency */
|
||||
enum spa_param_latency {
|
||||
SPA_PARAM_LATENCY_START,
|
||||
SPA_PARAM_LATENCY_direction, /**< direction, input/output (Id enum spa_direction) */
|
||||
SPA_PARAM_LATENCY_minQuantum, /**< min latency relative to quantum (Float) */
|
||||
SPA_PARAM_LATENCY_maxQuantum, /**< max latency relative to quantum (Float) */
|
||||
SPA_PARAM_LATENCY_minRate, /**< min latency (Int) relative to rate */
|
||||
SPA_PARAM_LATENCY_maxRate, /**< max latency (Int) relative to rate */
|
||||
SPA_PARAM_LATENCY_minNs, /**< min latency (Long) in nanoseconds */
|
||||
SPA_PARAM_LATENCY_maxNs, /**< max latency (Long) in nanoseconds */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamProcessLatency */
|
||||
enum spa_param_process_latency {
|
||||
SPA_PARAM_PROCESS_LATENCY_START,
|
||||
SPA_PARAM_PROCESS_LATENCY_quantum, /**< latency relative to quantum (Float) */
|
||||
SPA_PARAM_PROCESS_LATENCY_rate, /**< latency (Int) relative to rate */
|
||||
SPA_PARAM_PROCESS_LATENCY_ns, /**< latency (Long) in nanoseconds */
|
||||
};
|
||||
|
||||
enum spa_param_bitorder {
|
||||
SPA_PARAM_BITORDER_unknown, /**< unknown bitorder */
|
||||
SPA_PARAM_BITORDER_msb, /**< most significant bit */
|
||||
SPA_PARAM_BITORDER_lsb, /**< least significant bit */
|
||||
};
|
||||
#include <spa/param/buffers.h>
|
||||
#include <spa/param/profile.h>
|
||||
#include <spa/param/port-config.h>
|
||||
#include <spa/param/route.h>
|
||||
|
||||
/**
|
||||
* \}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue