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

Side by Side Diff: media/capture/video/video_capture_device.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 (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.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual ~Buffer() = 0; 56 virtual ~Buffer() = 0;
57 virtual int id() const = 0; 57 virtual int id() const = 0;
58 virtual gfx::Size dimensions() const = 0; 58 virtual gfx::Size dimensions() const = 0;
59 virtual size_t mapped_size() const = 0; 59 virtual size_t mapped_size() const = 0;
60 virtual void* data(int plane) = 0; 60 virtual void* data(int plane) = 0;
61 void* data() { return data(0); } 61 void* data() { return data(0); }
62 virtual ClientBuffer AsClientBuffer(int plane) = 0; 62 virtual ClientBuffer AsClientBuffer(int plane) = 0;
63 #if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS)) 63 #if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS))
64 virtual base::FileDescriptor AsPlatformFile() = 0; 64 virtual base::FileDescriptor AsPlatformFile() = 0;
65 #endif 65 #endif
66 virtual bool IsBackedByVideoFrame() const = 0;
67 virtual scoped_refptr<VideoFrame> GetVideoFrame() = 0;
66 }; 68 };
67 69
68 virtual ~Client() {} 70 virtual ~Client() {}
69 71
70 // Captured a new video frame, data for which is pointed to by |data|. 72 // Captured a new video frame, data for which is pointed to by |data|.
71 // 73 //
72 // The format of the frame is described by |frame_format|, and is assumed to 74 // The format of the frame is described by |frame_format|, and is assumed to
73 // be tightly packed. This method will try to reserve an output buffer and 75 // be tightly packed. This method will try to reserve an output buffer and
74 // copy from |data| into the output buffer. If no output buffer is 76 // copy from |data| into the output buffer. If no output buffer is
75 // available, the frame will be silently dropped. |reference_time| is 77 // available, the frame will be silently dropped. |reference_time| is
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 229
228 private: 230 private:
229 // Gets the power line frequency from the current system time zone if this is 231 // Gets the power line frequency from the current system time zone if this is
230 // defined, otherwise returns 0. 232 // defined, otherwise returns 0.
231 PowerLineFrequency GetPowerLineFrequencyForLocation() const; 233 PowerLineFrequency GetPowerLineFrequencyForLocation() const;
232 }; 234 };
233 235
234 } // namespace media 236 } // namespace media
235 237
236 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ 238 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698