libwebm: added BlockEntry::GetKind op

Change-Id: I7d7daac0d3b8be1b8839f96503250170f675e34d
This commit is contained in:
matthewjheaney 2011-04-03 12:20:19 -05:00
parent 31a9d5470e
commit a9c65fbbc0
2 changed files with 26 additions and 1 deletions

View File

@ -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;

View File

@ -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;
};