From: Hans de Goede <hdegoede@redhat.com>
To: Yordan Kamenov <ykamenov@mm-sol.com>
Cc: linux-media@vger.kernel.org, sakari.ailus@maxwell.research.nokia.com
Subject: Re: [PATCH 1/1 v3] libv4l: Add plugin support to libv4l
Date: Fri, 29 Apr 2011 14:08:58 +0200 [thread overview]
Message-ID: <4DBAAA5A.2050803@redhat.com> (raw)
In-Reply-To: <4DBA7D13.2080805@mm-sol.com>
Hi,
On 04/29/2011 10:55 AM, Yordan Kamenov wrote:
> Hans de Goede wrote:
>> Hi,
>>
> Hi Hans,
>
> Thanks for your comments.
>> First of all my apologies for taking so long to get around to
>> reviewing this.
>>
>> Over all it looks good, I've put some small remarks inline, if
>> you fix these I can merge this. I wonder though, given the recent
>> limbo around Nokia's change of focus, if there are any plans to
>> actually move forward with a plugin using this... ?
>>
>> The reason I'm asking is that adding the plugin framework if nothing
>> is going to use it seems a bit senseless.
> We are working on a "media controller" plugin which allows
> a traditional v4l2 application to work with Media Controller
> framework. The idea is when the application opens /dev/video0, then
> the plugin initializes media controller and creates appropriate pipeline,
> after that the plugin redirects all ioctl's from the application to this
> pipeline and on close call the pipeline is deinitialized.
Cool.
>>
>> Regards,
>>
>> Hans
>>
>>
>> On 02/14/2011 12:02 PM, Yordan Kamenov wrote:
> [snip]
>>
>>> diff --git a/lib/libv4l2/v4l2convert.c b/lib/libv4l2/v4l2convert.c
>>> index e251085..03f34ad 100644
>>> --- a/lib/libv4l2/v4l2convert.c
>>> +++ b/lib/libv4l2/v4l2convert.c
>>> @@ -46,7 +46,6 @@
>>> LIBV4L_PUBLIC int open(const char *file, int oflag, ...)
>>> {
>>> int fd;
>>> - struct v4l2_capability cap;
>>> int v4l_device = 0;
>>>
>>> /* check if we're opening a video4linux2 device */
>>> @@ -76,14 +75,6 @@ LIBV4L_PUBLIC int open(const char *file, int oflag, ...)
>>> if (fd == -1 || !v4l_device)
>>> return fd;
>>>
>>> - /* check that this is an v4l2 device, libv4l2 only supports v4l2 devices */
>>> - if (SYS_IOCTL(fd, VIDIOC_QUERYCAP,&cap))
>>> - return fd;
>>> -
>>> - /* libv4l2 only adds functionality to capture capable devices */
>>> - if (!(cap.capabilities& V4L2_CAP_VIDEO_CAPTURE))
>>> - return fd;
>>> -
>>> /* Try to Register with libv4l2 (in case of failure pass the fd to the
>>> application as is) */
>>> v4l2_fd_open(fd, 0);
>>
>> Hmm, why are you removing this check ?
>>
> In case of above example of media controller plugin when the application opens
> /dev/video0, then this plugin should be used. But in media controller framework
> /dev/video0 file might correspond to a subdevice which is not a capture device and
> this fd will not be registered in libv4l2 at all.
>
Ok, on second thought this is fine, you can leave it in :)
Regards,
Hans
next prev parent reply other threads:[~2011-04-29 12:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 11:02 [PATCH 0/1 v3] libv4l: Add plugin support Yordan Kamenov
2011-02-14 11:02 ` [PATCH 1/1 v3] libv4l: Add plugin support to libv4l Yordan Kamenov
2011-04-28 12:46 ` Hans de Goede
2011-04-28 14:18 ` Sakari Ailus
2011-04-28 14:30 ` Hans Verkuil
2011-04-29 8:55 ` Yordan Kamenov
2011-04-29 12:08 ` Hans de Goede [this message]
2011-03-10 13:46 ` [PATCH 0/1 v3] libv4l: Add plugin support Yordan Kamenov
2011-03-10 19:35 ` Hans de Goede
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=4DBAAA5A.2050803@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@maxwell.research.nokia.com \
--cc=ykamenov@mm-sol.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox