Re: [v4l4j] Slow frame per second in Java on Raspberry Pi

43 views
Skip to first unread message

Gilles Gigan

unread,
Apr 29, 2013, 6:36:15 PM4/29/13
to v4...@googlegroups.com
Hi Ronak,
Can you run 'ant test-fps' and copy the result.
Thanks
Gilles


On 29 April 2013 22:39, Ronak Patel <panar...@gmail.com> wrote:
Hi Gilles,

I Cross-compile v4l4j in Raspberry Pi successfully from follow instruction on this link(http://code.google.com/p/v4l4j/wiki/GettingStartedOnRPi).

But whenever i start webcam viewer in raspberry pi, it open successfully ,but it give me 1 frame per around 3 second at 640X480.

I wont 20 frame per second.

Please give me suggestion . i am struggling with my raspberry pi with v4l4j.

Thanks
Ronak Patel.

--
You received this message because you are subscribed to the Google Groups "v4l4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v4l4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Christopher Friedt

unread,
Apr 30, 2013, 9:36:58 AM4/30/13
to v4...@googlegroups.com
Hey Gilles,

Are you using gnu classpath and jamvm ? At one point, I wrote a really
minimal patch for the two of those that actually allowed special (i.e.
device node) files to be memory mapped, so that a MappedByteBuffer
could be created.

The most brain-dead thing that I ever encountered with Java as a
language was the inability to memory-map special files. This wasn't
isolated to classpath / jamvm either - sun-jdk was also culprit.

I originally used the patch to write-to and flip a frame buffer device
in Java with minimal overhead, but there should be no reason why you
can't use it for a v4l device. That would significantly reduce the
amount of overhead in buffering frames, and probably increase the
frame rate for classpath / jamvm users.

It's been a long time since I've used v4l4j, and also a long time
since I posted those patches to classpath, so I have no idea if it's
even relevant today, but it certainly helped me out. Classpath
actually didn't incorporate the patch upstream for VM compliance
reasons, but there is no reason end users should not.

C

[1] http://comments.gmane.org/gmane.comp.java.classpath.patches/13188
Reply all
Reply to author
Forward
0 new messages