mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
v4l2codecs: Add plugin dependency
This ensure that the registry cache get updated when a meaningful change is made in /dev for files named media*.
This commit is contained in:
parent
e70993bf43
commit
7254a18f0f
1 changed files with 7 additions and 0 deletions
|
@ -64,10 +64,17 @@ static gboolean
|
|||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GList *devices, *d;
|
||||
const gchar *paths[] = { "/dev", NULL };
|
||||
const gchar *names[] = { "media", NULL };
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (gstv4l2codecs_debug, "v4l2codecs", 0,
|
||||
"V4L2 CODECs general debug");
|
||||
|
||||
/* Add some dependency, so the dynamic features get updated upon changes in
|
||||
* /dev/media* */
|
||||
gst_plugin_add_dependency (plugin,
|
||||
NULL, paths, names, GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX);
|
||||
|
||||
devices = gst_v4l2_codec_find_devices ();
|
||||
for (d = devices; d; d = g_list_next (d)) {
|
||||
GstV4l2CodecDevice *device = d->data;
|
||||
|
|
Loading…
Reference in a new issue