summaryrefslogtreecommitdiff
path: root/libavformat/url.h
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-07-05 18:11:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-03-27 18:29:46 +0100
commit184084c6998cd04c0afdda076d7c95be0d6b2d22 (patch)
treeeabe49bf64eac0d759da7230e0d10541fbe34779 /libavformat/url.h
parentdbce8cdacf0c610a69cbf0d2959d793957dd4dfa (diff)
downloadffmpeg-184084c6998cd04c0afdda076d7c95be0d6b2d22.tar.gz
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 <michaelni@gmx.at>
Diffstat (limited to 'libavformat/url.h')
-rw-r--r--libavformat/url.h10
1 files changed, 10 insertions, 0 deletions
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 */