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

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

Issue 1204063005: Reland: Video Capture: extract storage info from pixel format in VideoCaptureFormat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheng@ nit on DCHECK_EQ(expected, actual) Created 5 years, 6 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // The returned Buffer will always be allocated with a memory size suitable 240 // The returned Buffer will always be allocated with a memory size suitable
241 // for holding a packed video frame with pixels of |format| format, of 241 // for holding a packed video frame with pixels of |format| format, of
242 // |dimensions| frame dimensions. It is permissible for |dimensions| to be 242 // |dimensions| frame dimensions. It is permissible for |dimensions| to be
243 // zero; in which case the returned Buffer does not guarantee memory 243 // zero; in which case the returned Buffer does not guarantee memory
244 // backing, but functions as a reservation for external input for the 244 // backing, but functions as a reservation for external input for the
245 // purposes of buffer throttling. 245 // purposes of buffer throttling.
246 // 246 //
247 // The output buffer stays reserved and mapped for use until the Buffer 247 // The output buffer stays reserved and mapped for use until the Buffer
248 // object is destroyed or returned. 248 // object is destroyed or returned.
249 virtual scoped_ptr<Buffer> ReserveOutputBuffer( 249 virtual scoped_ptr<Buffer> ReserveOutputBuffer(
250 media::VideoPixelFormat format, 250 const gfx::Size& dimensions,
251 const gfx::Size& dimensions) = 0; 251 VideoPixelFormat format,
252 VideoPixelStorage storage) = 0;
252 253
253 // Captured new video data, held in |frame| or |buffer|, respectively for 254 // Captured new video data, held in |frame| or |buffer|, respectively for
254 // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer(). 255 // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer().
255 // 256 //
256 // In both cases, as the frame is backed by a reservation returned by 257 // In both cases, as the frame is backed by a reservation returned by
257 // ReserveOutputBuffer(), delivery is guaranteed and will require no 258 // ReserveOutputBuffer(), delivery is guaranteed and will require no
258 // additional copies in the browser process. 259 // additional copies in the browser process.
259 virtual void OnIncomingCapturedBuffer( 260 virtual void OnIncomingCapturedBuffer(
260 scoped_ptr<Buffer> buffer, 261 scoped_ptr<Buffer> buffer,
261 const VideoCaptureFormat& frame_format, 262 const VideoCaptureFormat& frame_format,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 int GetPowerLineFrequencyForLocation() const; 304 int GetPowerLineFrequencyForLocation() const;
304 305
305 protected: 306 protected:
306 static const int kPowerLine50Hz = 50; 307 static const int kPowerLine50Hz = 50;
307 static const int kPowerLine60Hz = 60; 308 static const int kPowerLine60Hz = 60;
308 }; 309 };
309 310
310 } // namespace media 311 } // namespace media
311 312
312 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 313 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« no previous file with comments | « media/video/capture/fake_video_capture_device_unittest.cc ('k') | media/video/capture/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698