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 27 matching lines...) Expand all Loading... |
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 bool hasFrameRate() { return frameRate >= 0.0; } | 45 bool hasFrameRate() { return frameRate >= 0.0; } |
46 bool hasWidth() { return width >= 0; } | 46 bool hasWidth() { return width >= 0; } |
47 bool hasHeight() { return height >= 0; } | 47 bool hasHeight() { return height >= 0; } |
| 48 bool hasFocalLengthX() { return focalLengthX >= 0.0; } |
| 49 bool hasFocalLengthY() { return focalLengthY >= 0.0; } |
| 50 bool hasDepthNear() { return depthNear >= 0.0; } |
| 51 bool hasDepthFar() { return depthFar >= 0.0; } |
48 // The variables are read from | 52 // The variables are read from |
49 // MediaStreamTrack::GetSettings only. | 53 // MediaStreamTrack::GetSettings only. |
50 double frameRate = -1.0; | 54 double frameRate = -1.0; |
51 long width = -1; | 55 long width = -1; |
52 long height = -1; | 56 long height = -1; |
53 WebString deviceId; | 57 WebString deviceId; |
| 58 // Media Capture Depth Stream Extensions. |
| 59 double focalLengthX = -1.0; |
| 60 double focalLengthY = -1.0; |
| 61 double depthNear = -1.0; |
| 62 double depthFar = -1.0; |
54 }; | 63 }; |
55 | 64 |
56 class TrackData { | 65 class TrackData { |
57 public: | 66 public: |
58 TrackData() {} | 67 TrackData() {} |
59 virtual ~TrackData() {} | 68 virtual ~TrackData() {} |
60 virtual void getSettings(Settings&) = 0; | 69 virtual void getSettings(Settings&) = 0; |
61 }; | 70 }; |
62 | 71 |
63 enum class ContentHintType { | 72 enum class ContentHintType { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 120 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; |
112 #endif | 121 #endif |
113 | 122 |
114 private: | 123 private: |
115 WebPrivatePtr<MediaStreamComponent> m_private; | 124 WebPrivatePtr<MediaStreamComponent> m_private; |
116 }; | 125 }; |
117 | 126 |
118 } // namespace blink | 127 } // namespace blink |
119 | 128 |
120 #endif // WebMediaStreamTrack_h | 129 #endif // WebMediaStreamTrack_h |
OLD | NEW |