79man / v4lsink

Automatically exported from code.google.com/p/v4lsink
0 stars 0 forks source link

valac : syntax error #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. svn checkout http://v4lsink.googlecode.com/svn/trunk/ v4lsink ; cd v4lsink
2. dpkg-buildpackage

What is the expected output? What do you see instead?
make[1]: Entering directory `/home/fred/dev/src/v4lsink'
valac --output=v4lsink --vapidir=. --pkg posix --pkg v4l2 --pkg
gstreamer-0.10 --pkg gtk+-2.0 --pkg gdk-x11-2.0 --pkg
gstreamer-interfaces-0.10 --pkg gstreamer-video-0.10 gst-app.vala
gst-v4lsink-loopback.vala
v4l2.vapi:295.10-295.17: error: syntax error, no expression allowed between
array brackets
                public uint8[4] userbits;
....... x 12 ....
Compilation failed: 12 error(s), 0 warning(s)

What version of the product are you using? On what operating system?
valac --version
Vala 0.7.7

otherwise Debian sid

Please provide any additional information below.

I am trying to pipe gstreamer to skype. 
Would also be nice if you have more info about settings for skype
like scaling and how to get the right palette etc. 

Trying to use a Canon HV20 as "webcam". Gstreamer supports HV20, so I just
have to scale and fix the stream for skype. 

Original issue reported on code.google.com by fred.tre...@googlemail.com on 5 Oct 2009 at 9:17

GoogleCodeExporter commented 9 years ago
I'll check and fix compilation, but scaling a hardcoded thing and I do not have
enough knowledge in gstreamer to fix this.

Original comment by gorinich...@gmail.com on 5 Oct 2009 at 9:22

GoogleCodeExporter commented 9 years ago
Seems that it was enough to remove the array definitions and set them to [].
Now compiles, need to check if it works later. 
Attached a patch that removes the errors.

There are still some warnings like :
** (valac:22889): CRITICAL **: vala_class_add_hidden_method: assertion `self != 
NULL'
failed
But not sure if that will cause a problem.. 

Original comment by fred.tre...@googlemail.com on 5 Oct 2009 at 12:44

Attachments:

GoogleCodeExporter commented 9 years ago
With the patch :
v4lsink 'videotestsrc ! ffmpegcolorspace ! video/x-raw-yuv,width=640,height=480 
 !
V4l2SinkLoopback'
and
mplayer tv:// -tv driver=v4l2:device=/dev/video0

worked (oh, I did change the hardcoded /dev/video1 dev value.. ) 
Tonight I will try to check if skype can work with this.

For 
v4lsink 'videotestsrc ! ffmpegcolorspace !
video/x-raw-yuv,width=640,height=480,format=\(fourcc\)UYVY  ! V4l2SinkLoopback'
I get 
** (v4lsink:8588): CRITICAL **: file /home/fred/dev/src/v4lsink/gst-app.vala.c: 
line
101: uncaught error: could not parse caps
"video/x-raw-yuv,width=640,height=480,format=\(fourcc\)UYVY"
Will come back with resolution or a propper bugreport

Original comment by fred.tre...@googlemail.com on 6 Oct 2009 at 7:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm a bit lost, and can think of no better way to ask my question: why does it 
not work this way?

v4l2loopback> make
v4l2loopback> sudo make install
v4l2loopback> sudo modprobe  v4l2loopback device=/dev/video5
v4l2loopback> gst-launch videotestsrc ! v4l2sink device=/dev/video5 &
v4l2loopback> gst-launch v4l2src device=/dev/video5 ! ximagesink

Best Regards,

-SM

Original comment by smai...@alaya.com on 16 Jun 2010 at 12:01

GoogleCodeExporter commented 9 years ago
It worked before vala got upgraded

Original comment by gorinich...@gmail.com on 16 Jun 2010 at 12:05

GoogleCodeExporter commented 9 years ago
Really, just like my examples in comment 5? 

v4l2loopback> make
v4l2loopback> sudo make install
v4l2loopback> sudo modprobe  v4l2loopback device=/dev/video5
v4l2loopback> gst-launch videotestsrc ! v4l2sink device=/dev/video5 &
v4l2loopback> gst-launch v4l2src device=/dev/video5 ! ximagesink

Note I am refering to the v4l2sink which ships with gstreamer.  If so, that 
would be very good news, and I hope to see a fixed version soon.  This seems to 
fill a huge gap in gstreamer.

-SM

Original comment by smai...@alaya.com on 16 Jun 2010 at 7:40

GoogleCodeExporter commented 9 years ago
I never could make gstreamer native sink work, that is why I wrote this when I 
had need in such sink.

Original comment by gorinich...@gmail.com on 16 Jun 2010 at 7:53

GoogleCodeExporter commented 9 years ago
afaik I could register this sink in gstreamer locally and use it just like in 
example given.

Original comment by gorinich...@gmail.com on 16 Jun 2010 at 7:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm curious why you could never make the native gstreamer sink work.  One thing 
I noticed is that, when I tried the v4l2loopback device with all gstreamer 
plugins, 

v4l2loopback> gst-launch videotestsrc ! v4l2sink device=/dev/video5 &

it said it could not negotiate the pixmap format, before even doing this step

v4l2loopback> gst-launch v4l2src device=/dev/video5 ! ximagesink

This begs the question: why does the v4l2loopback device negotiate at all at 
this point? Shouldn't it rather accept whatever the upstream dictates, and 
leave it to (in my example, the gst) v4l2src to negotiate downstream on its 
behalf. Does my question make sense? =)

-SM

Original comment by smai...@alaya.com on 16 Jun 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Comments, gz?

Original comment by smai...@alaya.com on 20 Jun 2010 at 10:56

GoogleCodeExporter commented 9 years ago
v4l2 devices negotiate at initialization, that is the sink one who should defer 
initialization until it got data format

Original comment by gorinich...@gmail.com on 20 Jun 2010 at 11:01