From: cedric Date: Tue, 19 Jul 2011 22:34:54 +0000 (+0000) Subject: emotion: add v4l2:// uri scheme for webcam. X-Git-Tag: submit/2.0alpha-wayland/20121127.222018~219 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef9c2fc50461a6edc4bbb94794e74489697da81a;p=profile%2Fivi%2Femotion.git emotion: add v4l2:// uri scheme for webcam. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@61512 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/emotion_main.c b/src/lib/emotion_main.c index 8a5a055..9154ffc 100644 --- a/src/lib/emotion_main.c +++ b/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; }