summaryrefslogtreecommitdiff
path: root/libavformat/url.c
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.c
parentdbce8cdacf0c610a69cbf0d2959d793957dd4dfa (diff)
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.c')
-rw-r--r--libavformat/url.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/url.c b/libavformat/url.c
index acfb0cf2f0..3a2c78bc52 100644
--- a/libavformat/url.c
+++ b/libavformat/url.c
@@ -145,3 +145,19 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
}
av_strlcat(buf, rel, size);
}
+
+AVIODirEntry *ff_alloc_dir_entry(void)
+{
+ AVIODirEntry *entry = av_mallocz(sizeof(AVIODirEntry));
+ if (entry) {
+ entry->type = AVIO_ENTRY_UNKNOWN;
+ entry->size = -1;
+ entry->modification_timestamp = -1;
+ entry->access_timestamp = -1;
+ entry->status_change_timestamp = -1;
+ entry->user_id = -1;
+ entry->group_id = -1;
+ entry->filemode = -1;
+ }
+ return entry;
+}