Home | History | Annotate | Download | only in libwebm

Lines Matching refs:Cluster

1751 // Cluster class
1753 Cluster::Cluster(uint64 timecode, int64 cues_pos, uint64 timecode_scale)
1764 Cluster::~Cluster() {}
1766 bool Cluster::Init(IMkvWriter* ptr_writer) {
1774 bool Cluster::AddFrame(const Frame* const frame) { return DoWriteFrame(frame); }
1776 bool Cluster::AddFrame(const uint8* data, uint64 length, uint64 track_number,
1787 bool Cluster::AddFrameWithAdditional(const uint8* data, uint64 length,
1806 bool Cluster::AddFrameWithDiscardPadding(const uint8* data, uint64 length,
1820 bool Cluster::AddMetadata(const uint8* data, uint64 length, uint64 track_number,
1832 void Cluster::AddPayloadSize(uint64 size) { payload_size_ += size; }
1834 bool Cluster::Finalize() {
1856 uint64 Cluster::Size() const {
1862 bool Cluster::PreWriteBlock() {
1874 void Cluster::PostWriteBlock(uint64 element_size) {
1879 int64 Cluster::GetRelativeTimecode(int64 abs_timecode) const {
1880 const int64 cluster_timecode = this->Cluster::timecode();
1890 bool Cluster::DoWriteFrame(const Frame* const frame) {
1905 bool Cluster::WriteClusterHeader() {
1915 // Write "unknown" (EBML coded -1) as cluster size value. We need to write 8
1916 // bytes because we do not know how big our cluster will be.
2264 Cluster* const cluster = cluster_list_[i];
2265 delete cluster;
2302 cue_point->set_cluster_pos(cluster_pos); // update the new cluster position
2333 // of Cluster and Cues
2400 // Update last cluster's size
2401 Cluster* const old_cluster = cluster_list_[cluster_list_size_ - 1];
2531 const Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
2532 if (!cluster)
2540 cue->set_block_number(cluster->blocks_added());
2541 cue->set_cluster_pos(cluster->position_for_cues());
2650 // muxed into the same cluster.
2667 Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
2668 if (!cluster)
2685 if (!cluster->AddFrame(frame))
2870 // Here we are testing whether to create a new cluster, given a frame
2878 // If no clusters have been created yet, then create a new cluster
2879 // and write this frame immediately, in the new cluster. This path
2886 // There exists at least one cluster. We must compare the frame to
2887 // the last cluster, in order to determine whether the frame is
2888 // written to the existing cluster, or that a new cluster should be
2894 const Cluster* const last_cluster = cluster_list_[cluster_list_size_ - 1];
2898 // is less than the cluster's timecode. Although in principle that
2906 // cluster (in Matroska, cluster-relative timestamps are serialized
2908 // to that cluster, and so we must create a new cluster.
2915 // We decide to create a new cluster when we have a video keyframe.
2917 // immediately, in the newly-created cluster.
2922 // Create a new cluster if we have accumulated too many frames
2924 // in the cluster exceeds a threshold".
2932 // cluster is created when the size of the current cluster exceeds a
2940 // There's no need to create a new cluster, so emit this frame now.
2952 Cluster** const clusters =
2953 new (std::nothrow) Cluster*[new_capacity]; // NOLINT
2972 // Update old cluster's size
2973 Cluster* const old_cluster = cluster_list_[cluster_list_size_ - 1];
3007 Cluster*& cluster = cluster_list_[cluster_list_size_];
3009 cluster = new (std::nothrow) Cluster(cluster_timecode, // NOLINT
3011 if (!cluster)
3014 if (!cluster->Init(writer_cluster_))
3025 // cluster, decide whether to create a new cluster.
3033 // A non-zero result means create a new cluster.
3042 // Write the current frame to the current cluster (if TestFrame
3043 // returns 0) or to a newly created cluster
3048 // difference between the cluster and the frame itself. Do the
3049 // test again, comparing the frame to the new cluster.
3138 Cluster* const cluster = cluster_list_[i];
3139 offset += cluster->Size();
3184 Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
3186 if (!cluster)
3195 if (!cluster->AddFrame(frame))
3219 // Check |cluster_list_size_| to see if this is the first cluster. If it is
3220 // the first cluster the audio frames that are less than the first video
3226 Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
3227 if (!cluster)
3243 if (!cluster->AddFrame(frame_prev))