Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Plugins/Input/in_mkv/MKVDuration.h

20 lines
481 B
C
Raw Permalink Normal View History

2024-09-24 12:54:57 +00:00
#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;
};