mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
More session manager work
pulseaudio card is mapped to device pulseaudio sink/source is mapped to an endpoint prepare to map streams to card profiles Add Route param to implement the endpoint routing later (ports) Create an alsa endpoint for each device Create one stream for each endpoint (Playback/Capture) Implement create_link on the endpoint. The idea is to call create link on the peer endpoint to complete the link. Remove create_link on the session. Add stream-monitor to turn pw_stream nodes into endpoints Add a policy manager that tries to link endpoints Use enum pw_direction for the endpoint direction. We can use the media_class to determine if this is a pw_stream or not but it should not really matter, you can link any output to any input. Add autoconnect property for endpoints to make the policy connect.
This commit is contained in:
parent
edd011605d
commit
3f3dfbc67e
27 changed files with 2338 additions and 439 deletions
|
|
@ -45,6 +45,8 @@ enum spa_param_type {
|
|||
SPA_PARAM_Profile, /**< profile configuration as SPA_TYPE_OBJECT_ParamProfile */
|
||||
SPA_PARAM_EnumPortConfig, /**< port configuration enumeration as SPA_TYPE_OBJECT_ParamPortConfig */
|
||||
SPA_PARAM_PortConfig, /**< port configuration as SPA_TYPE_OBJECT_ParamPortConfig */
|
||||
SPA_PARAM_EnumRoute, /**< routing enumeration as SPA_TYPE_OBJECT_ParamRoute */
|
||||
SPA_PARAM_Route, /**< routing configuration as SPA_TYPE_OBJECT_ParamRoute */
|
||||
};
|
||||
|
||||
/** information about a parameter */
|
||||
|
|
@ -112,6 +114,24 @@ enum spa_param_port_config {
|
|||
SPA_PARAM_PORT_CONFIG_format, /**< (Object) format filter */
|
||||
};
|
||||
|
||||
enum spa_param_route_availability {
|
||||
SPA_PARAM_ROUTE_AVAILABILITY_unknown, /**< unknown if route is available */
|
||||
SPA_PARAM_ROUTE_AVAILABILITY_no, /**< route is not available */
|
||||
SPA_PARAM_ROUTE_AVAILABILITY_yes, /**< route is available */
|
||||
};
|
||||
|
||||
/** 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_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_route_availability) */
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -297,6 +297,30 @@ static const struct spa_type_info spa_type_param_port_config[] = {
|
|||
{ 0, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
#define SPA_TYPE_INFO_ParamRouteAvailability SPA_TYPE_INFO_ENUM_BASE "ParamRouteAvailability"
|
||||
#define SPA_TYPE_INFO_PARAM_ROUTE_AVAILABILITY_BASE SPA_TYPE_INFO_ParamRouteAvailability ":"
|
||||
|
||||
static const struct spa_type_info spa_type_param_route_availability[] = {
|
||||
{ SPA_PARAM_ROUTE_AVAILABILITY_unknown, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_AVAILABILITY_BASE "unknown", NULL },
|
||||
{ SPA_PARAM_ROUTE_AVAILABILITY_no, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_AVAILABILITY_BASE "no", NULL },
|
||||
{ SPA_PARAM_ROUTE_AVAILABILITY_yes, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_AVAILABILITY_BASE "yes", NULL },
|
||||
{ 0, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
|
||||
#define SPA_TYPE_INFO_PARAM_Route SPA_TYPE_INFO_PARAM_BASE "Route"
|
||||
#define SPA_TYPE_INFO_PARAM_ROUTE_BASE SPA_TYPE_INFO_PARAM_Route ":"
|
||||
|
||||
static const struct spa_type_info spa_type_param_route[] = {
|
||||
{ SPA_PARAM_ROUTE_START, SPA_TYPE_Id, SPA_TYPE_INFO_PARAM_ROUTE_BASE, spa_type_param, },
|
||||
{ SPA_PARAM_ROUTE_index, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "index", NULL, },
|
||||
{ SPA_PARAM_ROUTE_name, SPA_TYPE_String, SPA_TYPE_INFO_PARAM_ROUTE_BASE "name", NULL, },
|
||||
{ SPA_PARAM_ROUTE_description, SPA_TYPE_String, SPA_TYPE_INFO_PARAM_ROUTE_BASE "description", NULL, },
|
||||
{ SPA_PARAM_ROUTE_priority, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "priority", NULL, },
|
||||
{ SPA_PARAM_ROUTE_available, SPA_TYPE_Id, SPA_TYPE_INFO_PARAM_ROUTE_BASE "available", spa_type_param_route_availability, },
|
||||
{ 0, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ static const struct spa_type_info spa_types[] = {
|
|||
{ SPA_TYPE_OBJECT_ParamIO, SPA_TYPE_Object, SPA_TYPE_INFO_PARAM_IO, spa_type_param_io },
|
||||
{ SPA_TYPE_OBJECT_ParamProfile, SPA_TYPE_Object, SPA_TYPE_INFO_PARAM_Profile, spa_type_param_profile },
|
||||
{ SPA_TYPE_OBJECT_ParamPortConfig, SPA_TYPE_Object, SPA_TYPE_INFO_PARAM_PortConfig, spa_type_param_port_config },
|
||||
{ SPA_TYPE_OBJECT_ParamRoute, SPA_TYPE_Object, SPA_TYPE_INFO_PARAM_Route, spa_type_param_route },
|
||||
|
||||
{ 0, 0, NULL, NULL }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ enum {
|
|||
SPA_TYPE_OBJECT_ParamIO,
|
||||
SPA_TYPE_OBJECT_ParamProfile,
|
||||
SPA_TYPE_OBJECT_ParamPortConfig,
|
||||
SPA_TYPE_OBJECT_ParamRoute,
|
||||
SPA_TYPE_OBJECT_LAST, /**< not part of ABI */
|
||||
|
||||
/* vendor extensions */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue