}
static void
-device_added (GstDevice * device)
+print_device (GstDevice * device, gboolean modified)
{
gchar *device_class, *str, *name;
GstCaps *caps;
device_class = gst_device_get_device_class (device);
props = gst_device_get_properties (device);
- g_print ("\nDevice found:\n\n");
+ g_print ("\nDevice %s:\n\n", modified ? "modified" : "found");
g_print ("\tname : %s\n", name);
g_print ("\tclass : %s\n", device_class);
for (i = 0; i < size; ++i) {
switch (GST_MESSAGE_TYPE (msg)) {
case GST_MESSAGE_DEVICE_ADDED:
gst_message_parse_device_added (msg, &device);
- device_added (device);
+ print_device (device, FALSE);
gst_object_unref (device);
break;
case GST_MESSAGE_DEVICE_REMOVED:
device_removed (device);
gst_object_unref (device);
break;
+ case GST_MESSAGE_DEVICE_CHANGED:
+ gst_message_parse_device_changed (msg, &device, NULL);
+ print_device (device, TRUE);
+ gst_object_unref (device);
+ break;
default:
g_print ("%s message\n", GST_MESSAGE_TYPE_NAME (msg));
break;
while (devices != NULL) {
GstDevice *device = devices->data;
- device_added (device);
+ print_device (device, FALSE);
gst_object_unref (device);
devices = g_list_delete_link (devices, devices);
}