libwebm: restored Cluster::GetLast
Change-Id: I73564fb508e23004392b5aaab1f1ad7cdedc8bb1
This commit is contained in:
@@ -7399,7 +7399,6 @@ long long Cluster::GetFirstTime() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
long long Cluster::GetLastTime() const
|
long long Cluster::GetLastTime() const
|
||||||
{
|
{
|
||||||
const BlockEntry* const pEntry = GetLast();
|
const BlockEntry* const pEntry = GetLast();
|
||||||
@@ -7412,7 +7411,6 @@ long long Cluster::GetLastTime() const
|
|||||||
|
|
||||||
return pBlock->GetTime(this);
|
return pBlock->GetTime(this);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void Cluster::CreateBlock(
|
void Cluster::CreateBlock(
|
||||||
@@ -7545,13 +7543,31 @@ const BlockEntry* Cluster::GetFirst() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
const BlockEntry* Cluster::GetLast() const
|
const BlockEntry* Cluster::GetLast() const
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
LoadBlockEntries();
|
LoadBlockEntries();
|
||||||
|
|
||||||
if ((m_entries == NULL) || (m_entries_count <= 0))
|
if ((m_entries == NULL) || (m_entries_count <= 0))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#else
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
long long pos;
|
||||||
|
long len;
|
||||||
|
|
||||||
|
const long status = Parse(pos, len);
|
||||||
|
assert(status >= 0);
|
||||||
|
|
||||||
|
if (status != 0) //no new block
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_entries_count <= 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
assert(m_entries);
|
||||||
|
#endif
|
||||||
|
|
||||||
const long idx = m_entries_count - 1;
|
const long idx = m_entries_count - 1;
|
||||||
|
|
||||||
@@ -7560,7 +7576,6 @@ const BlockEntry* Cluster::GetLast() const
|
|||||||
|
|
||||||
return pLast;
|
return pLast;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
const BlockEntry* Cluster::GetNext(const BlockEntry* pEntry) const
|
const BlockEntry* Cluster::GetNext(const BlockEntry* pEntry) const
|
||||||
|
|||||||
@@ -560,10 +560,10 @@ public:
|
|||||||
long long GetTimeCode() const; //absolute, but not scaled
|
long long GetTimeCode() const; //absolute, but not scaled
|
||||||
long long GetTime() const; //absolute, and scaled (nanosecond units)
|
long long GetTime() const; //absolute, and scaled (nanosecond units)
|
||||||
long long GetFirstTime() const; //time (ns) of first (earliest) block
|
long long GetFirstTime() const; //time (ns) of first (earliest) block
|
||||||
//long long GetLastTime() const; //time (ns) of last (latest) block
|
long long GetLastTime() const; //time (ns) of last (latest) block
|
||||||
|
|
||||||
const BlockEntry* GetFirst() const;
|
const BlockEntry* GetFirst() const;
|
||||||
//const BlockEntry* GetLast() const;
|
const BlockEntry* GetLast() const;
|
||||||
const BlockEntry* GetNext(const BlockEntry*) const;
|
const BlockEntry* GetNext(const BlockEntry*) const;
|
||||||
const BlockEntry* GetEntry(const Track*, long long ns = -1) const;
|
const BlockEntry* GetEntry(const Track*, long long ns = -1) const;
|
||||||
const BlockEntry* GetEntry(
|
const BlockEntry* GetEntry(
|
||||||
|
|||||||
Reference in New Issue
Block a user