mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	subscribe: rework some more
Track senders in the subscribe object and aggregate events from all connected clients. This allows each client to get a complete view of all the objects of pulsevideo. With all the source objects available, we can then to the selection of the source on each client. Remove the CreatSourceOutput on the Client1 object but let the client select a good source and call CreateSourceOutput directly on the source. This avoid going through the server to get a connection and the client can just as well select a source. Add a state property to the source and make it such that it can do async state changes. Remove the source provider object, each client can now directly see the objects of another clients so there is no need for intermediate objects in the server.
This commit is contained in:
		
							parent
							
								
									89c7955f3d
								
							
						
					
					
						commit
						417cd76f3e
					
				
					 17 changed files with 603 additions and 388 deletions
				
			
		| 
						 | 
				
			
			@ -24,10 +24,32 @@
 | 
			
		|||
static GMainLoop *loop;
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
subscription_cb (PvContext *context, PvSubscriptionEvent type, PvSubscriptionFlags flags,
 | 
			
		||||
    GDBusObject *object, gpointer user_data)
 | 
			
		||||
dump_object (GDBusProxy *proxy)
 | 
			
		||||
{
 | 
			
		||||
  g_print ("got event %d %d %s\n", type, flags, g_dbus_object_get_object_path (object));
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
subscription_cb (PvContext *context, PvSubscriptionEvent type, PvSubscriptionFlags flags,
 | 
			
		||||
    GDBusProxy *object, gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
  g_print ("got event %d %d %s:%s\n", type, flags,
 | 
			
		||||
      g_dbus_proxy_get_name (object),
 | 
			
		||||
      g_dbus_proxy_get_object_path (object));
 | 
			
		||||
 | 
			
		||||
  switch (type) {
 | 
			
		||||
    case PV_SUBSCRIPTION_EVENT_NEW:
 | 
			
		||||
      dump_object (object);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
    case PV_SUBSCRIPTION_EVENT_CHANGE:
 | 
			
		||||
      dump_object (object);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
    case PV_SUBSCRIPTION_EVENT_REMOVE:
 | 
			
		||||
      g_print ("object removed %s\n", g_dbus_proxy_get_object_path (object));
 | 
			
		||||
      break;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue