Home | History | Annotate | Download | only in mkvparser

Lines Matching defs:Cluster

683   Cluster** i = m_clusters;
684 Cluster** j = m_clusters + count;
687 Cluster* const p = *i++;
1050 long long cluster_size = -1; // size of cluster payload
1152 // Besides the Segment, Libwebm allows only cluster elements of unknown
1153 // size. Fail the parse upon encountering a non-cluster element reporting
1162 // We have a cluster.
1173 // No cluster, die.
1180 status = Cluster::HasBlockEntries(this, cluster_off, pos_, len_);
1194 // pos ptr past the most recent cluster parsed, and then
1195 // starts from there to parse the next cluster. If we
1196 // don't know the size of the current cluster, then we
1198 // for the cluster (or cues) ID to terminate the parse.
1200 // a way to create the curr cluster object immediately.
1201 // The pity is that cluster::parse can determine its own
1207 // As we're parsing the blocks in the curr cluster
1208 //(in cluster::parse), we should have some way to signal
1224 Cluster* const pCluster = m_clusters[idx];
1279 Cluster* const pCluster = Cluster::Create(this, idx, cluster_off);
1302 return 0; // partial success, since we have a new cluster
1335 bool Segment::AppendCluster(Cluster* pCluster) {
1350 Cluster** const qq = new (std::nothrow) Cluster*[n];
1354 Cluster** q = qq;
1355 Cluster** p = m_clusters;
1356 Cluster** const pp = p + count;
1368 Cluster** const p = m_clusters + m_clusterCount;
1372 Cluster** q = p + m_clusterPreloadCount;
1377 Cluster** const qq = q - 1;
1394 bool Segment::PreloadCluster(Cluster* pCluster, ptrdiff_t idx) {
1407 Cluster** const qq = new (std::nothrow) Cluster*[n];
1410 Cluster** q = qq;
1412 Cluster** p = m_clusters;
1413 Cluster** const pp = p + count;
1427 Cluster** const p = m_clusters + idx;
1429 Cluster** q = m_clusters + count;
1434 Cluster** const qq = q - 1;
2143 Cluster** const ii = m_clusters;
2144 Cluster** i = ii;
2148 Cluster** const jj = ii + count;
2149 Cluster** j = jj;
2157 Cluster** const k = i + (j - i) / 2;
2160 Cluster* const pCluster = *k;
2179 // assert(Cluster::HasBlockEntries(this, tp.m_pos));
2181 Cluster* const pCluster = Cluster::Create(this, -1, tp.m_pos); //, -1);
2198 const Cluster* Segment::FindOrPreloadCluster(long long requested_pos) {
2202 Cluster** const ii = m_clusters;
2203 Cluster** i = ii;
2207 Cluster** const jj = ii + count;
2208 Cluster** j = jj;
2216 Cluster** const k = i + (j - i) / 2;
2219 Cluster* const pCluster = *k;
2238 // assert(Cluster::HasBlockEntries(this, tp.m_pos));
2240 Cluster* const pCluster = Cluster::Create(this, -1, requested_pos);
2491 const Cluster* Segment::GetFirst() const {
2495 Cluster* const pCluster = m_clusters[0];
2501 const Cluster* Segment::GetLast() const {
2507 Cluster* const pCluster = m_clusters[idx];
2515 const Cluster* Segment::GetNext(const Cluster* pCurr) {
2532 Cluster* const pNext = m_clusters[idx];
2590 const long long idpos = pos; // pos of next (potential) cluster
2620 const long status = Cluster::HasBlockEntries(this, off_next_, pos_, len_);
2636 Cluster** const ii = m_clusters + m_clusterCount;
2637 Cluster** i = ii;
2639 Cluster** const jj = ii + m_clusterPreloadCount;
2640 Cluster** j = jj;
2648 Cluster** const k = i + (j - i) / 2;
2651 Cluster* const pNext = *k;
2671 Cluster* const pNext = Cluster::Create(this, -1, off_next);
2688 long Segment::ParseNext(const Cluster* pCurr, const Cluster*& pResult,
2706 // curr cluster is last among loaded
2736 // interrogate curr cluster
2809 pos += size; // consume payload (that is, the current cluster)
2814 // cluster isn't interesting. That is, we don't bother checking
2815 // whether the payload of the curr cluster is less than what
2818 // cluster, and really does want the next cluster.
2821 // pos now points to just beyond the last fully-loaded cluster
2831 long Segment::DoParseNext(const Cluster*& pResult, long long& pos, long& len) {
2843 // Parse next cluster. This is strictly a parsing activity.
2844 // Creation of a new cluster object happens later, after the
2955 if (id != libwebm::kMkvCluster) { // not a Cluster ID
2966 // We have a cluster.
2975 assert(off_next > 0); // have cluster
2977 // We have parsed the next cluster.
2978 // We have not created a cluster object yet. What we need
2980 //(in which case, an object for this cluster has already been
2981 // created), and if not, create a new cluster object.
2983 Cluster** const ii = m_clusters + m_clusterCount;
2984 Cluster** i = ii;
2986 Cluster** const jj = ii + m_clusterPreloadCount;
2987 Cluster** j = jj;
2995 Cluster** const k = i + (j - i) / 2;
2998 const Cluster* const pNext = *k;
3020 status = Cluster::HasBlockEntries(this, off_next, pos_, len_);
3030 Cluster* const pNext = Cluster::Create(this,
3053 const long long payload_pos = pos; // absolute pos of cluster payload
3055 for (;;) { // determine cluster size
3090 // that we have exhausted the sub-element's inside the cluster
3142 } // determine cluster size
3147 pos = payload_pos; // reset and re-parse original cluster
3154 return 2; // try to find a cluster that follows next
3157 const Cluster* Segment::FindCluster(long long time_ns) const {
3162 Cluster* const pCluster = m_clusters[0];
3170 // Binary search of cluster array
3184 Cluster* const pCluster = m_clusters[k];
3204 Cluster* const pCluster = m_clusters[k];
4639 const Cluster* pCluster = m_pSegment->GetFirst();
4662 if (pBlockEntry == 0) { // empty cluster
4715 const Cluster* pCluster = pCurrEntry->GetCluster();
4754 // caller to (pre)load another cluster, which he does, but then he
4759 // caller to be smarter when he loads another cluster: don't call
4760 // us back until you have a cluster that contains a block from this
4762 // would have to scan the each cluster as it's loaded, so that
4774 if (pNextEntry == NULL) // empty cluster
4819 const Cluster* pCluster = pResult->GetCluster();
4826 Cluster** const clusters = m_pSegment->m_clusters;
4832 Cluster** const i = clusters + pCluster->GetIndex();
4837 Cluster** const j = clusters + count;
4839 Cluster** lo = i;
4840 Cluster** hi = j;
4848 Cluster** const mid = lo + (hi - lo) / 2;
4880 // landed on empty cluster (no entries)
5328 const Cluster* pCluster = pResult->GetCluster();
5335 Cluster** const clusters = m_pSegment->m_clusters;
5341 Cluster** const i = clusters + pCluster->GetIndex();
5346 Cluster** const j = clusters + count;
5348 Cluster** lo = i;
5349 Cluster** hi = j;
5357 Cluster** const mid = lo + (hi - lo) / 2;
5399 // weird: we're on the first cluster, but no keyframe found
5908 long Cluster::Load(long long& pos, long& len) const {
5958 // read cluster size
6032 // that we have exhausted the sub-element's inside the cluster
6133 long Cluster::Parse(long long& pos, long& len) const {
6200 // that we have exhausted the sub-element's inside the cluster
6274 Cluster* const this_ = const_cast<Cluster*>(this);
6323 long Cluster::ParseSimpleBlock(long long block_size, long long& pos,
6421 long Cluster::ParseBlockGroup(long long payload_size, long long& pos,
6630 long Cluster::GetEntry(long index, const mkvparser::BlockEntry*& pEntry) const {
6652 if (m_element_size < 0) // we don't know cluster end yet
6663 Cluster* Cluster::Create(Segment* pSegment, long idx, long long off) {
6669 Cluster* const pCluster =
6670 new (std::nothrow) Cluster(pSegment, idx, element_start);
6675 Cluster::Cluster()
6687 Cluster::Cluster(Segment* pSegment, long idx, long long element_start
6700 Cluster::~Cluster() {
6717 bool Cluster::EOS() const { return (m_pSegment == NULL); }
6719 long Cluster::GetIndex() const { return m_index; }
6721 long long Cluster::GetPosition() const {
6728 long long Cluster::GetElementSize() const { return m_element_size; }
6730 long Cluster::HasBlockEntries(
6751 return 0; // we don't even have a complete cluster
6789 pos += len; // consume Cluster ID field
6821 return 0; // cluster does not have entries
6838 return 0; // cluster does not have any entries
6871 // that we have exhausted the sub-element's inside the cluster
6924 return E_FILE_FORMAT_INVALID; // not supported inside cluster
6941 long long Cluster::GetTimeCode() const {
6953 long long Cluster::GetTime() const {
6970 long long Cluster::GetFirstTime() const {
6978 if (pEntry == NULL) // empty cluster
6987 long long Cluster::GetLastTime() const {
6995 if (pEntry == NULL) // empty cluster
7004 long Cluster::CreateBlock(long long id,
7053 long Cluster::CreateBlockGroup(long long start_offset, long long size,
7160 long Cluster::CreateSimpleBlock(long long st, long long sz) {
7191 long Cluster::GetFirst(const BlockEntry*& pFirst) const {
7203 if (m_entries_count <= 0) { // empty cluster
7217 long Cluster::GetLast(const BlockEntry*& pLast) const {
7248 long Cluster::GetNext(const BlockEntry* pCurr, const BlockEntry*& pNext) const {
7286 long Cluster::GetEntryCount() const { return m_entries_count; }
7288 const BlockEntry* Cluster::GetEntry(const Track* pTrack,
7292 if (m_pSegment == NULL) // this is the special EOS cluster
7350 const BlockEntry* Cluster::GetEntry(const CuePoint& cp,
7450 BlockEntry::BlockEntry(Cluster* p, long idx) : m_pCluster(p), m_index(idx) {}
7452 const Cluster* BlockEntry::GetCluster() const { return m_pCluster; }
7455 SimpleBlock::SimpleBlock(Cluster* pCluster, long idx, long long start,
7463 BlockGroup::BlockGroup(Cluster* pCluster, long idx, long long block_start,
7501 long Block::Parse(const Cluster* pCluster) {
7868 long long Block::GetTimeCode(const Cluster* pCluster) const {
7880 long long Block::GetTime(const Cluster* pCluster) const {