5 #ifndef MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_
6 #define MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_
9 #include "packager/base/memory/scoped_ptr.h"
16 Cluster(scoped_ptr<uint8_t[]> data,
int size);
19 const uint8_t* data()
const {
return data_.get(); }
20 int size()
const {
return size_; }
23 scoped_ptr<uint8_t[]> data_;
26 DISALLOW_IMPLICIT_CONSTRUCTORS(
Cluster);
34 void SetClusterTimecode(int64_t cluster_timecode);
35 void AddSimpleBlock(
int track_num,
40 void AddBlockGroup(
int track_num,
47 void AddBlockGroupWithoutBlockDuration(
int track_num,
54 scoped_ptr<Cluster> Finish();
55 scoped_ptr<Cluster> FinishWithUnknownSize();
58 void AddBlockGroupInternal(
int track_num,
60 bool include_block_duration,
67 void ExtendBuffer(
int bytes_needed);
68 void UpdateUInt64(
int offset, int64_t value);
69 void WriteBlock(uint8_t* buf,
76 scoped_ptr<uint8_t[]> buffer_;
79 int64_t cluster_timecode_;
87 #endif // MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_