Languages

Menu
Sites
Language
I have a question about emotion_webcam & elm_video

Hello, T^T

I want to make an simple program that shows live screen through my webcam.

So first, I wrote test code like below, ( ref :https://docs.enlightenment.org/auto/eet/group__Emotion__Webcam.html )

 

const Eina_List *list = emotion_webcams_get();
printf("# of available webcam : %d\n", eina_list_count(list));

 

but it didn't fetch available webcam list.

It prints " # of available webcam : 0" ( I already tested from other webcam programs, they worked very well. )

 

 

So I wrote second test code like below, ( ref : https://docs.enlightenment.org/auto/elementary/group__Video.html )

 

...
Evas_Object *video = elm_video_add(box);
evas_object_show(video);
elm_video_file_set(video, "v4l2:///dev/video0");
elm_video_play(video);


Evas_Object *player = elm_player_add(box);
elm_object_content_set(player, video);
evas_object_show(player);
...

 

but this program makes error, 

ERR<4054>:emotion-gstreamer[T:140104796161792] modules/emotion/gstreamer1/emotion_sink.c:201 emotion_video_sink_set_caps() unsupported : YUY2

( but at terminal, "gst-launch-1.0 v4l2src device=/dev/video0 ! autovideosink" this command works well )

 

Please help me!

Thank you for your any reply about this problem!! :)

 

Edited by: Changhoon Lee on 06 Jul, 2015

Responses

1 Replies
colin Rao

Hi,

As the description of emotion_webcam_get(), maybe you can call emotion_webcam_get() in the callback of event EMOTION_WEBCAM_UPDATE.

It will return the current live list of webcam. It is updated before triggering EMOTION_WEBCAM_UPDATE and should never be modified.

Regarding EMOTION_WEBCAM_UPDATE event, ref: https://docs.enlightenment.org/auto/eet/group__Emotion__API.html#gaab2660883f5966ba24784ddd3e78138a