Index: media/base/encoded_bitstream_buffer.h |
diff --git a/media/base/encoded_bitstream_buffer.h b/media/base/encoded_bitstream_buffer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8a1161a43dc3ae4257b95f9757cf6860eb645566 |
--- /dev/null |
+++ b/media/base/encoded_bitstream_buffer.h |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2013 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_BASE_ENCODED_BITSTREAM_BUFFER_H_ |
+#define MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_ |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/shared_memory.h" |
+#include "base/time.h" |
+#include "media/base/media_export.h" |
+#include "media/video/video_encode_types.h" |
+ |
+namespace media { |
+ |
+class EncodedBitstreamBuffer : |
+ public base::RefCountedThreadSafe<EncodedBitstreamBuffer> { |
+ public: |
+ // Constructor that maps the shared memory with the given size to the current |
+ // process and associates the given metadata with the buffer. |
+ EncodedBitstreamBuffer(int buffer_id, |
+ uint8* buffer, |
+ int size, |
+ const media::BufferEncodingMetadata& metadata); |
+ // Accessors for properties. |
+ int buffer_id() const; |
+ const uint8* buffer() const; |
+ int size() const; |
+ const media::BufferEncodingMetadata& metadata() const; |
+ |
+ private: |
+ virtual ~EncodedBitstreamBuffer(); |
+ friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>; |
+ |
+ int buffer_id_; |
+ uint8* buffer_; |
+ int size_; |
+ media::BufferEncodingMetadata metadata_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(EncodedBitstreamBuffer); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_ |