AmandaM - 2016-04-24

Hello Everyone

It seems quiet on this forum so I hope there is somebody that can help or at least point me to a support resourse.

I am trying to use libunicap-0.9.13 and so have been playing with the samples. libunicap compiles fine and the main application, ucview, works perfectly. However, I don't want to use a GTK based application (I prefer to use wxWidgets with embedded SDL Surface).

When I connect any webcam and then run the sdl_display sample it clearly takes me through the setup process. That it to select te camera, it's format and resolution. I of course select YV12 because all the others say unsupported. However, all that happens is a black screen appears and the webcam turns on but there is no display.

It would appear that the queue buffer failed:
v4l2.c v4l2_queue_buffer (2266) :queue buffer failed

What follows is the debugging output from my console. I hope somebody can help.

Many thanks
Amanda

[root@asys-it GNU-Linux]# ./test
select video device
unicap.c enumerate_devices (360) :cpi search path: /usr/local/UNICAP-2/lib/unicap2/cpi, suffix: .so
unicap.c enumerate_devices (377) :open cpi: /usr/local/UNICAP-2/lib/unicap2/cpi/libvid21394.so
unicap.c enumerate_devices (410) :cpi.cpi_enumerate_devices: 0x7f834a686800
unicap.c enumerate_devices (421) :status: 80000001
unicap.c enumerate_devices (377) :open cpi: /usr/local/UNICAP-2/lib/unicap2/cpi/libdcam.so
unicap.c enumerate_devices (410) :cpi.cpi_enumerate_devices: 0x7f834a261090
unicap.c enumerate_devices (421) :status: 80000001
unicap.c enumerate_devices (377) :open cpi: /usr/local/UNICAP-2/lib/unicap2/cpi/libv4l2cpi.so
unicap.c enumerate_devices (410) :cpi.cpi_enumerate_devices: 0x7f834a051000
v4l2.c v4l2_enumerate_devices (405) :v4l2_enumerate_devices[0]
v4l2.c v4l2_enumerate_devices (419) :v4l2: open /dev/video0
v4l2.c v4l2_enumerate_devices (457) :Bus: usb-0000:00:1d.0-1.5
unicap.c enumerate_devices (415) :current_index: 0
v4l2.c v4l2_enumerate_devices (405) :v4l2_enumerate_devices[1]
v4l2.c v4l2_enumerate_devices (419) :v4l2: open /dev/video0
unicap.c enumerate_devices (421) :status: 80000001
unicap.c enumerate_devices (377) :open cpi: /usr/local/UNICAP-2/lib/unicap2/cpi/libeuvccam_cpi.so
unicap.c enumerate_devices (410) :cpi.cpi_enumerate_devices: 0x7f8347fdc660
unicap.c enumerate_devices (421) :status: 8000001e
0: HP Truevision HD 200901010001
unicap.c open_cpi (473) :open----------HP Truevision HD 200901010001
v4l2.c v4l2_cpi_open (488) :v4l2_cpi_open
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 0
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 1
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 2
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 3
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 4
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 5
tisuvccam.c tisuvccam_add_controls (393) :Failed to add info for control: 6
tisuvccam.c tisuvccam_add_controls (402) :Failed to add info for control: 0
tisuvccam.c tisuvccam_probe (440) :tisuvccam_probe: not a TIS UVC device
v4l2.c v4l2_reenumerate_formats (893) :enum format: index 0 desc YUYV 4:2:2
v4l2.c try_enum_framesizes (724) :found 4 framesizes for fourcc: 56595559
v4l2.c v4l2_reenumerate_formats (893) :enum format: index 1 desc Motion-JPEG
v4l2.c try_enum_framesizes (724) :found 4 framesizes for fourcc: 47504a4d
v4l2.c v4l2_reenumerate_formats (893) :enum format: index 2 desc RGB3
v4l2.c try_enum_framesizes (724) :found 4 framesizes for fourcc: 33424752
v4l2.c v4l2_reenumerate_formats (893) :enum format: index 3 desc BGR3
v4l2.c try_enum_framesizes (724) :found 4 framesizes for fourcc: 33524742
v4l2.c v4l2_reenumerate_formats (893) :enum format: index 4 desc YU12
v4l2.c try_enum_framesizes (724) :found 4 framesizes for fourcc: 32315559
v4l2.c v4l2_reenumerate_formats (893) :enum format: index 5 desc YV12
v4l2.c try_enum_framesizes (724) :found 4 framesizes for fourcc: 32315659
v4l2.c v4l2_reenumerate_properties (1644) :v4l2_reenumerate_properties
v4l2.c v4l2_reenumerate_properties (1662) :Use extended control interface
v4l2.c add_properties_ext (1525) :++Brightness++
v4l2.c add_properties_ext (1553) :add property: Brightness
v4l2.c add_properties_ext (1525) :++Contrast++
v4l2.c add_properties_ext (1553) :add property: Contrast
v4l2.c add_properties_ext (1525) :++Saturation++
v4l2.c add_properties_ext (1553) :add property: Saturation
v4l2.c add_properties_ext (1525) :++Hue++
v4l2.c add_properties_ext (1553) :add property: Hue
v4l2.c add_properties_ext (1525) :++White Balance Temperature, Auto++
v4l2.c add_properties_ext (1553) :add property: White Balance Temperature, Auto
v4l2.c add_properties_ext (1525) :++Gamma++
v4l2.c add_properties_ext (1553) :add property: Gamma
v4l2.c add_properties_ext (1525) :++Gain++
v4l2.c add_properties_ext (1553) :add property: Gain
v4l2.c add_properties_ext (1525) :++Power Line Frequency++
v4l2.c add_properties_ext (1553) :add property: Power Line Frequency
v4l2.c add_properties_ext (1525) :++White Balance Temperature++
v4l2.c add_properties_ext (1589) :disabled property: White Balance Temperature
v4l2.c add_properties_ext (1525) :++Sharpness++
v4l2.c add_properties_ext (1553) :add property: Sharpness
v4l2.c add_properties_ext (1525) :++Backlight Compensation++
v4l2.c add_properties_ext (1553) :add property: Backlight Compensation
v4l2.c add_properties_ext (1525) :++Exposure, Auto++
v4l2.c add_properties_ext (1553) :add property: Exposure, Auto
v4l2.c add_properties_ext (1525) :++Exposure (Absolute)++
v4l2.c default_override_property (1390) :Using default override for property 'shutter'
v4l2.c add_properties_ext (1537) :Added from compat: Exposure (Absolute)
v4l2.c add_properties_ext (1525) :++Exposure, Auto Priority++
v4l2.c add_properties_ext (1553) :add property: Exposure, Auto Priority
v4l2.c v4l2_enum_norms (1305) :Failed to enumerate norms
v4l2.c v4l2_enum_frameintervals (1090) :v4l2_enum_frameintervals
v4l2.c v4l2_enum_frameintervals (1119) :num: 1 denom: 30
unicap.c open_cpi (582) :open handle = 0x19729a0
unicap.c store_device_cache (151) :Storing in cache: HP Truevision HD 200901010001
unicap.c unicap_clone_handle (704) :clone handle = 0x1983180: handle = 0x19729a0 refcount = 2
Opened video capture device: HP Truevision HD 200901010001
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 0
0: YUYV 4:2:2 ( YUYV )
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 1
1: Motion-JPEG ( MJPG )
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 2
2: RGB3 ( RGB3 )
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 3
3: BGR3 ( BGR3 )
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 4
4: YU12 ( YU12 )
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 5
5: YV12 ( YV12 )
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 6
Select video format: 5
unicap.c unicap_enumerate_formats (806) :unicap_enumerate_formats, index: 5
0: 640x480
1: 160x120
2: 320x240
3: 1280x720
Select video format size: 0
v4l2.c v4l2_set_format (1018) :v4l2_set_format
unicap.c unicap_lock_stream (1372) :LOCK STREAM >>>> 1 key = 3429987
unicap.c unicap_start_capture (1145) :Capture start...
v4l2.c v4l2_capture_start (2039) :v4l2_start_capture
v4l2.c v4l2_queue_buffer (2257) :QUEUE
v4l2.c queue_buffer (2133) :Q: index = 0 type = 1, memory = 1
v4l2.c queue_buffer (2145) :VIDIOC_QBUF ioctl failed: Invalid argument
v4l2.c v4l2_queue_buffer (2266) :queue buffer failed
v4l2.c v4l2_wait_buffer (2294) :WAIT