OLD | NEW |
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 sigslot::multi_threaded_local> SignalFrameCaptured; | 239 sigslot::multi_threaded_local> SignalFrameCaptured; |
240 | 240 |
241 // If true, run video adaptation. By default, video adaptation is enabled | 241 // If true, run video adaptation. By default, video adaptation is enabled |
242 // and users must call video_adapter()->OnOutputFormatRequest() | 242 // and users must call video_adapter()->OnOutputFormatRequest() |
243 // to receive frames. | 243 // to receive frames. |
244 bool enable_video_adapter() const { return enable_video_adapter_; } | 244 bool enable_video_adapter() const { return enable_video_adapter_; } |
245 void set_enable_video_adapter(bool enable_video_adapter) { | 245 void set_enable_video_adapter(bool enable_video_adapter) { |
246 enable_video_adapter_ = enable_video_adapter; | 246 enable_video_adapter_ = enable_video_adapter; |
247 } | 247 } |
248 | 248 |
249 CoordinatedVideoAdapter* video_adapter() { return &video_adapter_; } | |
250 const CoordinatedVideoAdapter* video_adapter() const { | |
251 return &video_adapter_; | |
252 } | |
253 | |
254 // Takes ownership. | 249 // Takes ownership. |
255 void set_frame_factory(VideoFrameFactory* frame_factory); | 250 void set_frame_factory(VideoFrameFactory* frame_factory); |
256 | 251 |
257 // Gets statistics for tracked variables recorded since the last call to | 252 // Gets statistics for tracked variables recorded since the last call to |
258 // GetStats. Note that calling GetStats resets any gathered data so it | 253 // GetStats. Note that calling GetStats resets any gathered data so it |
259 // should be called only periodically to log statistics. | 254 // should be called only periodically to log statistics. |
260 void GetStats(VariableInfo<int>* adapt_drop_stats, | 255 void GetStats(VariableInfo<int>* adapt_drop_stats, |
261 VariableInfo<int>* effect_drop_stats, | 256 VariableInfo<int>* effect_drop_stats, |
262 VariableInfo<double>* frame_time_stats, | 257 VariableInfo<double>* frame_time_stats, |
263 VideoFormat* last_captured_frame_format); | 258 VideoFormat* last_captured_frame_format); |
(...skipping 15 matching lines...) Expand all Loading... |
279 virtual void OnSinkWantsChanged(const rtc::VideoSinkWants& wants); | 274 virtual void OnSinkWantsChanged(const rtc::VideoSinkWants& wants); |
280 | 275 |
281 // Callback attached to SignalFrameCaptured where SignalVideoFrames is called. | 276 // Callback attached to SignalFrameCaptured where SignalVideoFrames is called. |
282 void OnFrameCaptured(VideoCapturer* video_capturer, | 277 void OnFrameCaptured(VideoCapturer* video_capturer, |
283 const CapturedFrame* captured_frame); | 278 const CapturedFrame* captured_frame); |
284 | 279 |
285 // Callback attached to SignalVideoFrame. | 280 // Callback attached to SignalVideoFrame. |
286 // TODO(perkj): Remove once SignalVideoFrame is removed. | 281 // TODO(perkj): Remove once SignalVideoFrame is removed. |
287 void OnFrame(VideoCapturer* capturer, const VideoFrame* frame); | 282 void OnFrame(VideoCapturer* capturer, const VideoFrame* frame); |
288 | 283 |
| 284 CoordinatedVideoAdapter* video_adapter() { return &video_adapter_; } |
| 285 |
289 void SetCaptureState(CaptureState state); | 286 void SetCaptureState(CaptureState state); |
290 | 287 |
291 // Marshals SignalStateChange onto thread_. | 288 // Marshals SignalStateChange onto thread_. |
292 void OnMessage(rtc::Message* message) override; | 289 void OnMessage(rtc::Message* message) override; |
293 | 290 |
294 // subclasses override this virtual method to provide a vector of fourccs, in | 291 // subclasses override this virtual method to provide a vector of fourccs, in |
295 // order of preference, that are expected by the media engine. | 292 // order of preference, that are expected by the media engine. |
296 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) = 0; | 293 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) = 0; |
297 | 294 |
298 // mutators to set private attributes | 295 // mutators to set private attributes |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 370 |
374 // Whether capturer should apply rotation to the frame before signaling it. | 371 // Whether capturer should apply rotation to the frame before signaling it. |
375 bool apply_rotation_; | 372 bool apply_rotation_; |
376 | 373 |
377 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); | 374 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); |
378 }; | 375 }; |
379 | 376 |
380 } // namespace cricket | 377 } // namespace cricket |
381 | 378 |
382 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ | 379 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ |
OLD | NEW |