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

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: Created 5 years, 8 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 ClientBuffer AsClientBuffer() = 0; 206 virtual ClientBuffer AsClientBuffer() = 0;
207 virtual base::PlatformFile AsPlatformFile() = 0;
206 }; 208 };
207 209
208 virtual ~Client() {} 210 virtual ~Client() {}
209 211
210 // Captured a new video frame, data for which is pointed to by |data|. 212 // Captured a new video frame, data for which is pointed to by |data|.
211 // 213 //
212 // The format of the frame is described by |frame_format|, and is assumed to 214 // The format of the frame is described by |frame_format|, and is assumed to
213 // be tightly packed. This method will try to reserve an output buffer and 215 // be tightly packed. This method will try to reserve an output buffer and
214 // copy from |data| into the output buffer. If no output buffer is 216 // copy from |data| into the output buffer. If no output buffer is
215 // available, the frame will be silently dropped. 217 // available, the frame will be silently dropped.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 int GetPowerLineFrequencyForLocation() const; 297 int GetPowerLineFrequencyForLocation() const;
296 298
297 protected: 299 protected:
298 static const int kPowerLine50Hz = 50; 300 static const int kPowerLine50Hz = 50;
299 static const int kPowerLine60Hz = 60; 301 static const int kPowerLine60Hz = 60;
300 }; 302 };
301 303
302 } // namespace media 304 } // namespace media
303 305
304 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 306 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698