public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl
Subject: Re: [v4l-utils PATCH v2 2/3] libv4l2subdev: Add a function to list library supported pixel codes
Date: Sun, 24 Jan 2016 22:27:29 +0200	[thread overview]
Message-ID: <2165577.6ioLVgiXqI@avalon> (raw)
In-Reply-To: <56A2306F.4070808@linux.intel.com>

Hi Sakari,

On Friday 22 January 2016 15:36:47 Sakari Ailus wrote:
> Laurent Pinchart wrote:
> > On Tuesday 08 December 2015 17:15:15 Sakari Ailus wrote:
> >> Also mark which format definitions are compat definitions for the
> >> pre-existing codes. This way we don't end up listing the same formats
> >> twice.
> > 
> > Wouldn't it be easier to add a function to return the whole array (and
> > terminate it with an empty entry to avoid having to return both the array
> > and the length=) ?
> 
> Now that I'm actually thinking about making that change, I have a few
> concerns:
> 
> - This is not in line with the other APIs in the library, they mirror
> the IOCTL behaviour (it's another debate whether this is a good idea or
> not).

A function to list the library's supported pixel codes wouldn't be either, so 
I don't really see that as a big issue. A bigger issue, that needs to be fixed 
to release a version of the library as a shared object, is that the API hasn't 
really been thought of properly.

> - I need a new statically allocated array for that. I think I'll change
> my sed script. Allocating an array when the function is called the first
> time isn't a great idea either, there's a problem with re-entrancy and
> it's a memory leak, too.

In a shared object we could make use the _init and _fini functions. Is there 
something similar available for static libraries ? A different sed script 
should be fine too.

> So don't complain about these when I send an updated version. ;-)

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2016-01-25  6:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 15:15 [v4l-utils PATCH v2 0/3] List supported formats in libv4l2subdev Sakari Ailus
2015-12-08 15:15 ` [v4l-utils PATCH v2 1/3] libv4l2subdev: Use generated format definitions " Sakari Ailus
2015-12-13 21:36   ` Laurent Pinchart
2015-12-08 15:15 ` [v4l-utils PATCH v2 2/3] libv4l2subdev: Add a function to list library supported pixel codes Sakari Ailus
2015-12-13 21:39   ` Laurent Pinchart
2016-01-22 12:23     ` Sakari Ailus
2016-01-22 13:36     ` Sakari Ailus
2016-01-24 20:27       ` Laurent Pinchart [this message]
2015-12-08 15:15 ` [v4l-utils PATCH v2 3/3] media-ctl: List supported media bus formats Sakari Ailus
2016-01-22 12:15 ` [v4l-utils PATCH v2 0/3] List supported formats in libv4l2subdev Hans Verkuil
2016-01-22 12:26   ` Sakari Ailus

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=2165577.6ioLVgiXqI@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.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