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

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

Issue 2045813003: Decouple capture timestamp and reference time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 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 // additional copies in the browser process. 240 // additional copies in the browser process.
241 // See OnIncomingCapturedData for details of |reference_time| and 241 // See OnIncomingCapturedData for details of |reference_time| and
242 // |timestamp|. 242 // |timestamp|.
243 virtual void OnIncomingCapturedBuffer( 243 virtual void OnIncomingCapturedBuffer(
244 std::unique_ptr<Buffer> buffer, 244 std::unique_ptr<Buffer> buffer,
245 const VideoCaptureFormat& frame_format, 245 const VideoCaptureFormat& frame_format,
246 base::TimeTicks reference_time, 246 base::TimeTicks reference_time,
247 base::TimeDelta timestamp) = 0; 247 base::TimeDelta timestamp) = 0;
248 virtual void OnIncomingCapturedVideoFrame( 248 virtual void OnIncomingCapturedVideoFrame(
249 std::unique_ptr<Buffer> buffer, 249 std::unique_ptr<Buffer> buffer,
250 const scoped_refptr<VideoFrame>& frame, 250 const scoped_refptr<VideoFrame>& frame) = 0;
251 base::TimeTicks reference_time) = 0;
252 251
253 // Attempts to reserve the same Buffer provided in the last call to one of 252 // Attempts to reserve the same Buffer provided in the last call to one of
254 // the OnIncomingCapturedXXX() methods. This will fail if the content of the 253 // the OnIncomingCapturedXXX() methods. This will fail if the content of the
255 // Buffer has not been preserved, or if the |dimensions|, |format|, or 254 // Buffer has not been preserved, or if the |dimensions|, |format|, or
256 // |storage| disagree with how it was reserved via ReserveOutputBuffer(). 255 // |storage| disagree with how it was reserved via ReserveOutputBuffer().
257 // When this operation fails, nullptr will be returned. 256 // When this operation fails, nullptr will be returned.
258 virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 257 virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
259 const gfx::Size& dimensions, 258 const gfx::Size& dimensions,
260 VideoPixelFormat format, 259 VideoPixelFormat format,
261 VideoPixelStorage storage) = 0; 260 VideoPixelStorage storage) = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 325
327 private: 326 private:
328 // Gets the power line frequency from the current system time zone if this is 327 // Gets the power line frequency from the current system time zone if this is
329 // defined, otherwise returns 0. 328 // defined, otherwise returns 0.
330 PowerLineFrequency GetPowerLineFrequencyForLocation() const; 329 PowerLineFrequency GetPowerLineFrequencyForLocation() const;
331 }; 330 };
332 331
333 } // namespace media 332 } // namespace media
334 333
335 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ 334 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | media/capture/video/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698