diff options
author | wm4 <wm4@nowhere> | 2016-07-18 12:44:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-18 12:44:56 +0200 |
commit | fb8deb69a6afc311deb2c3f9bfa13e460e03256f (patch) | |
tree | ca2a9f62c9c1b551c1a874494252641378dcda8a /stream/stream_libarchive.h | |
parent | 77e1e8e38e7b8d9318dc1bb437a88d8f13b7a5c9 (diff) | |
download | mpv-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.h | 8 |
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); |