OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_BASE_VIDEO_FACING_H_ | 5 #ifndef MEDIA_BASE_VIDEO_FACING_H_ |
6 #define MEDIA_BASE_VIDEO_FACING_H_ | 6 #define MEDIA_BASE_VIDEO_FACING_H_ |
7 | 7 |
8 #if defined(OS_CHROMEOS) | |
9 #include "chromeos/audio/cras_audio_handler.h" | |
chfremer1
2017/01/25 18:13:44
I am not familiar with the dependency structures a
shenghao
2017/01/29 10:21:02
Yes, as you can see in https://cs.chromium.org/chr
| |
10 #endif | |
11 | |
8 namespace media { | 12 namespace media { |
9 | 13 |
10 // Facing mode for video capture. | 14 // Facing mode for video capture. |
11 enum VideoFacingMode { | 15 enum VideoFacingMode { |
12 MEDIA_VIDEO_FACING_NONE = 0, | 16 MEDIA_VIDEO_FACING_NONE = 0, |
13 MEDIA_VIDEO_FACING_USER, | 17 MEDIA_VIDEO_FACING_USER, |
14 MEDIA_VIDEO_FACING_ENVIRONMENT, | 18 MEDIA_VIDEO_FACING_ENVIRONMENT, |
15 | 19 |
16 NUM_MEDIA_VIDEO_FACING_MODE | 20 NUM_MEDIA_VIDEO_FACING_MODE |
17 }; | 21 }; |
18 | 22 |
23 class VideoCaptureObserver { | |
chfremer1
2017/01/25 18:13:44
It would be cleaner (and make our life easier in t
shenghao
2017/01/29 10:21:02
Done.
| |
24 public: | |
25 #if defined(OS_CHROMEOS) | |
26 VideoCaptureObserver(chromeos::VideoCaptureObserver* observer); | |
27 #endif | |
28 VideoCaptureObserver(); | |
29 void OnVideoCaptureStarted(VideoFacingMode facing); | |
30 void OnVideoCaptureStopped(VideoFacingMode facing); | |
31 | |
32 #if defined(OS_CHROMEOS) | |
33 private: | |
34 chromeos::VideoCaptureObserver* const observer_; | |
35 #endif | |
36 }; | |
37 | |
19 } // namespace media | 38 } // namespace media |
20 | 39 |
21 #endif // MEDIA_BASE_VIDEO_FACING_H_ | 40 #endif // MEDIA_BASE_VIDEO_FACING_H_ |
OLD | NEW |