summaryrefslogtreecommitdiffstats
path: root/stream/stream_libarchive.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-18 12:44:56 +0200
committerwm4 <wm4@nowhere>2016-07-18 12:44:56 +0200
commitfb8deb69a6afc311deb2c3f9bfa13e460e03256f (patch)
treeca2a9f62c9c1b551c1a874494252641378dcda8a /stream/stream_libarchive.h
parent77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9 (diff)
downloadmpv-fb8deb69a6afc311deb2c3f9bfa13e460e03256f.tar.bz2
mpv-fb8deb69a6afc311deb2c3f9bfa13e460e03256f.tar.xz
libarchive: unify entry iteration between stream/demux layers
No really good reason to duplicate this.
Diffstat (limited to 'stream/stream_libarchive.h')
-rw-r--r--stream/stream_libarchive.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/stream/stream_libarchive.h b/stream/stream_libarchive.h
index ebded5b5ba..c15dc1b528 100644
--- a/stream/stream_libarchive.h
+++ b/stream/stream_libarchive.h
@@ -1,9 +1,15 @@
struct mp_log;
struct mp_archive {
+ struct mp_log *log;
struct archive *arch;
struct stream *primary_src;
char buffer[4096];
+
+ // Current entry, as set by mp_archive_next_entry().
+ struct archive_entry *entry;
+ char *entry_filename;
+ int entry_num;
};
void mp_archive_free(struct mp_archive *mpa);
@@ -11,3 +17,5 @@ void mp_archive_free(struct mp_archive *mpa);
#define MP_ARCHIVE_FLAG_UNSAFE 1
struct mp_archive *mp_archive_new(struct mp_log *log, struct stream *src,
int flags);
+
+bool mp_archive_next_entry(struct mp_archive *mpa);