mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: add profile param
Make a profile param that can be used to configure a node with a certain profile. Use the profile to configure the ports on splitter and merger and get rid of the dynamic ports. Use the profile to configure the client-node and audio-dsp. Don't try to link more ports than available between client-node and dsp.
This commit is contained in:
parent
6de03418ca
commit
e1ec1bad23
12 changed files with 549 additions and 454 deletions
|
|
@ -37,6 +37,7 @@ enum spa_param_type {
|
|||
SPA_PARAM_Buffers, /**< buffer configurations */
|
||||
SPA_PARAM_Meta, /**< allowed metadata for buffers */
|
||||
SPA_PARAM_IO, /**< configurable IO areas */
|
||||
SPA_PARAM_Profile, /**< port profile configuration */
|
||||
};
|
||||
|
||||
/** Properties for SPA_TYPE_OBJECT_ParamList */
|
||||
|
|
@ -69,6 +70,13 @@ enum spa_param_io {
|
|||
SPA_PARAM_IO_size, /**< size of the io area */
|
||||
};
|
||||
|
||||
/** properties for SPA_TYPE_OBJECT_ParamProfile */
|
||||
enum spa_param_profile {
|
||||
SPA_PARAM_PROFILE_START, /**< object id, one of enum spa_param_type */
|
||||
SPA_PARAM_PROFILE_direction, /**< direction, input/output */
|
||||
SPA_PARAM_PROFILE_format, /**< profile format specification */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ static const struct spa_type_info spa_type_param[] = {
|
|||
{ SPA_PARAM_Buffers, SPA_TYPE_PARAM_ID_BASE "Buffers", SPA_TYPE_Int, },
|
||||
{ SPA_PARAM_Meta, SPA_TYPE_PARAM_ID_BASE "Meta", SPA_TYPE_Int, },
|
||||
{ SPA_PARAM_IO, SPA_TYPE_PARAM_ID_BASE "IO", SPA_TYPE_Int, },
|
||||
{ SPA_PARAM_Profile, SPA_TYPE_PARAM_ID_BASE "Profile", SPA_TYPE_Int, },
|
||||
{ 0, NULL, },
|
||||
};
|
||||
|
||||
|
|
@ -250,6 +251,16 @@ static const struct spa_type_info spa_type_param_buffers[] = {
|
|||
{ 0, NULL, },
|
||||
};
|
||||
|
||||
#define SPA_TYPE_PARAM__Profile SPA_TYPE_PARAM_BASE "Profile"
|
||||
#define SPA_TYPE_PARAM_PROFILE_BASE SPA_TYPE_PARAM__Profile ":"
|
||||
|
||||
static const struct spa_type_info spa_type_param_profile[] = {
|
||||
{ SPA_PARAM_PROFILE_START, SPA_TYPE_PARAM_PROFILE_BASE, SPA_TYPE_Id, spa_type_param, },
|
||||
{ SPA_PARAM_PROFILE_direction, SPA_TYPE_PARAM_PROFILE_BASE "direction", SPA_TYPE_Id, spa_type_direction },
|
||||
{ SPA_PARAM_PROFILE_format, SPA_TYPE_PARAM_PROFILE_BASE "format", SPA_TYPE_Object, NULL, },
|
||||
{ 0, NULL, },
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -71,6 +71,18 @@ struct spa_type_info {
|
|||
#define SPA_TYPE__Command SPA_TYPE_OBJECT_BASE "Command"
|
||||
#define SPA_TYPE_COMMAND_BASE SPA_TYPE__Command ":"
|
||||
|
||||
#include <spa/utils/type.h>
|
||||
|
||||
/* base for parameter object enumerations */
|
||||
#define SPA_TYPE__Direction SPA_TYPE_ENUM_BASE "Direction"
|
||||
#define SPA_TYPE_DIRECTION_BASE SPA_TYPE__Direction ":"
|
||||
|
||||
static const struct spa_type_info spa_type_direction[] = {
|
||||
{ SPA_DIRECTION_INPUT, SPA_TYPE_DIRECTION_BASE "Input", SPA_TYPE_Int, },
|
||||
{ SPA_DIRECTION_OUTPUT, SPA_TYPE_DIRECTION_BASE "Output", SPA_TYPE_Int, },
|
||||
{ 0, NULL, }
|
||||
};
|
||||
|
||||
#include <spa/monitor/type-info.h>
|
||||
#include <spa/node/type-info.h>
|
||||
#include <spa/param/type-info.h>
|
||||
|
|
@ -147,6 +159,7 @@ static const struct spa_type_info spa_types[] = {
|
|||
{ SPA_TYPE_OBJECT_ParamBuffers, SPA_TYPE_PARAM__Buffers, SPA_TYPE_Object, spa_type_param_buffers, },
|
||||
{ SPA_TYPE_OBJECT_ParamMeta, SPA_TYPE_PARAM__Meta, SPA_TYPE_Object, spa_type_param_meta },
|
||||
{ SPA_TYPE_OBJECT_ParamIO, SPA_TYPE_PARAM__IO, SPA_TYPE_Object, spa_type_param_io },
|
||||
{ SPA_TYPE_OBJECT_ParamProfile, SPA_TYPE_PARAM__Profile, SPA_TYPE_Object, spa_type_param_profile },
|
||||
|
||||
{ 0, NULL, }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ enum {
|
|||
SPA_TYPE_OBJECT_ParamBuffers,
|
||||
SPA_TYPE_OBJECT_ParamMeta,
|
||||
SPA_TYPE_OBJECT_ParamIO,
|
||||
SPA_TYPE_OBJECT_ParamProfile,
|
||||
|
||||
/* vendor extensions */
|
||||
SPA_TYPE_VENDOR_PipeWire = 0x02000000,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue