Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 | 41 | 
| 42 class WebMediaStreamTrack { | 42 class WebMediaStreamTrack { | 
| 43 public: | 43 public: | 
| 44 enum class FacingMode { None, User, Environment, Left, Right }; | 44 enum class FacingMode { None, User, Environment, Left, Right }; | 
| 45 | 45 | 
| 46 struct Settings { | 46 struct Settings { | 
| 47 bool hasFrameRate() { return frameRate >= 0.0; } | 47 bool hasFrameRate() { return frameRate >= 0.0; } | 
| 48 bool hasWidth() { return width >= 0; } | 48 bool hasWidth() { return width >= 0; } | 
| 49 bool hasHeight() { return height >= 0; } | 49 bool hasHeight() { return height >= 0; } | 
| 50 bool hasFacingMode() { return facingMode != FacingMode::None; } | 50 bool hasFacingMode() { return facingMode != FacingMode::None; } | 
| 51 bool hasVideoKind() { return !videoKind.isNull(); } | |
| 
 
kinuko
2017/02/07 04:55:49
nit: all of these could be const methods
 
aleksandar.stojiljkovic
2017/02/07 11:33:49
Done.
 
 | |
| 51 // The variables are read from | 52 // The variables are read from | 
| 52 // MediaStreamTrack::GetSettings only. | 53 // MediaStreamTrack::GetSettings only. | 
| 53 double frameRate = -1.0; | 54 double frameRate = -1.0; | 
| 54 long width = -1; | 55 long width = -1; | 
| 55 long height = -1; | 56 long height = -1; | 
| 56 WebString deviceId; | 57 WebString deviceId; | 
| 57 FacingMode facingMode = FacingMode::None; | 58 FacingMode facingMode = FacingMode::None; | 
| 59 // Media Capture Depth Stream Extensions. | |
| 60 WebString videoKind; | |
| 58 }; | 61 }; | 
| 59 | 62 | 
| 60 class TrackData { | 63 class TrackData { | 
| 61 public: | 64 public: | 
| 62 TrackData() {} | 65 TrackData() {} | 
| 63 virtual ~TrackData() {} | 66 virtual ~TrackData() {} | 
| 64 virtual void getSettings(Settings&) = 0; | 67 virtual void getSettings(Settings&) = 0; | 
| 65 }; | 68 }; | 
| 66 | 69 | 
| 67 enum class ContentHintType { | 70 enum class ContentHintType { | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 118 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 
| 116 #endif | 119 #endif | 
| 117 | 120 | 
| 118 private: | 121 private: | 
| 119 WebPrivatePtr<MediaStreamComponent> m_private; | 122 WebPrivatePtr<MediaStreamComponent> m_private; | 
| 120 }; | 123 }; | 
| 121 | 124 | 
| 122 } // namespace blink | 125 } // namespace blink | 
| 123 | 126 | 
| 124 #endif // WebMediaStreamTrack_h | 127 #endif // WebMediaStreamTrack_h | 
| OLD | NEW |