Re: [v4l4j] Re: Dumping ppm file with "bare bones" code

27 views
Skip to first unread message

Gilles Gigan

unread,
Apr 10, 2013, 9:30:28 PM4/10/13
to v4...@googlegroups.com
Hi Benjamin,
can you send the full output of ant dumpInfo from thedebug build of v4l4j you have.
Thanks
Gilles


On 10 April 2013 15:07, Benjamin Hill <benjam...@gmail.com> wrote:
Some debug info (bolding the suspect part).  Strange, no?



FORMAT:7 RGB24 UNSUPPORTED (this is the resolution obj)
FORMAT:6 BGR24 UNSUPPORTED
FORMAT:31 YUV420 UNSUPPORTED
FORMAT:17 YVU420 UNSUPPORTED
[v4l4j_FrameGrabber.c:331] [CALL] Entering Java_au_edu_jcu_v4l4j_AbstractGrabber_doInit
[v4l4j_FrameGrabber.c:271] [CALL] Entering get_lastFrame_field_ids
[v4l4j_FrameGrabber.c:345] [LIBVIDEO] Calling init_capture_device()
[libvideo.c:203 init_capture_device] CAP: Initialising capture interface
[libvideo.c:204 init_capture_device] [MEMALLOC]: allocating 52 bytes of type struct capture_device * for var vdev->capture (0xda8820)
[libvideo.c:205 init_capture_device] [MEMALLOC]: allocating 20 bytes of type struct mmap * for var vdev->capture->mmap (0xda8858)
[libvideo.c:161 setup_capture_actions] [MEMALLOC]: allocating 52 bytes of type struct capture_actions * for var c->actions (0xda8870)
[libvideo.c:218 init_capture_device] [MEMALLOC]: allocating 20 bytes of type struct convert_data * for var vdev->capture->convert (0xda88a8)
[v4l4j_FrameGrabber.c:209] [V4L4J] Setting output to RAW - input format: RGB24
[v4l4j_FrameGrabber.c:234] [V4L4J] raw format - no conversion
[v4l4j_FrameGrabber.c:368] [V4L4J] src format: 'chosen by libvideo'
[v4l4j_FrameGrabber.c:371] [V4L4J] dest format: RGB24
[v4l4j_FrameGrabber.c:373] [LIBVIDEO] calling 'set_cap_param'
[v4l2-input.c:565 set_cap_param_v4l2] CAP: Setting capture parameters on device /dev/video0.
[v4l2-input.c:586 set_cap_param_v4l2] Output format 'RGB24' requested
[v4l2-input.c:354 set_image_format] [MEMALLOC]: allocating 204 bytes of type struct v4l2_format * for var c->convert->src_fmt (0xda8900)
[v4l2-input.c:355 set_image_format] [MEMALLOC]: allocating 204 bytes of type struct v4l2_format * for var c->convert->dst_fmt (0xda89d0)
[v4l2-input.c:364 set_image_format] CAP: Applying palette RGB24...
[v4l2-input.c:310 try_image_format] CAP: For dest palette 0x33424752 (RGB24 - 7) 160x120 - ...
[v4l2-input.c:315 try_image_format] CAP: libv4lconvert said to use palette 0x47425247 162x120 - ...
[v4l2-input.c:321 try_image_format] CAP: which is libvideo index 40, palette SGRBG8
[v4l2-input.c:331 try_image_format] CAP: libv4lconvert required ? Yes
[v4l2-input.c:249 apply_image_format] CAP: palette 0x47425247  - accepted at 162x120
[v4l2-input.c:401 set_image_format] CAP: setting src palette (SGRBG8) accepted
[v4l2-input.c:421 set_image_format] CAP: capturing (src) using width: 162,  height: 120, bytes/line 162, image size: 19440 - palette: 40 (SGRBG8)
[v4l2-input.c:426 set_image_format] CAP: libv4lconvert required ? Yes
[v4l2-input.c:439 set_image_format] CAP: conv to (dst) width: 160, height: 120, bytes/line 480, image size: 57600 - palette: 7 (RGB24) - native format: Yes
[v4l4j_FrameGrabber.c:403] [LIBVIDEO] Calling 'init_capture(dev: /dev/video0)'
[v4l2-input.c:617 init_capture_v4l2] CAP: Initialising capture on device /dev/video0.
[v4l2-input.c:627 init_capture_v4l2] CAP: asking for 4 V4L2 buffers
[v4l2-input.c:636 init_capture_v4l2] CAP: driver said 4 V4L2 buffers
[v4l2-input.c:639 init_capture_v4l2] [MEMALLOC]: allocating 32 bytes of type struct mmap_buffer * for var c->mmap->buffers (0xda8aa0)
[v4l2-input.c:670 init_capture_v4l2] CAP: mmap'ed 20480 bytes at 0xb3c84000
[v4l2-input.c:670 init_capture_v4l2] CAP: mmap'ed 20480 bytes at 0xad340000
[v4l2-input.c:670 init_capture_v4l2] CAP: mmap'ed 20480 bytes at 0xad33b000
[v4l2-input.c:670 init_capture_v4l2] CAP: mmap'ed 20480 bytes at 0xad336000
[v4l4j_FrameGrabber.c:162] [CALL] Entering init_format_converter
[v4l4j_FrameGrabber.c:178] [V4L4J] no conversion done by v4l4j - raw copy
[v4l4j_FrameGrabber.c:48] [CALL] Entering update_width_height
[v4l4j_FrameGrabber.c:434] [CALL] Entering Java_au_edu_jcu_v4l4j_AbstractGrabber_getBufferSize
[v4l4j_FrameGrabber.c:121] [V4L4J] OUTPUT: RAW / JPEG - Using byte array of size 57600
Taking snapshot...
[v4l4j_FrameGrabber.c:445] [CALL] Entering Java_au_edu_jcu_v4l4j_AbstractGrabber_start
[v4l4j_FrameGrabber.c:449] [LIBVIDEO] Calling 'start_capture(dev: /dev/video0)'
[v4l2-input.c:681 start_capture_v4l2] CAP: Starting capture on device /dev/video0.
[v4l4j_FrameGrabber.c:592] [CALL] Entering Java_au_edu_jcu_v4l4j_AbstractGrabber_fillBuffer
[v4l2-input.c:740 dequeue_buffer_v4l2] CAP: dequeuing buffer on device /dev/video0.
[v4l2-input.c:764 dequeue_buffer_v4l2] CAP: dequeued buffer 0 length: 19370 - seq: 0 - time 1222611564
[v4l4j_FrameGrabber.c:651] JNI Conversion took  101 us
Got an image:1222611564 RGB24
frame.getBytes...Got frame size:19370 and bytes length:57600
[v4l4j_FrameGrabber.c:672] [CALL] Entering Java_au_edu_jcu_v4l4j_AbstractGrabber_stop
[v4l4j_FrameGrabber.c:675] [LIBVIDEO] Calling stop_capture(dev: /dev/video0)
[v4l2-input.c:791 stop_capture_v4l2] CAP: stopping capture on device /dev/video0.
[v4l4j_FrameGrabber.c:581] [CALL] Entering Java_au_edu_jcu_v4l4j_AbstractGrabber_enqueueBuffer
[v4l2-input.c:774 enqueue_buffer_v4l2] CAP: queuing buffer 0 on device /dev/video0.

--
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.
 
 

Gilles Gigan

unread,
Apr 13, 2013, 6:33:44 PM4/13/13
to v4...@googlegroups.com
Hi Benjamin,
I pasted your PPM code into the GetSnapShot.java app in au.edu.jcu.v4l4j.example, and it worked OK (see attached code). Can you try it and tell me if it works for you.
Thanks
Gilles


On 11 April 2013 19:51, Benjamin Hill <benjam...@gmail.com> wrote:
Sure thing.
Noticed this during the build-from-source, not sure if possibly related:

[exec] jl2005bcd.c:171:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘unsigned int’ [-Wformat]


As for the output:

pi@raspberrypi ~/webcam/v4l4j-trunk $ ant deviceInfo
Buildfile: /home/pi/webcam/v4l4j-trunk/build.xml


deviceInfo
:
     
[java] [ libvideo.c:68 ] Using libvideo version 0.9-libvideo_r487
     
[java] name: Camera
     
[java] Device file: /dev/video0
     
[java] Supported formats:
     
[java] RGB24 - 7 - no resolution information
     
[java] BGR24 - 6 - no resolution information
     
[java] YUV420 - 31 - no resolution information
     
[java] YVU420 - 17 - no resolution information
     
[java] Formats that can be RGB24-converted:
     
[java] RGB24 - 7 - no resolution information
     
[java] Formats that can be BGR24-converted:
     
[java] BGR24 - 6 - no resolution information
     
[java] Formats that can be YUV420-converted:
     
[java] YUV420 - 31 - no resolution information
     
[java] Formats that can be YVU420-converted:
     
[java] YVU420 - 17 - no resolution information
     
[java] Formats that can be JPEG-encoded:
     
[java] YUV420 - 31 - no resolution information
     
[java] RGB24 - 7 - no resolution information
     
[java] BGR24 - 6 - no resolution information
     
[java] Inputs:
     
[java] Name: STV06xx
     
[java] Type: 2(Camera)
     
[java] Index: 0
     
[java] Supported standards:
     
[java] 0(None/Webcam)
     
[java] Control: Contrast - min: 0 - max: 15 - step: 1 - value: 7
     
[java] Control: Whitebalance (software) - min: 0 - max: 1 - step: 1 - value:  ERROR
     
[java] Control: Auto Gain target - min: 0 - max: 255 - step: 1 - value:  ERROR
     
[java] Control: Gain - min: 0 - max: 255 - step: 1 - value: 97
     
[java] Control: Gamma (software) - min: 500 - max: 3000 - step: 1 - value:  ERROR
     
[java] Control: Brightness - min: 0 - max: 31 - step: 1 - value: 10
     
[java] Control: Auto Gain (software) - min: 0 - max: 1 - step: 1 - value:  ERROR
     
[java] Control: Vertical flip (sw) - min: 0 - max: 1 - step: 1 - value:  ERROR
     
[java] Control: Horizontal flip (sw) - min: 0 - max: 1 - step: 1 - value:  ERROR
     
[java] Control: Exposure - min: 0 - max: 1023 - step: 1 - value: 500


BUILD SUCCESSFUL
Total time: 11 seconds

GetSnapshotApp.java
Reply all
Reply to author
Forward
0 new messages