[FFmpeg-devel] [PATCH 2/4] lavd: add device capabilities API

Michael Niedermayer michaelni at gmx.at
Mon Feb 17 18:55:49 CET 2014


On Mon, Feb 17, 2014 at 06:45:58PM +0100, Michael Niedermayer wrote:
> On Mon, Feb 17, 2014 at 05:14:32PM +0100, Lukasz M wrote:
> > On 16 February 2014 18:45, Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > On Sun, Feb 16, 2014 at 01:28:03PM +0100, Lukasz Marek wrote:
> > > >
> > > > >>This version still has one open issue: how does it express a limited
> > > set of
> > > > >>frame sizes. For example, if a webcam supports exactly 640×480 and
> > > 320×240.
> > > > >>Does it return { 320, 640 } for the width and { 240, 480 } for the
> > > height?
> > > > >>Is the application supposed to try each width in turn and query the
> > > > >>corresponding range for height? It works, although it is a bit
> > > cumbersome,
> > > > >>but it is not intuitive: maybe add a comment, or do it like that in the
> > > > >>examples.
> > > > >
> > > > >maybe AV_OPT_TYPE_IMAGE_SIZE, should be used
> > > >
> > > > Can AV_OPT_TYPE_IMAGE_SIZE be represented in AVOptionRange?
> > > > I'm asking because I'm willing to change that, but not sure it is
> > > > doable without changing AVOptionRange struct.
> > >
> > > it was certainly intended to be representable
> > > see for example opt_list()
> > >
> > > and of course things can be done differently if needed
> > 
> > 
> > I did check it quickly and it seems image size is represented as string
> > ("640x480" for example)
> > I haven't found how range of image sizes should be represented.
> > 
> > If there is no format defined then I can propose something like that
> > "100x100-640x480"
> > or
> > "100-640x100-480"
> 
> typedef struct AVOptionRange {
>     const char *str;
>     double value_min, value_max;             ///< For string ranges this represents the min/max length, for dimensions this represents the min/max pixel count
>     double component_min, component_max;     ///< For string this represents the unicode range for chars, 0-127 limits to ASCII
> 
> so the current API would allow limiting the pixel count or both w,h
> against the same nummeric value. Thats possibly not flexible enough

the obvious fix for this would be to make component_min/max an array
of 2 or add a 2nd component_max/min


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140217/f9666e5d/attachment.asc>


More information about the ffmpeg-devel mailing list