diff --git a/mkvparser.cpp b/mkvparser.cpp index 46bb372..c1df941 100644 --- a/mkvparser.cpp +++ b/mkvparser.cpp @@ -5145,11 +5145,18 @@ long Track::GetNext( } -Track::EOSBlock::EOSBlock() : BlockEntry(NULL, LONG_MIN) +Track::EOSBlock::EOSBlock() : + BlockEntry(NULL, LONG_MIN) { } +BlockEntry::Kind Track::EOSBlock::GetKind() const +{ + return kBlockEOS; +} + + const Block* Track::EOSBlock::GetBlock() const { return NULL; @@ -7802,6 +7809,12 @@ SimpleBlock::SimpleBlock( } +BlockEntry::Kind SimpleBlock::GetKind() const +{ + return kBlockSimple; +} + + const Block* SimpleBlock::GetBlock() const { return &m_block; @@ -7841,6 +7854,12 @@ void BlockGroup::ParseBlock(long long start, long long size) #endif +BlockEntry::Kind BlockGroup::GetKind() const +{ + return kBlockGroup; +} + + const Block* BlockGroup::GetBlock() const { return &m_block; diff --git a/mkvparser.hpp b/mkvparser.hpp index 4623cd9..b22ced9 100644 --- a/mkvparser.hpp +++ b/mkvparser.hpp @@ -121,6 +121,9 @@ public: long GetIndex() const; virtual const Block* GetBlock() const = 0; + enum Kind { kBlockEOS, kBlockSimple, kBlockGroup }; + virtual Kind GetKind() const = 0; + protected: Cluster* const m_pCluster; const long m_index; @@ -139,6 +142,7 @@ public: //bool EOS() const; //const Cluster* GetCluster() const; //long GetIndex() const; + Kind GetKind() const; const Block* GetBlock() const; protected: @@ -164,6 +168,7 @@ public: //bool EOS() const; //const Cluster* GetCluster() const; //long GetIndex() const; + Kind GetKind() const; const Block* GetBlock() const; short GetPrevTimeCode() const; //relative to block's time @@ -246,6 +251,7 @@ protected: //bool EOS() const; //const Cluster* GetCluster() const; //long GetIndex() const; + Kind GetKind() const; const Block* GetBlock() const; };