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

Side by Side Diff: media/capture/video/linux/video_capture_device_chromeos.h

Issue 2936373002: Revert of media: add video capture device for ARC++ camera HAL v3 (Closed)
Patch Set: Created 3 years, 6 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 // 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 "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "media/capture/video/chromeos/display_rotation_observer.h"
11 #include "media/capture/video/linux/camera_config_chromeos.h" 10 #include "media/capture/video/linux/camera_config_chromeos.h"
12 #include "media/capture/video/linux/video_capture_device_linux.h" 11 #include "media/capture/video/linux/video_capture_device_linux.h"
13 12
14 namespace display { 13 namespace display {
15 class Display; 14 class Display;
16 } // namespace display 15 } // namespace display
17 16
18 namespace media { 17 namespace media {
19 18
20 // This class is functionally the same as VideoCaptureDeviceLinux, with the 19 // This class is functionally the same as VideoCaptureDeviceLinux, with the
21 // exception that it is aware of the orientation of the internal Display. When 20 // exception that it is aware of the orientation of the internal Display. When
22 // the internal Display is rotated, the frames captured are rotated to match. 21 // the internal Display is rotated, the frames captured are rotated to match.
23 class VideoCaptureDeviceChromeOS : public VideoCaptureDeviceLinux, 22 class VideoCaptureDeviceChromeOS : public VideoCaptureDeviceLinux {
24 public DisplayRotationObserver {
25 public: 23 public:
26 explicit VideoCaptureDeviceChromeOS( 24 explicit VideoCaptureDeviceChromeOS(
27 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 25 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
28 const VideoCaptureDeviceDescriptor& device_descriptor); 26 const VideoCaptureDeviceDescriptor& device_descriptor);
29 ~VideoCaptureDeviceChromeOS() override; 27 ~VideoCaptureDeviceChromeOS() override;
30 28
31 protected: 29 protected:
32 void SetRotation(int rotation) override; 30 void SetRotation(int rotation) override;
33 31
34 private: 32 private:
35 // DisplayRotationObserver implementation. 33 class ScreenObserverDelegate;
36 void SetDisplayRotation(const display::Display& display) override; 34
35 void SetDisplayRotation(const display::Display& display);
37 scoped_refptr<ScreenObserverDelegate> screen_observer_delegate_; 36 scoped_refptr<ScreenObserverDelegate> screen_observer_delegate_;
38 const VideoFacingMode lens_facing_; 37 const VideoFacingMode lens_facing_;
39 const int camera_orientation_; 38 const int camera_orientation_;
40 // Whether the incoming frames should rotate when the device rotates. 39 // Whether the incoming frames should rotate when the device rotates.
41 const bool rotates_with_device_; 40 const bool rotates_with_device_;
42 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceChromeOS); 41 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceChromeOS);
43 }; 42 };
44 43
45 } // namespace media 44 } // namespace media
46 45
47 #endif // MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_ 46 #endif // MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698