mfsourceobject: Store selected device path, name and index

Update path, name and index with selected device so that checked by
get_property() after constructed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1236>
This commit is contained in:
Seungha Yang 2020-05-01 15:12:43 +09:00 committed by GStreamer Merge Bot
parent f3d6026ad2
commit ba45e3f82b

View file

@ -313,9 +313,18 @@ gst_mf_source_object_thread_func (GstMFSourceObject * self)
}
}
if (target)
if (target) {
self->opend = klass->open (self, target->handle);
g_free (priv->device_path);
priv->device_path = g_strdup (target->path);
g_free (priv->device_name);
priv->device_name = g_strdup (target->name);
priv->device_index = target->index;
}
if (activate_list)
g_list_free_full (activate_list,
(GDestroyNotify) gst_mf_device_activate_free);