deviceprovider: fix device provider

This commit is contained in:
Wim Taymans 2015-07-09 11:35:18 +02:00
parent 53bc0f7848
commit 5d4350a38f
2 changed files with 27 additions and 44 deletions

View file

@ -52,6 +52,9 @@ device_added (PinosGstManager *manager,
PinosSource *source;
name = gst_device_get_display_name (device);
if (strcmp (name, "gst") == 0)
return;
g_print("Device added: %s\n", name);
element = gst_device_create_element (device, NULL);
@ -68,7 +71,11 @@ device_removed (PinosGstManager *manager,
PinosSource *source;
name = gst_device_get_display_name (device);
if (strcmp (name, "gst") == 0)
return;
g_print("Device removed: %s\n", name);
source = g_object_steal_data (G_OBJECT (device), "PinosSource");
g_object_unref (source);
g_free (name);