[FFmpeg-devel] [PATCH 5/8] lavd: add device capabilities API

Don Moir donmoir at comcast.net
Fri Apr 11 01:58:33 CEST 2014


----- Original Message ----- 
From: "Lukasz Marek" <lukasz.m.luki2 at gmail.com>
To: <ffmpeg-devel at ffmpeg.org>
Sent: Thursday, April 10, 2014 7:33 PM
Subject: Re: [FFmpeg-devel] [PATCH 5/8] lavd: add device capabilities API


> On 10.04.2014 23:57, Don Moir wrote:
>>
>> ----- Original Message ----- From: "Lukasz Marek"
>> <lukasz.m.luki2 at gmail.com>
>> To: <ffmpeg-devel at ffmpeg.org>
>> Sent: Thursday, April 10, 2014 4:34 PM
>> Subject: Re: [FFmpeg-devel] [PATCH 5/8] lavd: add device capabilities API
>>
>>
>>> On 10.04.2014 02:32, Don Moir wrote:
>>>> Did you mean: by how or by now :)
>>>>
>>>> +typedef struct AVDeviceCapabilitiesQuery {
>>>> +    const AVClass *class;
>>>> +    AVFormatContext *device_context;
>>>> +    enum AVCodecID codec;
>>>> +    enum AVSampleFormat sample_format;
>>>> +    enum AVPixelFormat pixel_format;
>>>> +    int sample_rate;
>>>> +    int channels;
>>>> +    int64_t channel_layout;
>>>> +    int window_width;
>>>> +    int window_height;
>>>> +    int frame_width;
>>>> +    int frame_height;
>>>> +    AVRational fps;
>>>> +} AVDeviceCapabilitiesQuery;
>>>>
>>>> For a capture device and for each pixel format, width, and height, there
>>>> can be a range of FPS values, like a min of a 1 FPS to max 60 FPS. Just
>>>> varies for each device and format. So don't see how that fits into the
>>>> AVDeviceCapabilitiesQuery structure as it stands.
>>>
>>> You query this structure, not use to store all possible values. Read
>>> an example and doc, it is described.
>>
>> Not following thread very close so forgive is this is out of place. Ok
>> you get device list and then what? Query every possible value? Maybe
>> somewhere else and not seeing it. How many queries would I have to do to
>> get all possible formats, widths, heights and frames rates that a device
>> might support? I don't know.
> 
> 4 queries. If they have dependencies than more, if you want to get all 
> possible _valid_ combinations, but it depends on device and probably 
> underlaying hardware to get exact number of queries.

This is the kind of list for a specific device I normally have access to. Varies for each device as to format,width,height, etc. The def fps shown here is set to max but that varies depending on device. Could be min fps 1, max fps 60, def fps 25

device Logitech HD Webcam C525
     format RGB   bitcount 24 width 640  height 480  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 160  height 120  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 176  height 144  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 320  height 176  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 320  height 240  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 432  height 240  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 352  height 288  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 544  height 288  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 640  height 360  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 752  height 416  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 800  height 448  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 864  height 480  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 960  height 544  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1024 height 576  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 800  height 600  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1184 height 656  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 960  height 720  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1280 height 720  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1392 height 768  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1504 height 832  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1600 height 896  min fps 5 max fps 30  def fps 30
     format RGB   bitcount 24 width 1280 height 960  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 640  height 480  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 160  height 120  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 176  height 144  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 320  height 176  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 320  height 240  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 432  height 240  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 352  height 288  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 544  height 288  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 640  height 360  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 752  height 416  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 800  height 448  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 864  height 480  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 960  height 544  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1024 height 576  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 800  height 600  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1184 height 656  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 960  height 720  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1280 height 720  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1392 height 768  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1504 height 832  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1600 height 896  min fps 5 max fps 30  def fps 30
     format I420  bitcount 12 width 1280 height 960  min fps 5 max fps 30  def fps 30


More information about the ffmpeg-devel mailing list