[vlc-devel] [PATCH] Udev SD: Try to find out the mount point for blu-ray discs.
Konstantin Pavlov
thresh at videolan.org
Wed Feb 15 13:33:42 CET 2012
---
modules/services_discovery/udev.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 56b42e2..866e887 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -34,6 +34,7 @@
#endif
#include <poll.h>
#include <errno.h>
+#include <mntent.h>
static int OpenV4L (vlc_object_t *);
#ifdef HAVE_ALSA
@@ -576,6 +577,18 @@ static char *disc_get_mrl (struct udev_device *dev)
return NULL;
val = udev_device_get_devnode (dev);
+
+ if (!strcmp (scheme, "bluray"))
+ {
+ FILE* mtab = setmntent ("/etc/mtab", "r");
+ struct mntent* m;
+ while ((m = getmntent( mtab )))
+ {
+ if( !strcmp (m->mnt_fsname, val)) val = m->mnt_dir;
+ }
+ endmntent (mtab);
+ }
+
return make_URI (val, scheme);
}
--
1.7.8.4
More information about the vlc-devel
mailing list