Home | History | Annotate | Download | only in libwebm

Lines Matching refs:Cluster

707     Cluster** i = m_clusters;

708 Cluster** j = m_clusters + count;
712 Cluster* const p = *i++;
910 if (id == 0x0F43B675) //Cluster ID
1075 long long cluster_size = -1; //size of cluster payload
1168 #if 0 //commented-out, to support incremental cluster parsing
1196 if (id != 0x0F43B675) //Cluster ID
1205 //We have a cluster.
1215 assert(cluster_off >= 0); //have cluster
1220 status = Cluster::HasBlockEntries(this, cluster_off, pos_, len_);
1235 //pos ptr past the most recent cluster parsed, and then
1236 //starts from there to parse the next cluster. If we
1237 //don't know the size of the current cluster, then we
1239 //for the cluster (or cues) ID to terminate the parse.
1241 //a way to create the curr cluster object immediately.
1242 //The pity is that cluster::parse can determine its own
1248 //As we're parsing the blocks in the curr cluster
1249 //(in cluster::parse), we should have some way to signal
1265 Cluster* const pCluster = m_clusters[idx];
1325 Cluster* const pCluster = Cluster::Create(this,
1349 return 0; //partial success, since we have a new cluster
1360 const long long payload_pos = pos; //absolute pos of cluster payload
1362 for (;;) //determine cluster size
1399 //that we have exhausted the sub-element's inside the cluster
1402 if (id == 0x0F43B675) //Cluster ID
1467 } //determine cluster size
1472 pos = payload_pos; //reset and re-parse original cluster
1479 Cluster* const pCluster = m_clusters[idx];
1493 return 2; //try to find another cluster
1515 //We have already consumed the (cluster) ID and size fields.
1517 //of this cluster, until we discover the boundary.
1532 for (;;) //determine cluster size
1579 //that we have exhausted the sub-element's inside the cluster
1582 if ((id == 0x0F43B675) || (id == 0x0C53BB6B)) //Cluster ID or Cues ID
1651 } //determine cluster size
1668 assert(status > 0); //nothing left to parse of this cluster
1685 void Segment::AppendCluster(Cluster* pCluster)
1702 Cluster** const qq = new Cluster*[n];
1703 Cluster** q = qq;
1705 Cluster** p = m_clusters;
1706 Cluster** const pp = p + count;
1721 Cluster** const p = m_clusters + m_clusterCount;
1725 Cluster** q = p + m_clusterPreloadCount;
1730 Cluster** const qq = q - 1;
1746 void Segment::PreloadCluster(Cluster* pCluster, ptrdiff_t idx)
1761 Cluster** const qq = new Cluster*[n];
1762 Cluster** q = qq;
1764 Cluster** p = m_clusters;
1765 Cluster** const pp = p + count;
1778 Cluster** const p = m_clusters + idx;
1780 Cluster** q = m_clusters + count;
1786 Cluster** const qq = q - 1;
2856 Cluster** const ii = m_clusters;
2857 Cluster** i = ii;
2861 Cluster** const jj = ii + count;
2862 Cluster** j = jj;
2871 Cluster** const k = i + (j - i) / 2;
2874 Cluster* const pCluster = *k;
2893 //assert(Cluster::HasBlockEntries(this, tp.m_pos));
2895 Cluster* const pCluster = Cluster::Create(this, -1, tp.m_pos); //, -1);
2909 const Cluster* Segment::FindOrPreloadCluster(long long requested_pos)
2914 Cluster** const ii = m_clusters;
2915 Cluster** i = ii;
2919 Cluster** const jj = ii + count;
2920 Cluster** j = jj;
2929 Cluster** const k = i + (j - i) / 2;
2932 Cluster* const pCluster = *k;
2951 //assert(Cluster::HasBlockEntries(this, tp.m_pos));
2953 Cluster* const pCluster = Cluster::Create(
3241 const Cluster* Segment::GetFirst() const
3246 Cluster* const pCluster = m_clusters[0];
3253 const Cluster* Segment::GetLast() const
3260 Cluster* const pCluster = m_clusters[idx];
3273 const Cluster* Segment::GetNext(const Cluster* pCurr)
3292 Cluster* const pNext = m_clusters[idx];
3319 assert(id == 0x0F43B675); //Cluster ID //TODO
3352 const long long idpos = pos; //pos of next (potential) cluster
3377 if (id == 0x0F43B675) //Cluster ID
3384 const long status = Cluster::HasBlockEntries(
3407 Cluster** const ii = m_clusters + m_clusterCount;
3408 Cluster** i = ii;
3410 Cluster** const jj = ii + m_clusterPreloadCount;
3411 Cluster** j = jj;
3420 Cluster** const k = i + (j - i) / 2;
3423 Cluster* const pNext = *k;
3443 Cluster* const pNext = Cluster::Create(this,
3461 const Cluster* pCurr,
3462 Cluster*& pResult,
3484 //curr cluster is last among loaded
3514 //interrogate curr cluster
3544 if (id != 0x0F43B675) //weird: not Cluster ID
3590 pos += size; //consume payload (that is, the current cluster)
3594 //cluster isn't interesting. That is, we don't bother checking
3595 //whether the payload of the curr cluster is less than what
3598 //cluster, and really does want the next cluster.
3601 //pos now points to just beyond the last fully-loaded cluster
3614 const Cluster*& pResult,
3629 //Parse next cluster. This is strictly a parsing activity.
3630 //Creation of a new cluster object happens later, after the
3749 if (id != 0x0F43B675) //not a Cluster ID
3760 #if 0 //this is commented-out to support incremental cluster parsing
3767 //We have a cluster.
3777 assert(off_next > 0); //have cluster
3779 //We have parsed the next cluster.
3780 //We have not created a cluster object yet. What we need
3782 //(in which case, an object for this cluster has already been
3783 //created), and if not, create a new cluster object.
3785 Cluster** const ii = m_clusters + m_clusterCount;
3786 Cluster** i = ii;
3788 Cluster** const jj = ii + m_clusterPreloadCount;
3789 Cluster** j = jj;
3798 Cluster** const k = i + (j - i) / 2;
3801 const Cluster* const pNext = *k;
3824 status = Cluster::HasBlockEntries(this, off_next, pos_, len_);
3836 Cluster* const pNext = Cluster::Create(this,
3857 const long long payload_pos = pos; //absolute pos of cluster payload
3859 for (;;) //determine cluster size
3896 //that we have exhausted the sub-element's inside the cluster
3899 if (id == 0x0F43B675) //Cluster ID
3951 } //determine cluster size
3956 pos = payload_pos; //reset and re-parse original cluster
3962 return 2; //try to find a cluster that follows next
3966 const Cluster* Segment::FindCluster(long long time_ns) const
3972 Cluster* const pCluster = m_clusters[0];
3980 //Binary search of cluster array
3995 Cluster* const pCluster = m_clusters[k];
4015 Cluster* const pCluster = m_clusters[k];
4034 Cluster** const i = m_clusters;
4038 Cluster* const pCluster = *i;
4047 Cluster** const j = i + m_clusterCount;
4054 //straight cluster search is good enough (we assume).
4056 Cluster** lo = i;
4057 Cluster** hi = j;
4066 Cluster** const mid = lo + (hi - lo) / 2;
4069 Cluster* const pCluster = *mid;
4090 Cluster* const pCluster = *--lo;
4099 //landed on empty cluster (no entries)
4107 Cluster** lo = i;
4108 Cluster** hi = j;
4117 Cluster** const mid = lo + (hi - lo) / 2;
4120 Cluster* const pCluster = *mid;
4137 Cluster* pCluster = *--lo;
4162 //weird: we're on the first cluster, but no keyframe found
4174 Cluster*& pCluster,
4193 //so we now need to search for the cluster having
4848 const Cluster* pCluster = m_pSegment->GetFirst();
4883 if (pBlockEntry == 0) //empty cluster
4939 const Cluster* pCluster = pCurrEntry->GetCluster();
4991 //caller to (pre)load another cluster, which he does, but then he
4996 //caller to be smarter when he loads another cluster: don't call
4997 //us back until you have a cluster that contains a block from this
4999 //would have to scan the each cluster as it's loaded, so that
5011 if (pNextEntry == NULL) //empty cluster
5269 const Cluster* pCluster = pResult->GetCluster();
5276 Cluster** const clusters = m_pSegment->m_clusters;
5282 Cluster** const i = clusters + pCluster->GetIndex();
5287 Cluster** const j = clusters + count;
5289 Cluster** lo = i;
5290 Cluster** hi = j;
5299 Cluster** const mid = lo + (hi - lo) / 2;
5338 //We need to handle the case when a cluster
5340 //the largest keyframe on the cluster isn't
5351 //weird: we're on the first cluster, but no keyframe found
5503 const Cluster* pCluster = pResult->GetCluster();
5510 Cluster** const clusters = m_pSegment->m_clusters;
5516 Cluster** const i = clusters + pCluster->GetIndex();
5521 Cluster** const j = clusters + count;
5523 Cluster** lo = i;
5524 Cluster** hi = j;
5533 Cluster** const mid = lo + (hi - lo) / 2;
5566 //landed on empty cluster (no entries)
6026 long long Cluster::Unparsed() const
6045 long Cluster::Load(long long& pos, long& len) const
6098 if (id_ != 0x0F43B675) //Cluster ID
6103 //read cluster size
6192 //that we have exhausted the sub-element's inside the cluster
6195 if (id == 0x0F43B675) //Cluster ID
6298 long Cluster::Parse(long long& pos, long& len) const
6373 //that we have exhausted the sub-element's inside the cluster
6376 if ((id == 0x0F43B675) || (id == 0x0C53BB6B)) //Cluster or Cues ID
6448 Cluster* const this_ = const_cast<Cluster*>(this);
6493 long Cluster::ParseSimpleBlock(
6548 //header, there are still blocks in the cluster with that track
6629 long Cluster::ParseBlockGroup(
6784 //header, there are still blocks in the cluster with that track
6871 long Cluster::GetEntry(long index, const mkvparser::BlockEntry*& pEntry) const
6895 if (m_element_size < 0) //we don't know cluster end yet
6907 Cluster* Cluster::Create(
6918 Cluster* const pCluster = new Cluster(pSegment,
6928 Cluster::Cluster() :
6942 Cluster::Cluster(
6960 Cluster::~Cluster()
6980 bool Cluster::EOS() const
6986 long Cluster::GetIndex() const
6992 long long Cluster::GetPosition() const
7001 long long Cluster::GetElementSize() const
7008 bool Cluster::HasBlockEntries(
7026 assert(id == 0x0F43B675); //Cluster ID
7071 long Cluster::HasBlockEntries(
7094 return 0; //we don't even have a complete cluster
7130 if (id != 0x0F43B675) //weird: not cluster ID
7133 pos += len; //consume Cluster ID field
7166 return 0; //cluster does not have entries
7184 return 0; //cluster does not have any entries
7219 //that we have exhausted the sub-element's inside the cluster
7222 if (id == 0x0F43B675) //Cluster ID
7273 return E_FILE_FORMAT_INVALID; //not supported inside cluster
7290 long long Cluster::GetTimeCode() const
7304 long long Cluster::GetTime() const
7323 long long Cluster::GetFirstTime() const
7332 if (pEntry == NULL) //empty cluster
7342 long long Cluster::GetLastTime() const
7351 if (pEntry == NULL) //empty cluster
7361 long Cluster::CreateBlock(
7413 long Cluster::CreateBlockGroup(
7529 long Cluster::CreateSimpleBlock(
7565 long Cluster::GetFirst(const BlockEntry*& pFirst) const
7580 if (m_entries_count <= 0) //empty cluster
7595 long Cluster::GetLast(const BlockEntry*& pLast) const
7631 long Cluster::GetNext(
7676 long Cluster::GetEntryCount() const
7682 const BlockEntry* Cluster::GetEntry(
7688 if (m_pSegment == NULL) //this is the special EOS cluster
7807 Cluster::GetEntry(
8012 const BlockEntry* Cluster::GetMaxKey(const VideoTrack* pTrack) const
8048 BlockEntry::BlockEntry(Cluster* p, long idx) :
8066 const Cluster* BlockEntry::GetCluster() const
8079 Cluster* pCluster,
8108 Cluster* pCluster,
8529 long long Block::GetTimeCode(const Cluster* pCluster) const
8544 long long Block::GetTime(const Cluster* pCluster) const