Index: media/capture/video/shared_memory_buffer_handle.h |
diff --git a/media/capture/video/shared_memory_buffer_handle.h b/media/capture/video/shared_memory_buffer_handle.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9389ab220d53dde1bd9162c61d484a0ffa1d8002 |
--- /dev/null |
+++ b/media/capture/video/shared_memory_buffer_handle.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 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_CAPTURE_VIDEO_SHARED_MEMORY_BUFFER_HANDLE_H_ |
+#define MEDIA_CAPTURE_VIDEO_SHARED_MEMORY_BUFFER_HANDLE_H_ |
+ |
+#include "media/capture/capture_export.h" |
+#include "media/capture/video/video_capture_buffer_handle.h" |
+ |
+namespace media { |
+ |
+class CAPTURE_EXPORT SharedMemoryBufferHandle |
+ : public VideoCaptureBufferHandle { |
+ public: |
+ explicit SharedMemoryBufferHandle(base::SharedMemory* shared_memory, |
+ size_t mapped_size); |
+ ~SharedMemoryBufferHandle() override; |
+ |
+ size_t mapped_size() const override; |
+ uint8_t* data() override; |
emircan
2017/04/19 18:16:48
Can we also mark this method as const in the base
chfremer
2017/04/19 23:03:37
Done.
|
+ const uint8_t* data() const override; |
+ |
+ private: |
+ base::SharedMemory* shared_memory_; |
emircan
2017/04/19 18:16:48
base::SharedMemory* const shared_memory_;
chfremer
2017/04/19 23:03:37
Done.
|
+ size_t mapped_size_; |
emircan
2017/04/19 18:16:48
const
chfremer
2017/04/19 23:03:37
Done.
|
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_CAPTURE_VIDEO_SHARED_MEMORY_BUFFER_HANDLE_H_ |