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

Unified Diff: media/base/bitstream_buffer.h

Issue 7034040: Updated video decoder IPC to use PPB_Buffer_Dev's new support for SharedMemory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR response. Created 9 years, 7 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/bitstream_buffer.h
diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h
index bd9b84385dc945663f500ae232ac00bd3f7e96a8..3510776d2933935b40da77654e9ece5df44e37ad 100644
--- a/media/base/bitstream_buffer.h
+++ b/media/base/bitstream_buffer.h
@@ -6,30 +6,30 @@
#define MEDIA_BASE_BITSTREAM_BUFFER_H_
#include "base/basictypes.h"
+#include "base/shared_memory.h"
namespace media {
-// Class for passing bitstream buffers around. Ownership of the bitstream
-// pointer remains with whoever uses this class.
-// This is media-namespace equivalent of PP_BitstreamBuffer_Dev.
+// Class for passing bitstream buffers around. Does not take ownership of the
+// data. This is the media-namespace equivalent of PP_VideoBitstreamBuffer_Dev.
class BitstreamBuffer {
public:
- BitstreamBuffer(int32 id, uint8* data, size_t size)
+ BitstreamBuffer(int32 id, base::SharedMemoryHandle handle, size_t size)
: id_(id),
- data_(data),
+ handle_(handle),
size_(size) {
}
int32 id() const { return id_; }
- uint8* data() const { return data_; }
+ base::SharedMemoryHandle handle() const { return handle_; }
size_t size() const { return size_; }
private:
- int32 id_;
- uint8* data_;
- size_t size_;
+ const int32 id_;
+ const base::SharedMemoryHandle handle_;
+ const size_t size_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(BitstreamBuffer);
+ // Allow compiler-generated copy & assign constructors.
};
} // namespace media
« no previous file with comments | « content/renderer/gpu_video_decode_accelerator_host.cc ('k') | webkit/plugins/ppapi/ppb_video_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698