Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-07 Thread Pavel Machek
Hi! > I guess that could give some basic camera functionality on OMAP3-like > hardware. Yeah, and that is the goal. > For most of the current generation of imaging subsystems (e.g. Intel > IPU3, Rockchip RKISP1) it's not enough. The reason is that there is > more to be handled by userspace than

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Pavel Machek
Hi! > > > > I don't think that kind of legacy apps is in use any more. I'd prefer > > > > not to deal with them. > > > > > > In another thread ("[ANN v2] Complex Camera Workshop - Tokyo - Jun, > > > 19"), Mauro has mentioned a number of those: > > > > > > "open source ones (Camorama, Cheese, X

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Pavel Machek
Hi! > > Thanks for thread pointer... I may be able to get in using hangouts. > > > > Anyway, there's big difference between open("/dev/video0") and > > v4l2_open("/dev/video0"). I don't care about the first one, but yes we > > should be able to support the second one eventually. > > > > And I don'

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Mauro Carvalho Chehab
Em Wed, 6 Jun 2018 12:51:16 +0200 Pavel Machek escreveu: > > > > The scenario that I could think of is: > > > > - legacy app would call open(/dev/video?), which would be handled by > > > > libv4l open hook (v4l2_open()?), > > > > > > I don't think that kind of legacy apps is in use any more. I'

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Mauro Carvalho Chehab
Em Wed, 6 Jun 2018 12:01:50 +0200 Pavel Machek escreveu: > Hi! > > > > > Who would be calling this function? > > > > > > > > The scenario that I could think of is: > > > > - legacy app would call open(/dev/video?), which would be handled by > > > > libv4l open hook (v4l2_open()?), > > > > > >

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Tomasz Figa
On Wed, Jun 6, 2018 at 7:51 PM Pavel Machek wrote: > > HI! > > > > > Thanks for coming up with this proposal. Please see my comments below. > > > > > > > > > Ok, can I get any comments on this one? > > > > > v4l2_open_complex("/file/with/descriptor", 0) can be used to open > > > > > whole pipeline

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Pavel Machek
HI! > > > Thanks for coming up with this proposal. Please see my comments below. > > > > > > > Ok, can I get any comments on this one? > > > > v4l2_open_complex("/file/with/descriptor", 0) can be used to open > > > > whole pipeline at once, and work if it as if it was one device. > > > > > > I'm n

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Pavel Machek
Hi! > > + while (lo < hi) { > > + int i = (lo + hi) / 2; > > + if (map->map[i].control == control) { > > + return map->map[i].fd; > > + } > > + if (map->map[i].control > control) { > > + hi =

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Pavel Machek
Hi! > > > Who would be calling this function? > > > > > > The scenario that I could think of is: > > > - legacy app would call open(/dev/video?), which would be handled by > > > libv4l open hook (v4l2_open()?), > > > > I don't think that kind of legacy apps is in use any more. I'd prefer > > not t

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Tomasz Figa
On Wed, Jun 6, 2018 at 5:46 PM Pavel Machek wrote: > > Hi! > > > Thanks for coming up with this proposal. Please see my comments below. > > > > > Ok, can I get any comments on this one? > > > v4l2_open_complex("/file/with/descriptor", 0) can be used to open > > > whole pipeline at once, and work i

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-06 Thread Pavel Machek
Hi! > Thanks for coming up with this proposal. Please see my comments below. > > > Ok, can I get any comments on this one? > > v4l2_open_complex("/file/with/descriptor", 0) can be used to open > > whole pipeline at once, and work if it as if it was one device. > > I'm not convinced if we should

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-05 Thread Tomasz Figa
Hi Pavel, Thanks for coming up with this proposal. Please see my comments below. On Sun, Jun 3, 2018 at 6:01 AM Pavel Machek wrote: > > Hi! > > Ok, can I get any comments on this one? > v4l2_open_complex("/file/with/descriptor", 0) can be used to open > whole pipeline at once, and work if it as

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-06-02 Thread Pavel Machek
Hi! Ok, can I get any comments on this one? v4l2_open_complex("/file/with/descriptor", 0) can be used to open whole pipeline at once, and work if it as if it was one device. Thanks, Pavel diff --git a/lib/include/libv4l2.h b/lib/inc

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-05-16 Thread Pavel Machek
Hi! > > #modes: 2 > > Driver name: OMAP 3 resizer > > It probably makes sense to place the driver name before #modes. I dropped the driver for now. It served no purpose... I got the patches to work on N900. With them (and right) > From what I understood, the "#foo: " is a tag that makes the >

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-05-15 Thread Mauro Carvalho Chehab
Em Tue, 15 May 2018 22:01:17 +0200 Pavel Machek escreveu: > Hi! > > > So, IMHO, entities should be described as: > > > > [entity entity1] > > name = foo > > function = bar > > I don't really think windows-style config file is suitable here, as we > have more than

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-05-15 Thread Pavel Machek
Hi! > So, IMHO, entities should be described as: > > [entity entity1] > name = foo > function = bar I don't really think windows-style config file is suitable here, as we have more than two "nested blocks". What about something like this? Note that I'd only imp

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-20 Thread Pavel Machek
Hi! > > > 2) support for running libv4l2 on mc-based devices. I'd like to do > > > that. > > > > > > Description file would look like. (# comments would not be not part of > > > file). > > > > > > V4L2MEDIADESC > > > 3 # number of files to open > > > /dev/video2 > > > /dev/video6 > > > /dev/vid

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Pavel Machek
Hi! > >>> V4L2MEDIADESC > >>> 3 # number of files to open > >>> /dev/video2 > >>> /dev/video6 > >>> /dev/video3 > >> > >> This won't work. The video nodes numbers (or even names) can change. > >> Instead these should be entity names from the media controller. > > > > Yes, it will work. 1) will co

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Mauro Carvalho Chehab
Em Mon, 19 Mar 2018 13:48:55 +0100 Pavel Machek escreveu: > Hi! > > > >> I really want to work with you on this, but I am not looking for partial > > >> solutions. > > > > > > Well, expecting design to be done for opensource development is a bit > > > unusual :-). > > > > Why? We have done

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Hans Verkuil
On 03/19/2018 01:48 PM, Pavel Machek wrote: > Hi! > I really want to work with you on this, but I am not looking for partial solutions. >>> >>> Well, expecting design to be done for opensource development is a bit >>> unusual :-). >> >> Why? We have done that quite often in the past. Med

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Mauro Carvalho Chehab
Em Mon, 19 Mar 2018 13:15:22 +0100 Hans Verkuil escreveu: > On 03/19/2018 01:00 PM, Pavel Machek wrote: > > Hi! > > > >>> Pavel, > >>> > >>> I appreciate your efforts of adding support for mc-based devices to > >>> libv4l. > > > > Thanks. > > > >>> I guess the main poin that Hans is poin

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Pavel Machek
Hi! > >> I really want to work with you on this, but I am not looking for partial > >> solutions. > > > > Well, expecting design to be done for opensource development is a bit > > unusual :-). > > Why? We have done that quite often in the past. Media is complex and you need > to decide on a desi

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Hans Verkuil
On 03/19/2018 01:00 PM, Pavel Machek wrote: > Hi! > >>> Pavel, >>> >>> I appreciate your efforts of adding support for mc-based devices to >>> libv4l. > > Thanks. > >>> I guess the main poin that Hans is pointing is that we should take >>> extra care in order to avoid adding new symbols to libv4

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Pavel Machek
Hi! > > Pavel, > > > > I appreciate your efforts of adding support for mc-based devices to > > libv4l. Thanks. > > I guess the main poin that Hans is pointing is that we should take > > extra care in order to avoid adding new symbols to libv4l ABI/API > > without being sure that they'll be need

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Hans Verkuil
On 03/19/2018 11:47 AM, Mauro Carvalho Chehab wrote: > Em Mon, 19 Mar 2018 11:23:54 +0100 > Pavel Machek escreveu: > >> Hi! >> >>> I really don't want to add functions for this to libv4l2. That's just a >>> quick hack. The real solution is to parse this from a config >>> file. But >> >> No, thi

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Mauro Carvalho Chehab
Em Mon, 19 Mar 2018 11:23:54 +0100 Pavel Machek escreveu: > Hi! > > > I really don't want to add functions for this to libv4l2. That's just a > > quick hack. The real solution is to parse this from a config > > file. But > > No, this is not a quick hack. These are functions that will eventual

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Pavel Machek
Hi! > I really don't want to add functions for this to libv4l2. That's just a > quick hack. The real solution is to parse this from a config > file. But No, this is not a quick hack. These are functions that will eventually be used by the config parser. (Oh and they allow me to use camera on comp

Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-19 Thread Hans Verkuil
Hi Pavel, I really don't want to add functions for this to libv4l2. That's just a quick hack. The real solution is to parse this from a config file. But that is a lot more work and it is something that needs to be designed properly. And that requires someone to put in the time and effort... Rega

[RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline

2018-03-16 Thread Pavel Machek
Hi! What about something like this? Pass map of controls and expects fds to libv4l2... +static struct v4l2_controls_map map = { + .num_fds = 2, + .num_controls = 3, + .map = { [0] = { .control = 0x00980913, .fd = 1 }, + [1] = { .control = V4L2_CID_EXPOSURE_ABSOLUTE, .fd = 1 }, +