summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_main.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-07-19 22:34:54 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-07-19 22:34:54 +0000
commitcfaac57a762d2adc6669f4a4a89d9cb0d62f23ab (patch)
tree53a9fb520d3e2f304516f207b224b11b710137a1 /legacy/emotion/src/lib/emotion_main.c
parent716660e50933a4e85d089db604ca7156ce18fac6 (diff)
emotion: add v4l2:// uri scheme for webcam.
SVN revision: 61512
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_main.c9
1 files changed, 8 insertions, 1 deletions
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 *
184_emotion_webcam_new(const char *syspath) 184_emotion_webcam_new(const char *syspath)
185{ 185{
186 Emotion_Webcam *test; 186 Emotion_Webcam *test;
187 const char *device;
188 char *local;
187 189
188 test = malloc(sizeof (Emotion_Webcam)); 190 test = malloc(sizeof (Emotion_Webcam));
189 if (!test) return NULL; 191 if (!test) return NULL;
190 192
191 test->syspath = eina_stringshare_ref(syspath); 193 test->syspath = eina_stringshare_ref(syspath);
192 test->device = eeze_udev_syspath_get_property(syspath, "DEVNAME");
193 test->name = eeze_udev_syspath_get_sysattr(syspath, "name"); 194 test->name = eeze_udev_syspath_get_sysattr(syspath, "name");
194 195
196 device = eeze_udev_syspath_get_property(syspath, "DEVNAME");
197 local = alloca(eina_stringshare_strlen(device) + 8);
198 snprintf(local, eina_stringshare_strlen(device) + 8, "v4l2://%s", device);
199 test->device = eina_stringshare_add(local);
200 eina_stringshare_del(device);
201
195 return test; 202 return test;
196} 203}
197 204