summaryrefslogtreecommitdiffstats
path: root/stream/stream_libarchive.h
blob: 939d6fa65a6610eb90da560243e59a78e82d95b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <locale.h>

struct mp_log;

struct mp_archive {
    locale_t locale;
    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);

#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);