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..d90ffcd2c5a8d9c6460b77e9d37ef50b2d7fa18f |
--- /dev/null |
+++ b/media/base/encoded_bitstream_buffer.h |
@@ -0,0 +1,48 @@ |
+// 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 { |
+ |
+// General encoded video bitstream buffer. |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
This sort of comment (which appears elsewhere as w
|
+class EncodedBitstreamBuffer : |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Seems strange to have this time given that media::
hshi1
2013/06/12 17:52:39
I'm leaving this as-is for now. Need to review she
|
+ 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, |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
comment (and off-reviewlog convo) says "shared mem
|
+ size_t size, |
+ const media::BufferEncodingMetadata& metadata); |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Is there any reason for this to be a separate stru
|
+ // Accessors for properties. |
+ int buffer_id() const; |
+ const uint8* buffer() const; |
+ size_t size() const; |
+ const media::BufferEncodingMetadata& metadata() const; |
+ |
+ protected: |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
private?
hshi1
2013/06/12 17:52:39
Done.
|
+ // Destructor that deallocates the buffers. |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Comment is a lie given the impl.
hshi1
2013/06/12 17:52:39
Removed; but see sheu@'s CL. I believe he intends
|
+ virtual ~EncodedBitstreamBuffer(); |
+ friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>; |
+ |
+ private: |
+ int buffer_id_; |
+ uint8* buffer_; |
+ size_t size_; |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
IPC guidelines require this piece of data to be ex
hshi1
2013/06/12 17:52:39
Wouldn't an int do? I don't think bitstream buffer
|
+ media::BufferEncodingMetadata metadata_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(EncodedBitstreamBuffer); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_ |