mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	introspect: remove ENUM_PARAM change
Remove the ENUM_PARAM change bit, we want to do this with a specific event later that would allow us to specify which params changed etc.
This commit is contained in:
		
							parent
							
								
									7c54b4b89c
								
							
						
					
					
						commit
						54f527ac02
					
				
					 5 changed files with 8 additions and 26 deletions
				
			
		| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
Subproject commit 08d60716933acf35690a088af4f3802c396360b8
 | 
					Subproject commit d02a8375c3c5c59303cb31e43f5addc3517f1f39
 | 
				
			||||||
| 
						 | 
					@ -198,7 +198,6 @@ struct port_data {
 | 
				
			||||||
  uint32_t id;
 | 
					  uint32_t id;
 | 
				
			||||||
  struct spa_hook port_listener;
 | 
					  struct spa_hook port_listener;
 | 
				
			||||||
  struct pending pending;
 | 
					  struct pending pending;
 | 
				
			||||||
  struct pending pending_param;
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct node_data *find_node_data(struct remote_data *rd, uint32_t id)
 | 
					static struct node_data *find_node_data(struct remote_data *rd, uint32_t id)
 | 
				
			||||||
| 
						 | 
					@ -301,11 +300,6 @@ get_core_info (struct pw_remote          *remote,
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void init_pending(GstPipeWireDeviceProvider *self, struct pending *p)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    p->seq = SPA_ID_INVALID;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void add_pending(GstPipeWireDeviceProvider *self, struct pending *p,
 | 
					static void add_pending(GstPipeWireDeviceProvider *self, struct pending *p,
 | 
				
			||||||
                        void (*callback) (void *data), void *data)
 | 
					                        void (*callback) (void *data), void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -371,16 +365,7 @@ on_state_changed (void *data, enum pw_remote_state old, enum pw_remote_state sta
 | 
				
			||||||
static void port_event_info(void *data, struct pw_port_info *info)
 | 
					static void port_event_info(void *data, struct pw_port_info *info)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  struct port_data *port_data = data;
 | 
					  struct port_data *port_data = data;
 | 
				
			||||||
  struct node_data *node_data = port_data->node_data;
 | 
					 | 
				
			||||||
  GstPipeWireDeviceProvider *self = node_data->self;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  pw_log_debug("%p", port_data);
 | 
					  pw_log_debug("%p", port_data);
 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (info->change_mask & PW_PORT_CHANGE_MASK_ENUM_PARAMS) {
 | 
					 | 
				
			||||||
    pw_port_proxy_enum_params((struct pw_port_proxy*)port_data->proxy,
 | 
					 | 
				
			||||||
				SPA_PARAM_EnumFormat, 0, 0, NULL);
 | 
					 | 
				
			||||||
    add_pending(self, &port_data->pending_param, do_add_node, port_data);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void port_event_param(void *data, uint32_t id, uint32_t index, uint32_t next,
 | 
					static void port_event_param(void *data, uint32_t id, uint32_t index, uint32_t next,
 | 
				
			||||||
| 
						 | 
					@ -449,7 +434,6 @@ destroy_port_proxy (void *data)
 | 
				
			||||||
  struct port_data *pd = data;
 | 
					  struct port_data *pd = data;
 | 
				
			||||||
  pw_log_debug("destroy %p", pd);
 | 
					  pw_log_debug("destroy %p", pd);
 | 
				
			||||||
  remove_pending(&pd->pending);
 | 
					  remove_pending(&pd->pending);
 | 
				
			||||||
  remove_pending(&pd->pending_param);
 | 
					 | 
				
			||||||
  spa_list_remove(&pd->link);
 | 
					  spa_list_remove(&pd->link);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -506,8 +490,9 @@ static void registry_event_global(void *data, uint32_t id, uint32_t parent_id, u
 | 
				
			||||||
    spa_list_append(&rd->ports, &pd->link);
 | 
					    spa_list_append(&rd->ports, &pd->link);
 | 
				
			||||||
    pw_port_proxy_add_listener(port, &pd->port_listener, &port_events, pd);
 | 
					    pw_port_proxy_add_listener(port, &pd->port_listener, &port_events, pd);
 | 
				
			||||||
    pw_proxy_add_listener((struct pw_proxy*)port, &pd->proxy_listener, &proxy_port_events, pd);
 | 
					    pw_proxy_add_listener((struct pw_proxy*)port, &pd->proxy_listener, &proxy_port_events, pd);
 | 
				
			||||||
    init_pending(self, &pd->pending_param);
 | 
					    pw_port_proxy_enum_params((struct pw_port_proxy*)port,
 | 
				
			||||||
    add_pending(self, &pd->pending, NULL, NULL);
 | 
									SPA_PARAM_EnumFormat, 0, 0, NULL);
 | 
				
			||||||
 | 
					    add_pending(self, &pd->pending, do_add_node, pd);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return;
 | 
					  return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -169,7 +169,6 @@ struct pw_node_info {
 | 
				
			||||||
#define PW_NODE_CHANGE_MASK_OUTPUT_PORTS	(1 << 2)
 | 
					#define PW_NODE_CHANGE_MASK_OUTPUT_PORTS	(1 << 2)
 | 
				
			||||||
#define PW_NODE_CHANGE_MASK_STATE		(1 << 3)
 | 
					#define PW_NODE_CHANGE_MASK_STATE		(1 << 3)
 | 
				
			||||||
#define PW_NODE_CHANGE_MASK_PROPS		(1 << 4)
 | 
					#define PW_NODE_CHANGE_MASK_PROPS		(1 << 4)
 | 
				
			||||||
#define PW_NODE_CHANGE_MASK_ENUM_PARAMS		(1 << 5)
 | 
					 | 
				
			||||||
	uint64_t change_mask;			/**< bitfield of changed fields since last call */
 | 
						uint64_t change_mask;			/**< bitfield of changed fields since last call */
 | 
				
			||||||
	const char *name;                       /**< name the node, suitable for display */
 | 
						const char *name;                       /**< name the node, suitable for display */
 | 
				
			||||||
	uint32_t max_input_ports;		/**< maximum number of inputs */
 | 
						uint32_t max_input_ports;		/**< maximum number of inputs */
 | 
				
			||||||
| 
						 | 
					@ -192,7 +191,6 @@ struct pw_port_info {
 | 
				
			||||||
	uint32_t id;				/**< id of the global */
 | 
						uint32_t id;				/**< id of the global */
 | 
				
			||||||
	enum pw_direction direction;		/**< port direction */
 | 
						enum pw_direction direction;		/**< port direction */
 | 
				
			||||||
#define PW_PORT_CHANGE_MASK_PROPS		(1 << 0)
 | 
					#define PW_PORT_CHANGE_MASK_PROPS		(1 << 0)
 | 
				
			||||||
#define PW_PORT_CHANGE_MASK_ENUM_PARAMS		(1 << 1)
 | 
					 | 
				
			||||||
	uint64_t change_mask;			/**< bitfield of changed fields since last call */
 | 
						uint64_t change_mask;			/**< bitfield of changed fields since last call */
 | 
				
			||||||
	struct spa_dict *props;			/**< the properties of the port */
 | 
						struct spa_dict *props;			/**< the properties of the port */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1324,9 +1324,6 @@ static void node_info_changed(void *data, struct pw_node_info *info)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_debug("info changed %p", d);
 | 
						pw_log_debug("info changed %p", d);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (info->change_mask & PW_NODE_CHANGE_MASK_ENUM_PARAMS) {
 | 
					 | 
				
			||||||
		change_mask |= PW_CLIENT_NODE_UPDATE_PARAMS;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) {
 | 
						if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) {
 | 
				
			||||||
		change_mask |= PW_CLIENT_NODE_UPDATE_PROPS;
 | 
							change_mask |= PW_CLIENT_NODE_UPDATE_PROPS;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -247,10 +247,11 @@ static void print_node(struct proxy_data *data)
 | 
				
			||||||
static void node_event_info(void *object, struct pw_node_info *info)
 | 
					static void node_event_info(void *object, struct pw_node_info *info)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
        struct proxy_data *data = object;
 | 
					        struct proxy_data *data = object;
 | 
				
			||||||
 | 
						bool is_new = data->info == NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	data->info = pw_node_info_update(data->info, info);
 | 
						data->info = pw_node_info_update(data->info, info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (info->change_mask & PW_NODE_CHANGE_MASK_ENUM_PARAMS) {
 | 
						if (is_new) {
 | 
				
			||||||
		pw_node_proxy_enum_params((struct pw_node_proxy*)data->proxy,
 | 
							pw_node_proxy_enum_params((struct pw_node_proxy*)data->proxy,
 | 
				
			||||||
				SPA_PARAM_List, 0, 0, NULL);
 | 
									SPA_PARAM_List, 0, 0, NULL);
 | 
				
			||||||
		add_pending(data);
 | 
							add_pending(data);
 | 
				
			||||||
| 
						 | 
					@ -313,10 +314,11 @@ static void port_event_info(void *object, struct pw_port_info *info)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        struct proxy_data *data = object;
 | 
					        struct proxy_data *data = object;
 | 
				
			||||||
 | 
						bool is_new = data->info == NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	data->info = pw_port_info_update(data->info, info);
 | 
						data->info = pw_port_info_update(data->info, info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (info->change_mask & PW_PORT_CHANGE_MASK_ENUM_PARAMS) {
 | 
						if (is_new) {
 | 
				
			||||||
		pw_port_proxy_enum_params((struct pw_port_proxy*)data->proxy,
 | 
							pw_port_proxy_enum_params((struct pw_port_proxy*)data->proxy,
 | 
				
			||||||
				SPA_PARAM_EnumFormat, 0, 0, NULL);
 | 
									SPA_PARAM_EnumFormat, 0, 0, NULL);
 | 
				
			||||||
		add_pending(data);
 | 
							add_pending(data);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue