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

Side by Side Diff: media/base/video_facing.h

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: Address comments Created 3 years, 10 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 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"
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 {
24 public:
25 virtual void OnVideoCaptureStarted(VideoFacingMode facing) = 0;
26 virtual void OnVideoCaptureStopped(VideoFacingMode facing) = 0;
27 };
28
29 class VideoCaptureObserverAdapter : public VideoCaptureObserver {
chfremer 2017/01/30 19:49:28 The way this looks to me now is that VideoCaptureO
shenghao 2017/02/08 02:07:10 I name it to be VideoCaptureObserverChromeOS. The
30 public:
31 #if defined(OS_CHROMEOS)
32 VideoCaptureObserverAdapter(chromeos::VideoCaptureObserver* observer);
33 #endif
34 VideoCaptureObserverAdapter();
35 void OnVideoCaptureStarted(VideoFacingMode facing) override;
36 void OnVideoCaptureStopped(VideoFacingMode facing) override;
37
38 #if defined(OS_CHROMEOS)
39 private:
40 chromeos::VideoCaptureObserver* const observer_;
41 #endif
42 };
43
19 } // namespace media 44 } // namespace media
20 45
21 #endif // MEDIA_BASE_VIDEO_FACING_H_ 46 #endif // MEDIA_BASE_VIDEO_FACING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698