| 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_HANDLE_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_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/capture/capture_export.h" |
| 9 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| 10 #include "ui/gfx/gpu_memory_buffer.h" | 11 #include "ui/gfx/gpu_memory_buffer.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace media { |
| 13 | 14 |
| 14 // Abstraction of a pool's buffer data buffer and size for clients. | 15 // Abstraction of a pool's buffer data buffer and size for clients. |
| 15 class VideoCaptureBufferHandle { | 16 class CAPTURE_EXPORT VideoCaptureBufferHandle { |
| 16 public: | 17 public: |
| 17 virtual ~VideoCaptureBufferHandle() {} | 18 virtual ~VideoCaptureBufferHandle() {} |
| 18 virtual gfx::Size dimensions() const = 0; | 19 virtual gfx::Size dimensions() const = 0; |
| 19 virtual size_t mapped_size() const = 0; | 20 virtual size_t mapped_size() const = 0; |
| 20 virtual void* data(int plane) = 0; | 21 virtual void* data(int plane) = 0; |
| 21 virtual ClientBuffer AsClientBuffer(int plane) = 0; | 22 virtual ClientBuffer AsClientBuffer(int plane) = 0; |
| 22 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 23 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 23 virtual base::FileDescriptor AsPlatformFile() = 0; | 24 virtual base::FileDescriptor AsPlatformFile() = 0; |
| 24 #endif | 25 #endif |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 } // namespace content | 28 } // namespace media |
| 28 | 29 |
| 29 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_HANDLE_H_ | 30 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ |
| OLD | NEW |