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

Unified Diff: media/base/stream_parser_buffer.cc

Issue 10269022: Add StreamParserBuffer to ChunkDemuxer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to CR Created 8 years, 8 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/base/stream_parser_buffer.cc
diff --git a/media/base/stream_parser_buffer.cc b/media/base/stream_parser_buffer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a4940f4ea16f7c669621145c93da310cb1de9fd7
--- /dev/null
+++ b/media/base/stream_parser_buffer.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 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.
+
+#include "media/base/stream_parser_buffer.h"
+
+namespace media {
+
+StreamParserBuffer::StreamParserBuffer(const uint8* data, int data_size,
+ bool is_keyframe)
+ : DataBuffer(data, data_size),
+ is_keyframe_(is_keyframe) {
+}
+
+scoped_refptr<StreamParserBuffer> StreamParserBuffer::CreateEOSBuffer() {
+ return scoped_refptr<StreamParserBuffer>(
Ami GONE FROM CHROMIUM 2012/05/02 17:57:25 FWIW, return scoped_refptr<T>(new T(...)); is sho
vrk (LEFT CHROMIUM) 2012/05/02 19:55:18 Forgot about that function, thanks fischman! Chang
+ new StreamParserBuffer(NULL, 0, false));
+}
+
+scoped_refptr<StreamParserBuffer> StreamParserBuffer::CopyFrom(
+ const uint8* data, int data_size, bool is_keyframe) {
+ return scoped_refptr<StreamParserBuffer>(
+ new StreamParserBuffer(data, data_size, is_keyframe));
+}
+
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698