Add provide mode to pinossink

Add a mode to provide a stream to pinossink
Small improvements, leak fixes.
This commit is contained in:
Wim Taymans 2016-05-06 17:54:23 +02:00
parent ba4ef9b5d9
commit 20c50772fa
20 changed files with 309 additions and 212 deletions

View file

@ -172,10 +172,10 @@ client_fill_info (PinosClientInfo *info, GDBusProxy *proxy)
info->id = proxy;
info->client_path = g_dbus_proxy_get_object_path (proxy);
SET_STRING ("Sender", sender, 0);
info->change_mask = 0;
SET_STRING ("Name", name, 0);
SET_PROPERTIES ("Properties", properties, 1);
SET_PROPERTIES ("Properties", properties, 0);
if (changed)
g_hash_table_remove_all (changed);

View file

@ -91,8 +91,8 @@ void pinos_context_get_daemon_info (PinosContext *context,
* PinosClientInfo:
* @id: generic id of the client
* @client_path: unique path of the client
* @sender: sender of client
* @change_mask: bitfield of changed fields since last call
* @name: name of client
* @properties: extra properties
*
* The client information. Extra information can be added in later
@ -101,8 +101,8 @@ void pinos_context_get_daemon_info (PinosContext *context,
typedef struct {
gpointer id;
const char *client_path;
const char *sender;
guint64 change_mask;
const char *name;
PinosProperties *properties;
} PinosClientInfo;

View file

@ -33,9 +33,8 @@
#define PINOS_DBUS_SERVICE "org.pinos"
#define PINOS_DBUS_OBJECT_PREFIX "/org/pinos"
#define PINOS_DBUS_OBJECT_SERVER PINOS_DBUS_OBJECT_PREFIX "/server"
#define PINOS_DBUS_OBJECT_NODE PINOS_DBUS_OBJECT_PREFIX "/node"
#define PINOS_DBUS_OBJECT_PORT PINOS_DBUS_OBJECT_PREFIX "/port"
#define PINOS_DBUS_OBJECT_CLIENT PINOS_DBUS_OBJECT_PREFIX "/client"
#define PINOS_DBUS_OBJECT_NODE PINOS_DBUS_OBJECT_PREFIX "/node"
void pinos_init (int *argc, char **argv[]);

View file

@ -201,7 +201,7 @@ subscription_cb (PinosSubscribe *subscribe,
PINOS_STREAM_STATE_ERROR,
g_error_new_literal (G_IO_ERROR,
G_IO_ERROR_CLOSED,
"Output disappeared"));
"Channel disappeared"));
}
}
break;
@ -508,8 +508,8 @@ on_channel_proxy (GObject *source_object,
if (priv->channel == NULL)
goto channel_failed;
/* get the source we are connected to */
v = g_dbus_proxy_get_cached_property (priv->channel, "Owner");
/* get the port we are connected to */
v = g_dbus_proxy_get_cached_property (priv->channel, "Port");
if (v) {
gsize len;
str = g_variant_dup_string (v, &len);