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,
46 void AddBlockGroupWithoutBlockDuration(
int track_num,
52 scoped_ptr<Cluster> Finish();
53 scoped_ptr<Cluster> FinishWithUnknownSize();
56 void AddBlockGroupInternal(
int track_num,
58 bool include_block_duration,
64 void ExtendBuffer(
int bytes_needed);
65 void UpdateUInt64(
int offset, int64_t value);
66 void WriteBlock(uint8_t* buf,
73 scoped_ptr<uint8_t[]> buffer_;
76 int64_t cluster_timecode_;
84 #endif // MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_