MKVInfo.h 637 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "../nsmkv/header.h"
  3. #include "../nsmkv/segmentinfo.h"
  4. #include "../nsmkv/tracks.h"
  5. // parses only enough information to use in GetExtendedFileInfo
  6. class MKVInfo
  7. {
  8. public:
  9. MKVInfo();
  10. bool Open(const wchar_t *filename);
  11. int GetLengthMilliseconds();
  12. const char *GetTitle();
  13. int GetBitrate();
  14. bool GetHeight(int &height);
  15. bool GetWidth(int &width);
  16. const nsmkv::Tracks *GetTracks();
  17. private:
  18. uint64_t ReadSegment(nsmkv::MKVReader *reader, uint64_t size);
  19. bool segment_info_found;
  20. bool tracks_found;
  21. nsmkv::Header header;
  22. nsmkv::SegmentInfo segment_info;
  23. nsmkv::Tracks tracks;
  24. uint64_t content_length;
  25. };