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

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

Issue 1106563002: FakeVideoCaptureDevice: add support for capturing into Dma-Bufs using VGEM in CrOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ermircan@ comments; removed GpuMemoryBuffer modifications (go in other CL) Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // VideoCaptureDevice is the abstract base class for realizing video capture 5 // VideoCaptureDevice is the abstract base class for realizing video capture
6 // device support in Chromium. It provides the interface for OS dependent 6 // device support in Chromium. It provides the interface for OS dependent
7 // implementations. 7 // implementations.
8 // The class is created and functions are invoked on a thread owned by 8 // The class is created and functions are invoked on a thread owned by
9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS
10 // specific implementation. 10 // specific implementation.
11 11
12 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 12 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
13 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 13 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
14 14
15 #include <list> 15 #include <list>
16 #include <string> 16 #include <string>
17 17
18 #include "base/files/file.h"
18 #include "base/logging.h" 19 #include "base/logging.h"
19 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
20 #include "base/memory/scoped_ptr.h" 21 #include "base/memory/scoped_ptr.h"
21 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
22 #include "base/time/time.h" 23 #include "base/time/time.h"
23 #include "media/base/media_export.h" 24 #include "media/base/media_export.h"
24 #include "media/base/video_capture_types.h" 25 #include "media/base/video_capture_types.h"
25 #include "media/base/video_frame.h" 26 #include "media/base/video_frame.h"
26 #include "ui/gfx/gpu_memory_buffer.h" 27 #include "ui/gfx/gpu_memory_buffer.h"
27 28
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 class MEDIA_EXPORT Client { 197 class MEDIA_EXPORT Client {
197 public: 198 public:
198 // Memory buffer returned by Client::ReserveOutputBuffer(). 199 // Memory buffer returned by Client::ReserveOutputBuffer().
199 class MEDIA_EXPORT Buffer { 200 class MEDIA_EXPORT Buffer {
200 public: 201 public:
201 virtual ~Buffer() = 0; 202 virtual ~Buffer() = 0;
202 virtual int id() const = 0; 203 virtual int id() const = 0;
203 virtual size_t size() const = 0; 204 virtual size_t size() const = 0;
204 virtual void* data() = 0; 205 virtual void* data() = 0;
205 virtual gfx::GpuMemoryBufferType GetType() = 0; 206 virtual gfx::GpuMemoryBufferType GetType() = 0;
207 virtual base::PlatformFile AsPlatformFile() = 0;
206 virtual ClientBuffer AsClientBuffer() = 0; 208 virtual ClientBuffer AsClientBuffer() = 0;
207 }; 209 };
208 210
209 virtual ~Client() {} 211 virtual ~Client() {}
210 212
211 // Captured a new video frame, data for which is pointed to by |data|. 213 // Captured a new video frame, data for which is pointed to by |data|.
212 // 214 //
213 // The format of the frame is described by |frame_format|, and is assumed to 215 // The format of the frame is described by |frame_format|, and is assumed to
214 // be tightly packed. This method will try to reserve an output buffer and 216 // be tightly packed. This method will try to reserve an output buffer and
215 // copy from |data| into the output buffer. If no output buffer is 217 // copy from |data| into the output buffer. If no output buffer is
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 int GetPowerLineFrequencyForLocation() const; 298 int GetPowerLineFrequencyForLocation() const;
297 299
298 protected: 300 protected:
299 static const int kPowerLine50Hz = 50; 301 static const int kPowerLine50Hz = 50;
300 static const int kPowerLine60Hz = 60; 302 static const int kPowerLine60Hz = 60;
301 }; 303 };
302 304
303 } // namespace media 305 } // namespace media
304 306
305 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 307 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698