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

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

Issue 1267883002: Pass GpuMemoryBuffer backed VideoFrame from browser to renderer processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmbtracker-multiple
Patch Set: Rebase Created 5 years, 3 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
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // is actually two-in-one: clients may implement OnIncomingCapturedData() or 174 // is actually two-in-one: clients may implement OnIncomingCapturedData() or
175 // ReserveOutputBuffer() + OnIncomingCapturedVideoFrame(), or all of them. 175 // ReserveOutputBuffer() + OnIncomingCapturedVideoFrame(), or all of them.
176 // All clients must implement OnError(). 176 // All clients must implement OnError().
177 class MEDIA_EXPORT Client { 177 class MEDIA_EXPORT Client {
178 public: 178 public:
179 // Memory buffer returned by Client::ReserveOutputBuffer(). 179 // Memory buffer returned by Client::ReserveOutputBuffer().
180 class MEDIA_EXPORT Buffer { 180 class MEDIA_EXPORT Buffer {
181 public: 181 public:
182 virtual ~Buffer() = 0; 182 virtual ~Buffer() = 0;
183 virtual int id() const = 0; 183 virtual int id() const = 0;
184 virtual size_t size() const = 0; 184 virtual gfx::Size dimensions() const = 0;
185 virtual size_t mapped_size() const = 0;
185 virtual void* data(int plane) = 0; 186 virtual void* data(int plane) = 0;
186 void* data() { return data(0); } 187 void* data() { return data(0); }
187 virtual ClientBuffer AsClientBuffer(int plane) = 0; 188 virtual ClientBuffer AsClientBuffer(int plane) = 0;
188 #if defined(OS_POSIX) 189 #if defined(OS_POSIX)
189 virtual base::FileDescriptor AsPlatformFile() = 0; 190 virtual base::FileDescriptor AsPlatformFile() = 0;
190 #endif 191 #endif
191 }; 192 };
192 193
193 virtual ~Client() {} 194 virtual ~Client() {}
194 195
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 287
287 private: 288 private:
288 // Gets the power line frequency from the current system time zone if this is 289 // Gets the power line frequency from the current system time zone if this is
289 // defined, otherwise returns 0. 290 // defined, otherwise returns 0.
290 int GetPowerLineFrequencyForLocation() const; 291 int GetPowerLineFrequencyForLocation() const;
291 }; 292 };
292 293
293 } // namespace media 294 } // namespace media
294 295
295 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 296 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698