MKVDuration.h 481 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "../nsmkv/header.h"
  3. #include "../nsmkv/segmentinfo.h"
  4. // parses only enough information to determine the file duration
  5. class MKVDuration
  6. {
  7. public:
  8. MKVDuration();
  9. bool Open(const wchar_t *filename);
  10. int GetLengthMilliseconds();
  11. const char *GetTitle();
  12. int GetBitrate();
  13. private:
  14. uint64_t ReadSegment(nsmkv::MKVReader *reader, uint64_t size);
  15. bool segment_info_found;
  16. nsmkv::Header header;
  17. nsmkv::SegmentInfo segment_info;
  18. uint64_t content_length;
  19. };