diff options
Diffstat (limited to 'Src/Plugins/Input/in_mkv/MKVDuration.h')
-rw-r--r-- | Src/Plugins/Input/in_mkv/MKVDuration.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Src/Plugins/Input/in_mkv/MKVDuration.h b/Src/Plugins/Input/in_mkv/MKVDuration.h new file mode 100644 index 00000000..eb2b21a4 --- /dev/null +++ b/Src/Plugins/Input/in_mkv/MKVDuration.h @@ -0,0 +1,20 @@ +#pragma once +#include "../nsmkv/header.h" +#include "../nsmkv/segmentinfo.h" +// parses only enough information to determine the file duration + +class MKVDuration +{ +public: + MKVDuration(); + bool Open(const wchar_t *filename); + int GetLengthMilliseconds(); + const char *GetTitle(); + int GetBitrate(); +private: + uint64_t ReadSegment(nsmkv::MKVReader *reader, uint64_t size); + bool segment_info_found; + nsmkv::Header header; + nsmkv::SegmentInfo segment_info; + uint64_t content_length; +};
\ No newline at end of file |