From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from bombadil.infradead.org ([198.137.202.133]:58754 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752243AbeFFRN2 (ORCPT ); Wed, 6 Jun 2018 13:13:28 -0400 Date: Wed, 6 Jun 2018 14:13:19 -0300 From: Mauro Carvalho Chehab To: Pavel Machek Cc: Tomasz Figa , mchehab@s-opensource.com, Hans Verkuil , pali.rohar@gmail.com, sre@kernel.org, Sakari Ailus , Linux Media Mailing List , Hans Verkuil Subject: Re: [RFC, libv4l]: Make libv4l2 usable on devices with complex pipeline Message-ID: <20180606141312.3c2913e2@coco.lan> In-Reply-To: <20180606105116.GA4328@amd> References: <20180319120043.GA20451@amd> <20180319095544.7e235a3e@vento.lan> <20180515200117.GA21673@amd> <20180515190314.2909e3be@vento.lan> <20180602210145.GB20439@amd> <20180606084612.GB18743@amd> <20180606105116.GA4328@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: 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'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, Xawtv, Firefox, Chromium, ...) and closed > > source ones (Skype, Chrome, ...)" > > 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't think Mauro says apps like Camorama are of open() kind. All open source apps we care use v4l2_open() & friends. the ones that use just open() work via LD_PRELOAD. It is a hack, but it was needed when libv4l was added (as there were lots of apps to be touched). Also, we had problems on that time with closed source app developers. I guess nowadays, among v4l-specific apps, only closed source ones use just open(). Haven't check how browsers open cameras, though. A quick look at the Fedora 60 dependencies, though, doesn't show libv4l: https://rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/f/firefox-60.0.1-5.fc29.x86_64.html It might be statically linking libv4l, or maybe they rely on something else (like java/flash/...), but I guess it is more likely that they're just using open() somehow. The same kind of issue may also be present on other browsers and on java libraries. Thanks, Mauro