Re: Interfacing webcam with NetBSD

2018-11-12 Thread Mayuresh
On Sun, Nov 11, 2018 at 03:41:51PM +0100, Michael van Elst wrote:
> The last message is probably caused by uvideo trying to guess the
> correct USB "alternate interface" and failing. Then sorry, your
> camera is not supported yet.

Is it possible to write userspace code (assuming we get device protocol
information, say by rev engg on another OS) for such devices?

Mayuresh


Re: Interfacing webcam with NetBSD

2018-11-12 Thread Mayuresh
On Mon, Nov 12, 2018 at 02:50:47PM +, Stephen Borrill wrote:
> This relies on Cuse which seems to be a rather more basic version of pud(4).

Sounds interesting (pud i.e.). But man pud sort of scares away:

 This document is in a hit-in-the-head style obviously not even near
 complete.

 The subsystem lacks a puffs-style library that servers can be written
 against.

Would appreciate if there are any pointers available to make an
unsupported USB device "available" to userspace for exploration.

Mayuresh


Re: Interfacing webcam with NetBSD

2018-11-12 Thread Stephen Borrill

On Mon, 12 Nov 2018, Mayuresh wrote:

On Sun, Nov 11, 2018 at 03:41:51PM +0100, Michael van Elst wrote:

The last message is probably caused by uvideo trying to guess the
correct USB "alternate interface" and failing. Then sorry, your
camera is not supported yet.


Is it possible to write userspace code (assuming we get device protocol
information, say by rev engg on another OS) for such devices?


That's what they have over in FreeBSD-land:

http://www.selasky.org/hans_petter/video4bsd/index.html

This relies on Cuse which seems to be a rather more basic version of 
pud(4).


--
Stephen



Re: Interfacing webcam with NetBSD

2018-11-12 Thread Robert Swindells


Mayuresh  wrote:
>On Sun, Nov 11, 2018 at 12:46:19PM -, Michael van Elst wrote:
>> Try mpv av://v4l2:/dev/video1
>> 
>> Depending on your system you may also want the option "-vo xv" (needs XVideo
>> support) or just "-vo x11".
>
>Get io error
>
>$ mpv av://v4l2:/dev/video1
>Playing: av://v4l2:/dev/video1
>[ffmpeg/demuxer] video4linux2,v4l2: ioctl(VIDIOC_G_PARM): Invalid argument
>[ffmpeg/demuxer] video4linux2,v4l2: Time per frame unknown
>[ffmpeg/demuxer] video4linux2,v4l2: ioctl(VIDIOC_STREAMON): Input/output error
>[lavf] avformat_open_input() failed
>Failed to recognize file format.
>
>Same with -vo. Also tried as root to avoid permission issue though I've
>set them right.

I'm going to commit some changes to video(4) soon that add support for
the VIDIOC_G_PARM ioctl, as well as an update to the v4l2 package.

Don't know if we will want to backport them to NetBSD-8.


Re: Interfacing webcam with NetBSD

2018-11-12 Thread Martin Husemann
On Mon, Nov 12, 2018 at 06:23:11PM +0100, Michael van Elst wrote:
> On Mon, Nov 12, 2018 at 05:45:48PM +0100, Martin Husemann wrote:
> > On Mon, Nov 12, 2018 at 09:50:42PM +0530, Mayuresh wrote:
> > >  The subsystem lacks a puffs-style library that servers can be written
> > >  against.
> > 
> > That does not make sense to me - just open the device?
> 
> He first has to disable the uvideo driver that claims the device but
> can't handle it.

Ignore me - I read "pad(4)" instead of "pud(4)".

Martin


Re: Interfacing webcam with NetBSD

2018-11-12 Thread Martin Husemann
On Mon, Nov 12, 2018 at 09:50:42PM +0530, Mayuresh wrote:
>  The subsystem lacks a puffs-style library that servers can be written
>  against.

That does not make sense to me - just open the device?

Martin


Re: Interfacing webcam with NetBSD

2018-11-12 Thread Michael van Elst
On Mon, Nov 12, 2018 at 05:45:48PM +0100, Martin Husemann wrote:
> On Mon, Nov 12, 2018 at 09:50:42PM +0530, Mayuresh wrote:
> >  The subsystem lacks a puffs-style library that servers can be written
> >  against.
> 
> That does not make sense to me - just open the device?

He first has to disable the uvideo driver that claims the device but
can't handle it.


Greetings,
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."