[FFmpeg-devel] [PATCH 1/7] [GSoC] lavf: add directory listing API

Lukasz Marek lukasz.m.luki2 at gmail.com
Fri Mar 20 22:31:56 CET 2015


On 20.03.2015 14:55, Michael Niedermayer wrote:
> On Fri, Mar 20, 2015 at 03:01:56AM +0100, Mariusz Szczepańczyk wrote:
>> From: Lukasz Marek <lukasz.m.luki2 at gmail.com>
>>   /**
>> + * Open directory for reading.
>> + *
>> + * @param s       directory read context. Pointer to a NULL pointer must be passed.
>> + * @param url     directory to be listed.
>> + * @param options protocol options.
>> + * @return >=0 on success or negative on error.
>> + */
>> +int avio_open_dir(void **s, const char *url, AVDictionary **options);
>
> why void ** ? and not a more specific type ?
> a more specific type would allow the compiler to check types

I can't remember exactly why, but as far as I remember
it could be URLContext, but it is not a public struct.
Also, creating dummy struct, to have it stored as void * inside is not 
much better, but maybe it is. (the same as AVIOContext stores it in void 
*opaque)



More information about the ffmpeg-devel mailing list