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

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

Issue 1179323002: Video Capture: extract storage info from pixel format in VideoCaptureFormat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // The returned Buffer will always be allocated with a memory size suitable 239 // The returned Buffer will always be allocated with a memory size suitable
240 // for holding a packed video frame with pixels of |format| format, of 240 // for holding a packed video frame with pixels of |format| format, of
241 // |dimensions| frame dimensions. It is permissible for |dimensions| to be 241 // |dimensions| frame dimensions. It is permissible for |dimensions| to be
242 // zero; in which case the returned Buffer does not guarantee memory 242 // zero; in which case the returned Buffer does not guarantee memory
243 // backing, but functions as a reservation for external input for the 243 // backing, but functions as a reservation for external input for the
244 // purposes of buffer throttling. 244 // purposes of buffer throttling.
245 // 245 //
246 // The output buffer stays reserved and mapped for use until the Buffer 246 // The output buffer stays reserved and mapped for use until the Buffer
247 // object is destroyed or returned. 247 // object is destroyed or returned.
248 virtual scoped_ptr<Buffer> ReserveOutputBuffer( 248 virtual scoped_ptr<Buffer> ReserveOutputBuffer(
249 media::VideoPixelFormat format, 249 const VideoCaptureFormat& frame_format) = 0;
miu 2015/06/13 00:41:37 Hmm...We talked about this in a similar change a f
mcasas 2015/06/16 23:14:01 Done.
250 const gfx::Size& dimensions) = 0;
251 250
252 // Captured new video data, held in |frame| or |buffer|, respectively for 251 // Captured new video data, held in |frame| or |buffer|, respectively for
253 // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer(). 252 // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer().
254 // 253 //
255 // In both cases, as the frame is backed by a reservation returned by 254 // In both cases, as the frame is backed by a reservation returned by
256 // ReserveOutputBuffer(), delivery is guaranteed and will require no 255 // ReserveOutputBuffer(), delivery is guaranteed and will require no
257 // additional copies in the browser process. 256 // additional copies in the browser process.
258 virtual void OnIncomingCapturedBuffer( 257 virtual void OnIncomingCapturedBuffer(
259 scoped_ptr<Buffer> buffer, 258 scoped_ptr<Buffer> buffer,
260 const VideoCaptureFormat& frame_format, 259 const VideoCaptureFormat& frame_format,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int GetPowerLineFrequencyForLocation() const; 297 int GetPowerLineFrequencyForLocation() const;
299 298
300 protected: 299 protected:
301 static const int kPowerLine50Hz = 50; 300 static const int kPowerLine50Hz = 50;
302 static const int kPowerLine60Hz = 60; 301 static const int kPowerLine60Hz = 60;
303 }; 302 };
304 303
305 } // namespace media 304 } // namespace media
306 305
307 #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