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

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

Issue 2490153003: [Mojo Video Capture] Replace const scoped_refptr<T>& with scoped_refptr<T> and use std::move (Closed)
Patch Set: fix bots Created 4 years, 1 month 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // |timestamp|. 112 // |timestamp|.
113 // TODO(chfremer): Consider removing one of the two in order to simplify the 113 // TODO(chfremer): Consider removing one of the two in order to simplify the
114 // interface. 114 // interface.
115 virtual void OnIncomingCapturedBuffer( 115 virtual void OnIncomingCapturedBuffer(
116 std::unique_ptr<Buffer> buffer, 116 std::unique_ptr<Buffer> buffer,
117 const VideoCaptureFormat& frame_format, 117 const VideoCaptureFormat& frame_format,
118 base::TimeTicks reference_time, 118 base::TimeTicks reference_time,
119 base::TimeDelta timestamp) = 0; 119 base::TimeDelta timestamp) = 0;
120 virtual void OnIncomingCapturedVideoFrame( 120 virtual void OnIncomingCapturedVideoFrame(
121 std::unique_ptr<Buffer> buffer, 121 std::unique_ptr<Buffer> buffer,
122 const scoped_refptr<VideoFrame>& frame) = 0; 122 scoped_refptr<VideoFrame> frame) = 0;
123 123
124 // Attempts to reserve the same Buffer provided in the last call to one of 124 // Attempts to reserve the same Buffer provided in the last call to one of
125 // the OnIncomingCapturedXXX() methods. This will fail if the content of the 125 // the OnIncomingCapturedXXX() methods. This will fail if the content of the
126 // Buffer has not been preserved, or if the |dimensions|, |format|, or 126 // Buffer has not been preserved, or if the |dimensions|, |format|, or
127 // |storage| disagree with how it was reserved via ReserveOutputBuffer(). 127 // |storage| disagree with how it was reserved via ReserveOutputBuffer().
128 // When this operation fails, nullptr will be returned. 128 // When this operation fails, nullptr will be returned.
129 virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 129 virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
130 const gfx::Size& dimensions, 130 const gfx::Size& dimensions,
131 VideoPixelFormat format, 131 VideoPixelFormat format,
132 VideoPixelStorage storage) = 0; 132 VideoPixelStorage storage) = 0;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 private: 231 private:
232 // Gets the power line frequency from the current system time zone if this is 232 // Gets the power line frequency from the current system time zone if this is
233 // defined, otherwise returns 0. 233 // defined, otherwise returns 0.
234 PowerLineFrequency GetPowerLineFrequencyForLocation() const; 234 PowerLineFrequency GetPowerLineFrequencyForLocation() const;
235 }; 235 };
236 236
237 } // namespace media 237 } // namespace media
238 238
239 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ 239 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698