Failed to set camera source 0: Device or resource busy

Forum for questions and support relating to the 1.25.x releases only.
Locked
jjo
Posts: 2
Joined: Sat Feb 09, 2013 4:25 pm

Failed to set camera source 0: Device or resource busy

Post by jjo »

Hi,

This must be quite simple issue, because I've spent weeks to trying resolve it without luck.

My system is ClearOS 6.3.0 (RedHat fork) 64-bit. Capture device is EasyCap model002 (stk1160). I have upgraded kernel to 3.7.5-1.el6.elrepo.x86_64 because it has stk1160 driver built-in.

I can get picture with:

Code: Select all

ffmpeg -f video4linux2 -i /dev/video0 -vframes 1 test.jpg
but zoneminder says:

Code: Select all

Feb  9 18:18:58 kaappi zmdc[6081]: INF [Starting pending process, zmc -d /dev/video0]
Feb  9 18:18:58 kaappi zmdc[6081]: INF ['zmc -d /dev/video0' starting at 13/02/09 18:18:58, pid = 6186]
Feb  9 18:18:58 kaappi zmdc[6186]: INF ['zmc -d /dev/video0' started at 13/02/09 18:18:58]
Feb  9 18:18:58 kaappi zma_m1[6120]: WAR [Waiting for capture daemon]
Feb  9 18:18:58 kaappi zmc_dvideo0[6186]: INF [Starting Capture]
Feb  9 18:18:58 kaappi kernel: stk1160: queue_setup: buffer count 8, each 829440 bytes
Feb  9 18:18:58 kaappi zmc_dvideo0[6186]: FAT [Failed to set camera source 0: Device or resource busy]
Feb  9 18:18:58 kaappi zmdc[6081]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
the "Device or resource busy" error came from zm_local_camera.cpp line 504. I could get wery rude picture to zm when i comment out 'if' -procedures around line 504 and 525. That make me suspect that 'zm_local_camera.cpp' could not send parameters to v4l2 device. v4l2-ctl still be able to set parameters.

Code: Select all

# v4l2-ctl -s pal
Standard set to 000000ff
# v4l2-ctl --all
Driver Info (not using libv4l2):
        Driver name   : stk1160
        Card type     : stk1160
        Bus info      : usb-0000:02:02.0-1
        Driver version: 3.7.5
        Capabilities  : 0x85000001
                Video Capture
                Read/Write
                Streaming
Format Video Capture:
        Width/Height  : 720/576
        Pixel Format  : 'UYVY'
        Field         : Interlaced
        Bytes per Line: 1440
        Size Image    : 829440
        Colorspace    : Broadcast NTSC/PAL (SMPTE170M/ITU601)
Video input : 0 (Composite0: ok)
Video Standard = 0x000000ff
        PAL-B/B1/G/H/I/D/D1/K
Streaming Parameters Video Capture:
        Frames per second: 25.000 (25/1)
        Read buffers     : 2
Priority: 2
zm-monitor-source settings is: /dev/video0, v4l2, channel 0, PAL, grey, 720, 576

Also i've also tested my hardware with "zoneminder virtual appliance" and that works ok.

Does anybody have been stuck with this and get it working?
Thank's for reading and more thanks for possible solution.

-- Jarkko
diggy
Posts: 1
Joined: Thu Mar 06, 2014 10:20 pm

Re: Failed to set camera source 0: Device or resource busy

Post by diggy »

I have exactly the same problem with the same chipset.

I can see picture from within other apps eg VLC but cannot view through ZM.
jjo
Posts: 2
Joined: Sat Feb 09, 2013 4:25 pm

Re: Failed to set camera source 0: Device or resource busy

Post by jjo »

Hi Diggy,

I still have this issue. Please post solution to this forum if you find it somewhere.

Thanks
- JJ
Locked