| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class WebMediaStreamTrack { | 42 class WebMediaStreamTrack { |
| 43 public: | 43 public: |
| 44 enum class FacingMode { kNone, kUser, kEnvironment, kLeft, kRight }; | 44 enum class FacingMode { kNone, kUser, kEnvironment, kLeft, kRight }; |
| 45 | 45 |
| 46 struct Settings { | 46 struct Settings { |
| 47 bool HasFrameRate() const { return frame_rate >= 0.0; } | 47 bool HasFrameRate() const { return frame_rate >= 0.0; } |
| 48 bool HasWidth() const { return width >= 0; } | 48 bool HasWidth() const { return width >= 0; } |
| 49 bool HasHeight() const { return height >= 0; } | 49 bool HasHeight() const { return height >= 0; } |
| 50 bool HasAspectRatio() const { return aspect_ratio >= 0.0; } | 50 bool HasAspectRatio() const { return aspect_ratio >= 0.0; } |
| 51 bool HasFacingMode() const { return facing_mode != FacingMode::kNone; } | 51 bool HasFacingMode() const { return facing_mode != FacingMode::kNone; } |
| 52 bool HasEchoCancellationValue() const { return echo_cancellation >= 0; } |
| 52 bool HasVideoKind() const { return !video_kind.IsNull(); } | 53 bool HasVideoKind() const { return !video_kind.IsNull(); } |
| 53 bool HasFocalLengthX() const { return focal_length_x >= 0.0; } | 54 bool HasFocalLengthX() const { return focal_length_x >= 0.0; } |
| 54 bool HasFocalLengthY() const { return focal_length_y >= 0.0; } | 55 bool HasFocalLengthY() const { return focal_length_y >= 0.0; } |
| 55 bool HasDepthNear() const { return depth_near >= 0.0; } | 56 bool HasDepthNear() const { return depth_near >= 0.0; } |
| 56 bool HasDepthFar() const { return depth_far >= 0.0; } | 57 bool HasDepthFar() const { return depth_far >= 0.0; } |
| 57 // The variables are read from | 58 // The variables are read from |
| 58 // MediaStreamTrack::GetSettings only. | 59 // MediaStreamTrack::GetSettings only. |
| 59 double frame_rate = -1.0; | 60 double frame_rate = -1.0; |
| 60 long width = -1; | 61 long width = -1; |
| 61 long height = -1; | 62 long height = -1; |
| 62 double aspect_ratio = -1.0; | 63 double aspect_ratio = -1.0; |
| 63 WebString device_id; | 64 WebString device_id; |
| 64 FacingMode facing_mode = FacingMode::kNone; | 65 FacingMode facing_mode = FacingMode::kNone; |
| 66 // |echo_cancellation| should be some form of Optional<bool> instead of int, |
| 67 // but none is available for this file. Using -1 to indicate no value. |
| 68 int echo_cancellation = -1; |
| 65 // Media Capture Depth Stream Extensions. | 69 // Media Capture Depth Stream Extensions. |
| 66 WebString video_kind; | 70 WebString video_kind; |
| 67 double focal_length_x = -1.0; | 71 double focal_length_x = -1.0; |
| 68 double focal_length_y = -1.0; | 72 double focal_length_y = -1.0; |
| 69 double depth_near = -1.0; | 73 double depth_near = -1.0; |
| 70 double depth_far = -1.0; | 74 double depth_far = -1.0; |
| 71 }; | 75 }; |
| 72 | 76 |
| 73 class TrackData { | 77 class TrackData { |
| 74 public: | 78 public: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 132 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; |
| 129 #endif | 133 #endif |
| 130 | 134 |
| 131 private: | 135 private: |
| 132 WebPrivatePtr<MediaStreamComponent> private_; | 136 WebPrivatePtr<MediaStreamComponent> private_; |
| 133 }; | 137 }; |
| 134 | 138 |
| 135 } // namespace blink | 139 } // namespace blink |
| 136 | 140 |
| 137 #endif // WebMediaStreamTrack_h | 141 #endif // WebMediaStreamTrack_h |
| OLD | NEW |