fdmanager: add global object manager

Add a global object that can be used to track outstanding fds for a
client. This can later also be used to limit the number of fds per
client.
Use this in the payloader to track fds. This makes it possible to track
the fds even when the client reconnects.
Set the client patch on the socket so that we can use it to track the
fds we sent to this client.
When the client disappears, release all outstanding fds.
This commit is contained in:
Wim Taymans 2016-04-08 16:50:01 +02:00
parent 29e664ee21
commit ae5d26e049
8 changed files with 438 additions and 37 deletions

View file

@ -232,6 +232,7 @@ handle_start (PinosSourceOutput1 *interface,
g_clear_object (&priv->socket);
priv->socket = g_socket_new_from_fd (fd[0], NULL);
g_object_set_data (priv->socket, "pinos-client-path", priv->client_path);
g_object_notify (G_OBJECT (output), "socket");
/* the notify of the socket above should configure the format */