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

Side by Side Diff: webrtc/media/base/videocapturer.h

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Work-in-progress, after applying 1790633002. Created 4 years, 9 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 /* 1 /*
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // and users must call video_adapter()->OnOutputFormatRequest() 211 // and users must call video_adapter()->OnOutputFormatRequest()
212 // to receive frames. 212 // to receive frames.
213 bool enable_video_adapter() const { return enable_video_adapter_; } 213 bool enable_video_adapter() const { return enable_video_adapter_; }
214 void set_enable_video_adapter(bool enable_video_adapter) { 214 void set_enable_video_adapter(bool enable_video_adapter) {
215 enable_video_adapter_ = enable_video_adapter; 215 enable_video_adapter_ = enable_video_adapter;
216 } 216 }
217 217
218 // Takes ownership. 218 // Takes ownership.
219 void set_frame_factory(VideoFrameFactory* frame_factory); 219 void set_frame_factory(VideoFrameFactory* frame_factory);
220 220
221 // TODO(nisse): Rename function? Or pass the frame format before
222 // adaptation in some other way.
223 void GetStats(VideoFormat* last_captured_frame_format);
224
225 // Implements VideoSourceInterface 221 // Implements VideoSourceInterface
226 void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink, 222 void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink,
227 const rtc::VideoSinkWants& wants) override; 223 const rtc::VideoSinkWants& wants) override;
228 void RemoveSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink) override; 224 void RemoveSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink) override;
225 void GetInfo(rtc::VideoSourceInfo *info) override;
229 226
230 protected: 227 protected:
231 // Signal the captured and possibly adapted frame to downstream consumers 228 // Signal the captured and possibly adapted frame to downstream consumers
232 // such as the encoder. 229 // such as the encoder.
233 // TODO(perkj): Remove once it is not used by remoting in Chrome. 230 // TODO(perkj): Remove once it is not used by remoting in Chrome.
234 sigslot::signal2<VideoCapturer*, const VideoFrame*, 231 sigslot::signal2<VideoCapturer*, const VideoFrame*,
235 sigslot::multi_threaded_local> SignalVideoFrame; 232 sigslot::multi_threaded_local> SignalVideoFrame;
236 233
237 // OnSinkWantsChanged can be overridden to change the default behavior 234 // OnSinkWantsChanged can be overridden to change the default behavior
238 // when a sink changes its VideoSinkWants by calling AddOrUpdateSink. 235 // when a sink changes its VideoSinkWants by calling AddOrUpdateSink.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 315
319 // Whether capturer should apply rotation to the frame before signaling it. 316 // Whether capturer should apply rotation to the frame before signaling it.
320 bool apply_rotation_; 317 bool apply_rotation_;
321 318
322 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); 319 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer);
323 }; 320 };
324 321
325 } // namespace cricket 322 } // namespace cricket
326 323
327 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ 324 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698