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

Side by Side Diff: media/capture/video/video_capture_buffer_handle.h

Issue 2378943002: Let clients interact with VideoCaptureDeviceClient instead of VideoCaptureDevice (Closed)
Patch Set: mcasas comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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/capture/capture_export.h" 10 #include "media/capture/capture_export.h"
10 #include "ui/gfx/geometry/size.h" 11 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/gpu_memory_buffer.h" 12 #include "ui/gfx/gpu_memory_buffer.h"
12 13
13 namespace media { 14 namespace media {
14 15
15 // 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.
16 class CAPTURE_EXPORT VideoCaptureBufferHandle { 17 class CAPTURE_EXPORT VideoCaptureBufferHandle {
17 public: 18 public:
18 virtual ~VideoCaptureBufferHandle() {} 19 virtual ~VideoCaptureBufferHandle() {}
19 virtual gfx::Size dimensions() const = 0; 20 virtual gfx::Size dimensions() const = 0;
20 virtual size_t mapped_size() const = 0; 21 virtual size_t mapped_size() const = 0;
21 virtual void* data(int plane) = 0; 22 virtual void* data(int plane) = 0;
22 virtual ClientBuffer AsClientBuffer(int plane) = 0; 23 virtual ClientBuffer AsClientBuffer(int plane) = 0;
emircan 2016/10/10 18:46:13 Can you remove this method AsClientBuffer()? I mis
chfremer 2016/10/11 19:09:07 Done.
23 #if defined(OS_POSIX) && !defined(OS_MACOSX) 24 #if defined(OS_POSIX) && !defined(OS_MACOSX)
24 virtual base::FileDescriptor AsPlatformFile() = 0; 25 virtual base::FileDescriptor AsPlatformFile() = 0;
25 #endif 26 #endif
27 virtual bool IsBackedByVideoFrame() const = 0;
28 virtual scoped_refptr<VideoFrame> GetVideoFrame() = 0;
26 }; 29 };
27 30
28 } // namespace media 31 } // namespace media
29 32
30 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_ 33 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698