summaryrefslogtreecommitdiff
path: root/third_party/libwebm/mkvreader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebm/mkvreader.hpp')
-rw-r--r--third_party/libwebm/mkvreader.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/libwebm/mkvreader.hpp b/third_party/libwebm/mkvreader.hpp
index adcc29f47..8ebdd99a7 100644
--- a/third_party/libwebm/mkvreader.hpp
+++ b/third_party/libwebm/mkvreader.hpp
@@ -21,6 +21,7 @@ class MkvReader : public IMkvReader
MkvReader& operator=(const MkvReader&);
public:
MkvReader();
+ MkvReader(FILE* fp);
virtual ~MkvReader();
int Open(const char*);
@@ -29,8 +30,15 @@ public:
virtual int Read(long long position, long length, unsigned char* buffer);
virtual int Length(long long* total, long long* available);
private:
+
+ // Determines the size of the file. This is called either by the constructor
+ // or by the Open function depending on file ownership. Returns true on
+ // success.
+ bool GetFileSize();
+
long long m_length;
FILE* m_file;
+ bool reader_owns_file_;
};
} //end namespace mkvparser