[FFmpeg-devel] [PATCH 4/4] lavf/libsmbclient: implement directory listing callbacks
Mariusz Szczepańczyk
mszczepanczyk at gmail.com
Fri Mar 27 16:52:17 CET 2015
On Fri, Mar 27, 2015 at 4:33 PM, Lukasz Marek <lukasz.m.luki2 at gmail.com>
wrote:
> On 26.03.2015 01:25, Mariusz Szczepańczyk wrote:
>
>> ---
>> libavformat/libsmbclient.c | 93 ++++++++++++++++++++++++++++++
>> ++++++++++++++++
>> 1 file changed, 93 insertions(+)
>>
>
> [...]
>
> + switch (dirent->smbc_type) {
>> + case SMBC_DIR:
>> + entry->type = AVIO_ENTRY_DIRECTORY;
>> + break;
>> + case SMBC_FILE:
>> + entry->type = AVIO_ENTRY_FILE;
>> + break;
>> + default:
>> + /* TODO: Find out what other types stand for and their correct
>> + * mappings. Probably some of them should be skipped. */
>> + entry->type = AVIO_ENTRY_UNKNOWN;
>> + break;
>> + }
>>
>
> Before it is merged it should handle:
> SMBC_WORKGROUP, SMBC_SERVER, SMBC_FILE_SHARE
>
> This implicates that AVIODirEntryType has to be extended and
> doc/examples/avio_list_dir.c from second patch as well,
>
> It im not sure how to handle
> SMBC_PRINTER_SHARE, SMBC_COMMS_SHARE, SMBC_IPC_SHARE
> It can be set as unknown, it can be not listed at all, or also specific
> enums can be added. Printers are not relevant to ffmpeg at all.
>
> Patch itself is ok, but it is not complete.
>
Yes, you're completely right. Unfortunately these types are not greatly
documented by libsmbclient and I had a hard time making my samba server
serve some of them for testing so for now I left it as is. I'll fix it
within a next few days.
Regards,
Mariusz
More information about the ffmpeg-devel
mailing list