Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ |
| 6 #define MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ | 6 #define MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "media/capture/video/linux/camera_facing_chromeos.h" | 9 #include "media/capture/video/linux/camera_config_chromeos.h" |
| 10 #include "media/capture/video/linux/video_capture_device_linux.h" | 10 #include "media/capture/video/linux/video_capture_device_linux.h" |
| 11 | 11 |
| 12 namespace display { | 12 namespace display { |
| 13 class Display; | 13 class Display; |
| 14 } // namespace display | 14 } // namespace display |
| 15 | 15 |
| 16 namespace media { | 16 namespace media { |
| 17 | 17 |
| 18 // This class is functionally the same as VideoCaptureDeviceLinux, with the | 18 // This class is functionally the same as VideoCaptureDeviceLinux, with the |
| 19 // exception that it is aware of the orientation of the internal Display. When | 19 // exception that it is aware of the orientation of the internal Display. When |
| 20 // the internal Display is rotated, the frames captured are rotated to match. | 20 // the internal Display is rotated, the frames captured are rotated to match. |
| 21 class VideoCaptureDeviceChromeOS : public VideoCaptureDeviceLinux { | 21 class VideoCaptureDeviceChromeOS : public VideoCaptureDeviceLinux { |
| 22 public: | 22 public: |
| 23 explicit VideoCaptureDeviceChromeOS( | 23 explicit VideoCaptureDeviceChromeOS( |
| 24 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 24 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 25 const VideoCaptureDeviceDescriptor& device_descriptor); | 25 const VideoCaptureDeviceDescriptor& device_descriptor); |
| 26 ~VideoCaptureDeviceChromeOS() override; | 26 ~VideoCaptureDeviceChromeOS() override; |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 void SetRotation(int rotation) override; | 29 void SetRotation(int rotation) override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 class ScreenObserverDelegate; | 32 class ScreenObserverDelegate; |
| 33 | 33 |
| 34 void SetDisplayRotation(const display::Display& display); | 34 void SetDisplayRotation(const display::Display& display); |
| 35 scoped_refptr<ScreenObserverDelegate> screen_observer_delegate_; | 35 scoped_refptr<ScreenObserverDelegate> screen_observer_delegate_; |
| 36 const VideoFacingMode lens_facing_; | 36 const VideoFacingMode lens_facing_; |
| 37 const int orientation_; | |
|
wuchengli
2017/01/23 09:43:27
s/orientation_/camera_orientaton_/. Otherwise, it'
shenghao
2017/01/23 12:06:58
Done.
| |
| 37 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceChromeOS); | 38 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceChromeOS); |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 } // namespace media | 41 } // namespace media |
| 41 | 42 |
| 42 #endif // MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ | 43 #endif // MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ |
| OLD | NEW |