OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ |
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ | 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ |
7 | 7 |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "media/base/video_frame.h" | 9 #include "media/base/video_frame.h" |
10 #include "media/capture/capture_export.h" | 10 #include "media/capture/capture_export.h" |
11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
12 #include "ui/gfx/gpu_memory_buffer.h" | 12 #include "ui/gfx/gpu_memory_buffer.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 // Abstraction of a pool's buffer data buffer and size for clients. | 16 // Abstraction of a pool's buffer data buffer and size for clients. |
17 class CAPTURE_EXPORT VideoCaptureBufferHandle { | 17 class CAPTURE_EXPORT VideoCaptureBufferHandle { |
18 public: | 18 public: |
19 virtual ~VideoCaptureBufferHandle() {} | 19 virtual ~VideoCaptureBufferHandle() {} |
20 virtual size_t mapped_size() const = 0; | 20 virtual size_t mapped_size() const = 0; |
21 virtual uint8_t* data() = 0; | 21 virtual uint8_t* data() const = 0; |
22 virtual const uint8_t* data() const = 0; | 22 virtual const uint8_t* const_data() const = 0; |
23 }; | 23 }; |
24 | 24 |
25 } // namespace media | 25 } // namespace media |
26 | 26 |
27 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ | 27 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ |
OLD | NEW |