From cfaac57a762d2adc6669f4a4a89d9cb0d62f23ab Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 19 Jul 2011 22:34:54 +0000 Subject: [PATCH] emotion: add v4l2:// uri scheme for webcam. SVN revision: 61512 --- legacy/emotion/src/lib/emotion_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/legacy/emotion/src/lib/emotion_main.c b/legacy/emotion/src/lib/emotion_main.c index 8a5a055ddd..9154ffcc26 100644 --- a/legacy/emotion/src/lib/emotion_main.c +++ b/legacy/emotion/src/lib/emotion_main.c @@ -184,14 +184,21 @@ static Emotion_Webcam * _emotion_webcam_new(const char *syspath) { Emotion_Webcam *test; + const char *device; + char *local; test = malloc(sizeof (Emotion_Webcam)); if (!test) return NULL; test->syspath = eina_stringshare_ref(syspath); - test->device = eeze_udev_syspath_get_property(syspath, "DEVNAME"); test->name = eeze_udev_syspath_get_sysattr(syspath, "name"); + device = eeze_udev_syspath_get_property(syspath, "DEVNAME"); + local = alloca(eina_stringshare_strlen(device) + 8); + snprintf(local, eina_stringshare_strlen(device) + 8, "v4l2://%s", device); + test->device = eina_stringshare_add(local); + eina_stringshare_del(device); + return test; }