From: Theodore Kilgore <kilgota@banach.math.auburn.edu>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
Adam Baker <linux@baker-net.org.uk>,
workshop-2011@linuxtv.org,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [Workshop-2011] Media Subsystem Workshop 2011
Date: Tue, 9 Aug 2011 19:34:44 -0500 (CDT) [thread overview]
Message-ID: <alpine.LNX.2.00.1108091825160.23684@banach.math.auburn.edu> (raw)
In-Reply-To: <4E4198D2.8070104@redhat.com>
On Tue, 9 Aug 2011, Hans de Goede wrote:
> Hi,
>
> On 08/09/2011 07:10 PM, Theodore Kilgore wrote:
> >
> >
> > On Tue, 9 Aug 2011, Hans de Goede wrote:
>
> <snip>
>
> > No, but both Adam and I realized, approximately at the same time
> > yesterday afternoon, something which is rather important here. Gphoto is
> > not developed exclusively for Linux. Furthermore, it has a significant
> > user base both on Windows and on MacOS, not to mention BSD. It really
> > isn't nice to be screwing around too much with the way it works.
>
> Right, so my plan is not to rip out the existing camlibs from libgphoto2,
> but to instead add a new camlib which talks to /dev/video# nodes which
> support the new to be defined v4l2 API for this. This camlib will then
> take precedence over the old libusb based ones when running on a system
> which has a new enough kernel. On systems without the new enough kernel
> the matching portdriver won't find any ports, so the camlib will be
> effectively disabled.
And then, I assume you mean, the old camlib will still work.
On BSD the port driver for this new /dev/video#
> API and the camlib won't even get compiled.
>
> <snip>
>
> > > It is time to quit thinking in band-aides and solve this properly,
> > > 1 logical device means it gets 1 driver.
> > >
> > > This may be an approach which means some more work then others, but
> > > I believe in the end that doing it right is worth the effort.
> >
> > Clearly, we agree about "doing it right is worth the effort." The whole
> > discussion right now is about what is "right."
>
> I'm sorry but I don't get the feeling that the discussion currently is
> focusing on what is "right".
You are very impatient.
> To me too much attention is being spend
> on not throwing away the effort put in the current libgphoto2 camlibs,
> which I don't like for 2 reasons:
> 1) It distracts from doing what is right
> 2) It ignores the fact that a lot has been learned in doing those
> camlibs, really really a lot. and all that can be re-used in a kernel
> driver.
Note that your two items can contradict or cancel each other out if one is
not careful?
>
> Let me try to phrase it in a way I think you'll understand. If we
> agree on doing it right over all other things (such as the fact
> that doing it right may take a considerable effort). Then this
> could be an interesting assignment for some of the computer science
> students I used to be a lecturer for. This assignment could read
> something like "Given the existing situation and knowledge <
> describe all that here>, do a re-design for the driverstack
> for these dual mode cameras, assuming a completely fresh start".
>
> Now if I were to give this assignment to a group of students, and
> they would keep coming back with the "but re-doing the camlibs
> in kernelspace is such a large effort, and we already have
> them in userspace" argument against using one unified driver
> for these devices, I would give them an F, because they are
> clearly missing the "assuming a completely fresh start"
> part of the assignment.
Well, for one thing, Hans, we do not have here any instructor who is
giving us an assignment. And nobody is in the position to specify that the
assignment says "assuming a completely fresh start" -- unless Linus
happens to be reading this thread and chimes in. Otherwise, unless there
is a convincing demonstration that "assuming a completely fresh start" is
an absolute and unavoidable necessity, someone is probably going to
disagree.
>
> I'm sorry if this sounds a bit harsh,
Yes, I am sorry about that, too.
but this is the way how
> the current discussion feels to me. If we agree on aiming for
> "doing it right" then with that comes to me doing a software
> design from scratch, so without taking into account what is
> already there.
Here, a counter-argument is to point out, as I did in a mail earlier this
afternoon, that "without taking account what is already there" might
possibly let one overlook something important. And, no, I am not referring
to the userspace-kernelspace problem with this. I am referring to the fact
that simply to dump the entire contents of the camera "into cache" (and to
keep it there for quite a while) might not necessarily be a good idea and
it had been quite consciously rejected to do that in the design of
libgphoto2. Not because it is in userspace, but because to do that eats
up and ties up RAM of which one cannot assume there is a surplus.
Do not misunderstand, though. I am not even going so far as to say that
libgphoto2 made the right decision. It certainly has its drawbacks, in
that it places severe requirements on someone programming a driver for
a really stupid camera. But what I *am* saying is that the issue was
anticipated, the issue was faced, and a conscious decision was made. This
is the opposite of not anticipating, not facing an issue, and not making
any conscious decision.
Oh, another example of such lack of deep thought has produced the current
crisis, too. I am referring to the amazing decision of some user interface
designers that an app for downloading still photos has to be fired up
immediately, just as soon as the "still camera" is plugged in. I would
really hate to be a passenger in a sailboat piloted by one of those guys.
But, hey, nobody is perfect.
>
> There are of course limits to the from scratch part, in the
> end we want this to slot into the existing Linux practices
> for webcams and stillcams, which means:
> 1) offering a v4l2 /dev/video# node for streaming; and
> 2) access to the pictures stored on the camera through libgphoto
>
> Taking these 2 constrictions into account, and combining that
> with my firm believe that the solution to all the device sharing
> problems is handling both functions in a single driver, I end
> up with only 1 option:
>
> Have a kernel driver which provides both functions of the device,
> with the streaming exported as a standard v4l2 device, and the
> stillcam function exported with some to be defined API. Combined
> with a libgphoto2 portlib and camlib for this new API, so that
> existing libgphoto2 apps can still access the pictures as if
> nothing was changed.
Well, what I _do_ think is that we need to agree about precisely what is
supposed to work and what is not, in an operational sense. But we are
still fuzzy about that. For example, you seemed to assert this morning
that the webcam functionality needs to be able to preempt any running
stillcam app and to grab the camera. Why? Or did I misunderstand you?
Then after we (and everybody else with an interest in the matter) have
settled on precisely how the outcome is supposed to behave, we need to
take a couple of test cases. Probably the best would be to, get some
people to look at one driver and see if anything can be done to make that
driver work better, using either Plan A or Plan B, or, for that matter,
Plan C.
Theodore Kilgore
next prev parent reply other threads:[~2011-08-10 0:29 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 17:21 Media Subsystem Workshop 2011 Mauro Carvalho Chehab
2011-08-03 17:45 ` Mauro Carvalho Chehab
2011-08-08 6:22 ` Hans Verkuil
2011-08-08 13:25 ` Mauro Carvalho Chehab
2011-08-08 15:25 ` Hans Verkuil
2011-08-11 17:49 ` Rémi Denis-Courmont
2011-08-11 19:00 ` Mauro Carvalho Chehab
2011-08-03 19:53 ` Theodore Kilgore
2011-08-03 20:36 ` Mauro Carvalho Chehab
2011-08-03 23:20 ` Theodore Kilgore
2011-08-04 12:34 ` Mauro Carvalho Chehab
2011-08-04 18:37 ` Theodore Kilgore
2011-08-04 19:11 ` Mauro Carvalho Chehab
2011-08-04 21:16 ` Theodore Kilgore
2011-08-04 21:58 ` Mauro Carvalho Chehab
2011-08-04 22:57 ` Theodore Kilgore
2011-08-05 7:02 ` [Workshop-2011] " Hans de Goede
2011-08-05 17:13 ` Theodore Kilgore
2011-08-07 22:53 ` Adam Baker
2011-08-08 2:26 ` Theodore Kilgore
2011-08-08 13:45 ` Mauro Carvalho Chehab
2011-08-08 17:39 ` Theodore Kilgore
2011-08-08 18:39 ` Mauro Carvalho Chehab
2011-08-08 19:32 ` Theodore Kilgore
2011-08-08 20:07 ` Mauro Carvalho Chehab
2011-08-08 20:24 ` Adam Baker
2011-08-08 20:43 ` Theodore Kilgore
2011-08-09 7:30 ` Hans de Goede
2011-08-09 17:10 ` Theodore Kilgore
2011-08-09 20:30 ` Hans de Goede
2011-08-10 0:34 ` Theodore Kilgore [this message]
2011-08-10 7:02 ` Hans de Goede
2011-08-08 20:33 ` Adam Baker
2011-08-08 21:06 ` Theodore Kilgore
2011-08-09 7:37 ` Hans de Goede
2011-08-09 19:06 ` Theodore Kilgore
2011-08-08 2:56 ` Theodore Kilgore
2011-08-08 7:53 ` Hans de Goede
2011-08-04 11:39 ` Hans de Goede
2011-08-04 12:40 ` Mauro Carvalho Chehab
2011-08-04 16:40 ` Jean-Francois Moine
2011-08-04 19:02 ` Guennadi Liakhovetski
2011-08-04 20:33 ` Mauro Carvalho Chehab
2011-08-04 21:38 ` Adam Baker
2011-08-04 21:49 ` Mauro Carvalho Chehab
2011-08-04 22:30 ` Theodore Kilgore
2011-08-04 19:05 ` Theodore Kilgore
2011-08-04 20:35 ` Adam Baker
2011-08-04 21:55 ` Theodore Kilgore
2011-08-04 23:04 ` Adam Baker
2011-08-05 0:01 ` Theodore Kilgore
2011-08-07 22:30 ` Adam Baker
2011-08-07 23:19 ` Alan Stern
2011-08-08 0:30 ` Adam Baker
2011-08-08 14:38 ` Alan Stern
2011-08-08 3:33 ` Theodore Kilgore
2011-08-08 14:55 ` Alan Stern
2011-08-08 18:14 ` Theodore Kilgore
2011-08-08 19:22 ` Alan Stern
2011-08-08 19:58 ` Theodore Kilgore
2011-08-08 20:33 ` Alan Stern
2011-08-04 18:55 ` Theodore Kilgore
2011-08-11 10:16 ` Sakari Ailus
2011-08-11 11:03 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1108091825160.23684@banach.math.auburn.edu \
--to=kilgota@banach.math.auburn.edu \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=linux@baker-net.org.uk \
--cc=mchehab@redhat.com \
--cc=workshop-2011@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.