From 184084c6998cd04c0afdda076d7c95be0d6b2d22 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Sat, 5 Jul 2014 18:11:59 +0200 Subject: lavf: add directory listing API API allows protocol implementations to provide API that allows to list directory content. API is similar to POSIX opendir/readdir/closedir. Signed-off-by: Michael Niedermayer --- libavformat/url.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libavformat/url.h') diff --git a/libavformat/url.h b/libavformat/url.h index d0035f3617..1a845b77e7 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -87,6 +87,9 @@ typedef struct URLProtocol { const AVClass *priv_data_class; int flags; int (*url_check)(URLContext *h, int mask); + int (*url_open_dir)(URLContext *h); + int (*url_read_dir)(URLContext *h, AVIODirEntry **next); + int (*url_close_dir)(URLContext *h); } URLProtocol; /** @@ -280,5 +283,12 @@ int ff_url_join(char *str, int size, const char *proto, void ff_make_absolute_url(char *buf, int size, const char *base, const char *rel); +/** + * Allocate directory entry with default values. + * + * @return entry or NULL on error + */ +AVIODirEntry *ff_alloc_dir_entry(void); + #endif /* AVFORMAT_URL_H */ -- cgit v1.2.3