OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 24 matching lines...) Expand all Loading... |
35 class MediaStreamComponent; | 35 class MediaStreamComponent; |
36 class MediaStreamTrack; | 36 class MediaStreamTrack; |
37 class WebAudioSourceProvider; | 37 class WebAudioSourceProvider; |
38 class WebMediaStream; | 38 class WebMediaStream; |
39 class WebMediaStreamSource; | 39 class WebMediaStreamSource; |
40 class WebString; | 40 class WebString; |
41 | 41 |
42 class WebMediaStreamTrack { | 42 class WebMediaStreamTrack { |
43 public: | 43 public: |
44 struct Settings { | 44 struct Settings { |
| 45 // TODO(hta): b/34118695. Consider to rename it to FacingMode. |
| 46 enum VideoFacingMode { User, Environment, Left, Right }; |
45 bool hasFrameRate() { return frameRate >= 0.0; } | 47 bool hasFrameRate() { return frameRate >= 0.0; } |
46 bool hasWidth() { return width >= 0; } | 48 bool hasWidth() { return width >= 0; } |
47 bool hasHeight() { return height >= 0; } | 49 bool hasHeight() { return height >= 0; } |
48 // The variables are read from | 50 // The variables are read from |
49 // MediaStreamTrack::GetSettings only. | 51 // MediaStreamTrack::GetSettings only. |
50 double frameRate = -1.0; | 52 double frameRate = -1.0; |
51 long width = -1; | 53 long width = -1; |
52 long height = -1; | 54 long height = -1; |
53 WebString deviceId; | 55 WebString deviceId; |
| 56 VideoFacingMode facingMode = VideoFacingMode::User; |
54 }; | 57 }; |
55 | 58 |
56 class TrackData { | 59 class TrackData { |
57 public: | 60 public: |
58 TrackData() {} | 61 TrackData() {} |
59 virtual ~TrackData() {} | 62 virtual ~TrackData() {} |
60 virtual void getSettings(Settings&) = 0; | 63 virtual void getSettings(Settings&) = 0; |
61 }; | 64 }; |
62 | 65 |
63 enum class ContentHintType { | 66 enum class ContentHintType { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 114 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; |
112 #endif | 115 #endif |
113 | 116 |
114 private: | 117 private: |
115 WebPrivatePtr<MediaStreamComponent> m_private; | 118 WebPrivatePtr<MediaStreamComponent> m_private; |
116 }; | 119 }; |
117 | 120 |
118 } // namespace blink | 121 } // namespace blink |
119 | 122 |
120 #endif // WebMediaStreamTrack_h | 123 #endif // WebMediaStreamTrack_h |
OLD | NEW |