#ifndef MKVPARSER_MKVREADER_H_
#define MKVPARSER_MKVREADER_H_
#include <cstdio>
#include "mkvparser/mkvparser.h"
namespace mkvparser {
class MkvReader : public IMkvReader {
public:
MkvReader();
explicit MkvReader(FILE* fp);
virtual ~MkvReader();
int Open(const char*);
void Close();
virtual int Read(long long position, long length, unsigned char* buffer);
virtual int Length(long long* total, long long* available);
private:
MkvReader(const MkvReader&);
MkvReader& operator=(const MkvReader&);
bool GetFileSize();
long long m_length;
FILE* m_file;
bool reader_owns_file_;
};
}
#endif