Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2318)

Unified Diff: media/webm/cluster_builder.h

Issue 7203002: Adding ChunkDemuxer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit tests and bug fixes Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/webm/cluster_builder.h
diff --git a/media/webm/cluster_builder.h b/media/webm/cluster_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..8bb88764cf91c2d046657e5cdb589ea36536a072
--- /dev/null
+++ b/media/webm/cluster_builder.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_WEBM_CLUSTER_BUILDER_H_
+#define MEDIA_WEBM_CLUSTER_BUILDER_H_
+
+#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
+
+namespace media {
+
+class ClusterBuilder {
+ public:
+ ClusterBuilder(int64 cluster_timecode);
scherkus (not reviewing) 2011/06/28 20:03:29 explicit
acolwell GONE FROM CHROMIUM 2011/06/29 16:38:43 Done.
+
+ void AddSimpleBlock(int track_num, int64 timecode, int flags,
+ const uint8* data, int size);
+
+ void Finish();
+
+ const uint8* GetClusterData() const;
+ const int GetClusterDataSize() const;
+
+ private:
+ void ExtendBuffer(int bytes_needed);
+ void UpdateUInt64(int offset, int64 value);
+
+ scoped_array<uint8> buffer_;
+ int buffer_size_;
+ int bytes_used_;
+ int64 cluster_timecode_;
+ bool finished_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ClusterBuilder);
+};
+
+} // namespace media
+
+#endif // MEDIA_WEBM_CLUSTER_BUILDER_H_
scherkus (not reviewing) 2011/06/28 20:03:29 two spaces
acolwell GONE FROM CHROMIUM 2011/06/29 16:38:43 Done.

Powered by Google App Engine
This is Rietveld 408576698