mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
v0: set media class
Set the media class on the client-node after we know the number of ports. Add more type mappings Fix change_mask on core_info
This commit is contained in:
parent
59c92bddba
commit
e9b62c0ce6
3 changed files with 37 additions and 4 deletions
|
|
@ -75,22 +75,38 @@ static void core_marshal_info(void *object, const struct pw_core_info *info)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
uint32_t i, n_items;
|
||||
struct spa_pod_frame f;
|
||||
uint64_t change_mask = 0;
|
||||
struct spa_pod_frame f;
|
||||
struct pw_protocol_native_message *msg;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_INFO, &msg);
|
||||
|
||||
#define PW_CORE_V0_CHANGE_MASK_USER_NAME (1 << 0)
|
||||
#define PW_CORE_V0_CHANGE_MASK_HOST_NAME (1 << 1)
|
||||
#define PW_CORE_V0_CHANGE_MASK_VERSION (1 << 2)
|
||||
#define PW_CORE_V0_CHANGE_MASK_NAME (1 << 3)
|
||||
#define PW_CORE_V0_CHANGE_MASK_COOKIE (1 << 4)
|
||||
#define PW_CORE_V0_CHANGE_MASK_PROPS (1 << 5)
|
||||
|
||||
if (msg->seq == 0) {
|
||||
update_types_server(resource);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_INFO, &msg);
|
||||
change_mask |= PW_CORE_V0_CHANGE_MASK_USER_NAME |
|
||||
PW_CORE_V0_CHANGE_MASK_HOST_NAME |
|
||||
PW_CORE_V0_CHANGE_MASK_VERSION |
|
||||
PW_CORE_V0_CHANGE_MASK_NAME |
|
||||
PW_CORE_V0_CHANGE_MASK_COOKIE;
|
||||
}
|
||||
|
||||
n_items = info->props ? info->props->n_items : 0;
|
||||
|
||||
if (info->change_mask & PW_CORE_CHANGE_MASK_PROPS)
|
||||
change_mask |= PW_CORE_V0_CHANGE_MASK_PROPS;
|
||||
|
||||
spa_pod_builder_push_struct(b, &f);
|
||||
spa_pod_builder_add(b,
|
||||
"i", info->id,
|
||||
"l", info->change_mask,
|
||||
"l", change_mask,
|
||||
"s", info->user_name,
|
||||
"s", info->host_name,
|
||||
"s", info->version,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,18 @@ const struct type_info {
|
|||
{ "PipeWire:Interface:Link", PW_TYPE_INFO_INTERFACE_BASE "Link", PW_TYPE_INTERFACE_Link, },
|
||||
{ "PipeWire:Interface:Client", PW_TYPE_INFO_INTERFACE_BASE "Client", PW_TYPE_INTERFACE_Client, },
|
||||
{ "PipeWire:Interface:Module", PW_TYPE_INFO_INTERFACE_BASE "Module", PW_TYPE_INTERFACE_Module, },
|
||||
{ "PipeWire:Interface:ClientNode", PW_TYPE_INFO_INTERFACE_BASE "ClientNode", PW_TYPE_INTERFACE_ClientNode, },
|
||||
{ "PipeWire:Interface:Device", PW_TYPE_INFO_INTERFACE_BASE "Device", PW_TYPE_INTERFACE_Device, },
|
||||
|
||||
{ "PipeWire:Interface:Metadata", PW_TYPE_INFO_INTERFACE_BASE "Metadata", PW_TYPE_INTERFACE_Metadata, },
|
||||
{ "PipeWire:Interface:Session", PW_TYPE_INFO_INTERFACE_BASE "Session", PW_TYPE_INTERFACE_Session, },
|
||||
{ "PipeWire:Interface:Endpoint", PW_TYPE_INFO_INTERFACE_BASE "Endpoint", PW_TYPE_INTERFACE_Endpoint, },
|
||||
{ "PipeWire:Interface:EndpointStream", PW_TYPE_INFO_INTERFACE_BASE "EndpointStream", PW_TYPE_INTERFACE_EndpointStream, },
|
||||
{ "PipeWire:Interface:EndpointLink", PW_TYPE_INFO_INTERFACE_BASE "EndpointLink", PW_TYPE_INTERFACE_EndpointLink, },
|
||||
|
||||
{ "PipeWire:Interface:ClientNode", PW_TYPE_INFO_INTERFACE_BASE "ClientNode", PW_TYPE_INTERFACE_ClientNode, },
|
||||
{ "PipeWire:Interface:ClientSession", PW_TYPE_INFO_INTERFACE_BASE "ClientSession", PW_TYPE_INTERFACE_ClientSession, },
|
||||
{ "PipeWire:Interface:ClientEndpoint", PW_TYPE_INFO_INTERFACE_BASE "ClientEndpoint", PW_TYPE_INTERFACE_ClientEndpoint, },
|
||||
|
||||
{ "Spa:Interface:Node", SPA_TYPE_INFO_INTERFACE_BASE "Node", SPA_TYPE_INTERFACE_Node, },
|
||||
{ "Spa:Interface:Clock", },
|
||||
{ "Spa:Interface:Monitor", },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue