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

Lukasz Marek lukasz.m.luki at gmail.com
Thu Feb 6 17:40:52 CET 2014


>> Solution you suggest is the same I proposed before and was rejected.
>> So I give up any further work on it until you figure out what should
>> it look like.
>
> Maybe a solution is to do both ?
> have a very simple flat structure that lists limitations but
> would not be able to repesent complex real hw so for example
> like these:  http://gopro.com/product-comparison-hero3-cameras
>
> so it would then possibly list 30fps and 1080p as maximum
> while the AVOption interface would list that it also can do
> 4K at 15fps and 960p at 100fps ans wvga at 240fps


maybe somehting like that:

struct FlatConfigutation
{
     ....
//will return lists of parameter ranges that are always valid.
}

typedef struct AVDeviceInfo {
     char *device_name;
     char *device_description;
     struct *FlastConfiguration;
} AVDeviceInfo;

typedef struct AVDeviceInfoList {
     AVDeviceInfo *devices;
     int nb_devices;
     int default_device;
} AVDeviceInfoList;

int avdevice_list_devices(
	AVFormatContext *s,
	AVDeviceInfoList **device_list
	int *have_complex_configuration)

have_complex_configuration would inform user that returned flat 
configuration doesnt cover all posibilities.

In cases where have_complex_configuration is not set, AVOption API could 
be not implemented.

I just wonder if it is worth the effort. Making few calls with AVOption 
API is not really complex. Solid app should always consider the case 
when have_complex_configuration is set and the AVOption code should be 
added anyway.

-- 
Best Regards,
Lukasz Marek

If you can't explain it simply, you don't understand it well enough. - 
Albert Einstein


More information about the ffmpeg-devel mailing list