Home | History | Annotate | Download | only in libwebm

Lines Matching refs:Cluster

1466 // Cluster class
1468 Cluster::Cluster(uint64 timecode, int64 cues_pos)
1479 Cluster::~Cluster() {
1482 bool Cluster::Init(IMkvWriter* ptr_writer) {
1490 bool Cluster::AddFrame(const uint8* frame,
1503 bool Cluster::AddFrameWithAdditional(const uint8* frame,
1522 bool Cluster::AddFrameWithDiscardPadding(const uint8* frame,
1537 bool Cluster::AddMetadata(const uint8* frame,
1550 void Cluster::AddPayloadSize(uint64 size) {
1554 bool Cluster::Finalize() {
1576 uint64 Cluster::Size() const {
1584 bool Cluster::PreWriteBlock(Type* write_function) {
1599 void Cluster::PostWriteBlock(uint64 element_size) {
1604 bool Cluster::IsValidTrackNumber(uint64 track_number) const {
1608 int64 Cluster::GetRelativeTimecode(int64 abs_timecode) const {
1609 const int64 cluster_timecode = this->Cluster::timecode();
1619 bool Cluster::DoWriteBlock(
1652 bool Cluster::DoWriteBlockWithAdditional(
1692 bool Cluster::DoWriteBlockWithDiscardPadding(
1727 bool Cluster::WriteClusterHeader() {
1737 // Write "unknown" (EBML coded -1) as cluster size value. We need to write 8
1738 // bytes because we do not know how big our cluster will be.
2093 Cluster* const cluster = cluster_list_[i];
2094 delete cluster;
2133 cue_point->set_cluster_pos(cluster_pos); // update the new cluster position
2161 // of Cluster and Cues
2229 // Update last cluster's size
2230 Cluster* const old_cluster = cluster_list_[cluster_list_size_-1];
2348 const Cluster* const cluster = cluster_list_[cluster_list_size_-1];
2349 if (!cluster)
2357 cue->set_block_number(cluster->blocks_added());
2358 cue->set_cluster_pos(cluster->position_for_cues());
2401 // muxed into the same cluster.
2422 Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
2423 if (!cluster)
2429 if (!cluster->AddFrame(frame,
2467 // muxed into the same cluster.
2488 Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
2489 if (cluster == NULL)
2495 if (!cluster->AddFrameWithAdditional(frame,
2534 // muxed into the same cluster.
2556 Cluster* const cluster = cluster_list_[cluster_list_size_ - 1];
2557 if (!cluster)
2563 if (!cluster->AddFrameWithDiscardPadding(frame, length,
2603 Cluster* const cluster = cluster_list_[cluster_list_size_-1];
2605 if (!cluster)
2612 if (!cluster->AddMetadata(frame,
2819 // Here we are testing whether to create a new cluster, given a frame
2828 // If no clusters have been created yet, then create a new cluster
2829 // and write this frame immediately, in the new cluster. This path
2836 // There exists at least one cluster. We must compare the frame to
2837 // the last cluster, in order to determine whether the frame is
2838 // written to the existing cluster, or that a new cluster should be
2844 const Cluster* const last_cluster = cluster_list_[cluster_list_size_ - 1];
2848 // is less than the cluster's timecode. Although in principle that
2856 // cluster (in Matroska, cluster-relative timestamps are serialized
2858 // to that cluster, and so we must create a new cluster.
2865 // We decide to create a new cluster when we have a video keyframe.
2867 // immediately, in the newly-created cluster.
2872 // Create a new cluster if we have accumulated too many frames
2874 // in the cluster exceeds a threshold".
2882 // cluster is created when the size of the current cluster exceeds a
2890 // There's no need to create a new cluster, so emit this frame now.
2902 Cluster** const clusters =
2903 new (std::nothrow) Cluster*[new_capacity]; // NOLINT
2922 // Update old cluster's size
2923 Cluster* const old_cluster = cluster_list_[cluster_list_size_ - 1];
2957 Cluster*& cluster = cluster_list_[cluster_list_size_];
2959 cluster = new (std::nothrow) Cluster(cluster_timecode, offset); // NOLINT
2960 if (!cluster)
2963 if (!cluster->Init(writer_cluster_))
2975 // cluster, decide whether to create a new cluster.
2983 // A non-zero result means create a new cluster.
2992 // Write the current frame to the current cluster (if TestFrame
2993 // returns 0) or to a newly created cluster (TestFrame returns 1).
2998 // difference between the cluster and the frame itself. Do the
2999 // test again, comparing the frame to the new cluster.
3075 Cluster* const cluster = cluster_list_[i];
3076 offset += cluster->Size();
3121 Cluster* const cluster = cluster_list_[cluster_list_size_-1];
3123 if (!cluster)
3134 if (!cluster->AddFrameWithDiscardPadding(frame->frame(),
3143 if (!cluster->AddFrame(frame->frame(),
3171 // Check |cluster_list_size_| to see if this is the first cluster. If it is
3172 // the first cluster the audio frames that are less than the first video
3178 Cluster* const cluster = cluster_list_[cluster_list_size_-1];
3179 if (!cluster)
3199 if (!cluster->AddFrameWithDiscardPadding(frame_prev->frame(),
3208 if (!cluster->AddFrame(frame_prev->frame(),