OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 261 matching lines...) Loading... |
272 | 272 |
273 return CGWindowListCreateImageFromArray( | 273 return CGWindowListCreateImageFromArray( |
274 window_bounds, window_list, kCGWindowImageDefault); | 274 window_bounds, window_list, kCGWindowImageDefault); |
275 } | 275 } |
276 | 276 |
277 // A class to perform video frame capturing for mac. | 277 // A class to perform video frame capturing for mac. |
278 class ScreenCapturerMac : public ScreenCapturer { | 278 class ScreenCapturerMac : public ScreenCapturer { |
279 public: | 279 public: |
280 explicit ScreenCapturerMac( | 280 explicit ScreenCapturerMac( |
281 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor); | 281 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor); |
282 virtual ~ScreenCapturerMac(); | 282 ~ScreenCapturerMac() override; |
283 | 283 |
284 bool Init(); | 284 bool Init(); |
285 | 285 |
286 // Overridden from ScreenCapturer: | 286 // Overridden from ScreenCapturer: |
287 void Start(Callback* callback) override; | 287 void Start(Callback* callback) override; |
288 void CaptureFrame() override; | 288 void CaptureFrame() override; |
289 void SetExcludedWindow(WindowId window) override; | 289 void SetExcludedWindow(WindowId window) override; |
290 bool GetScreenList(ScreenList* screens) override; | 290 bool GetScreenList(ScreenList* screens) override; |
291 bool SelectScreen(ScreenId id) override; | 291 bool SelectScreen(ScreenId id) override; |
292 | 292 |
(...skipping 74 matching lines...) Loading... |
367 : DesktopFrame( | 367 : DesktopFrame( |
368 frame->size(), | 368 frame->size(), |
369 -frame->stride(), | 369 -frame->stride(), |
370 frame->data() + (frame->size().height() - 1) * frame->stride(), | 370 frame->data() + (frame->size().height() - 1) * frame->stride(), |
371 frame->shared_memory()) { | 371 frame->shared_memory()) { |
372 original_frame_ = std::move(frame); | 372 original_frame_ = std::move(frame); |
373 set_dpi(original_frame_->dpi()); | 373 set_dpi(original_frame_->dpi()); |
374 set_capture_time_ms(original_frame_->capture_time_ms()); | 374 set_capture_time_ms(original_frame_->capture_time_ms()); |
375 mutable_updated_region()->Swap(original_frame_->mutable_updated_region()); | 375 mutable_updated_region()->Swap(original_frame_->mutable_updated_region()); |
376 } | 376 } |
377 virtual ~InvertedDesktopFrame() {} | 377 ~InvertedDesktopFrame() override {} |
378 | 378 |
379 private: | 379 private: |
380 std::unique_ptr<DesktopFrame> original_frame_; | 380 std::unique_ptr<DesktopFrame> original_frame_; |
381 | 381 |
382 RTC_DISALLOW_COPY_AND_ASSIGN(InvertedDesktopFrame); | 382 RTC_DISALLOW_COPY_AND_ASSIGN(InvertedDesktopFrame); |
383 }; | 383 }; |
384 | 384 |
385 ScreenCapturerMac::ScreenCapturerMac( | 385 ScreenCapturerMac::ScreenCapturerMac( |
386 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor) | 386 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor) |
387 : desktop_config_monitor_(desktop_config_monitor) { | 387 : desktop_config_monitor_(desktop_config_monitor) { |
(...skipping 643 matching lines...) Loading... |
1031 } | 1031 } |
1032 | 1032 |
1033 if (options.detect_updated_region()) { | 1033 if (options.detect_updated_region()) { |
1034 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); | 1034 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); |
1035 } | 1035 } |
1036 | 1036 |
1037 return capturer.release(); | 1037 return capturer.release(); |
1038 } | 1038 } |
1039 | 1039 |
1040 } // namespace webrtc | 1040 } // namespace webrtc |
OLD | NEW |