aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/archive/decoder_archive.h
blob: df88acf15127c04fe894edc6276e27b031340266 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef DECODERARCHIVE_H
#define DECODERARCHIVE_H

#include <QString>
#include <archive.h>
#include <qmmp/decoder.h>


class DecoderArchive : public Decoder
{
public:
    DecoderArchive(const QString &url);

    virtual ~DecoderArchive();

    bool initialize();
    qint64 totalTime() const;
    void seek(qint64 time);
    qint64 read(unsigned char *data, qint64 maxSize);
    int bitrate() const;

private:
    QString m_url;
    struct archive *m_archive;
    Decoder *m_decoder;
    QIODevice *m_input;

};

#endif // DECODERARCHIVE_H