OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return true; | 170 return true; |
171 case MediaType::AUDIO: | 171 case MediaType::AUDIO: |
172 case MediaType::DATA: | 172 case MediaType::DATA: |
173 return false; | 173 return false; |
174 } | 174 } |
175 RTC_NOTREACHED(); | 175 RTC_NOTREACHED(); |
176 return false; | 176 return false; |
177 } | 177 } |
178 | 178 |
179 bool VideoOrientation::Parse(const uint8_t* data, VideoRotation* rotation) { | 179 bool VideoOrientation::Parse(const uint8_t* data, VideoRotation* rotation) { |
180 *rotation = ConvertCVOByteToVideoRotation(data[0] & 0x03); | 180 *rotation = ConvertCVOByteToVideoRotation(data[0]); |
181 return true; | 181 return true; |
182 } | 182 } |
183 | 183 |
184 bool VideoOrientation::Write(uint8_t* data, VideoRotation rotation) { | 184 bool VideoOrientation::Write(uint8_t* data, VideoRotation rotation) { |
185 data[0] = ConvertVideoRotationToCVOByte(rotation); | 185 data[0] = ConvertVideoRotationToCVOByte(rotation); |
186 return true; | 186 return true; |
187 } | 187 } |
188 | 188 |
189 bool VideoOrientation::Parse(const uint8_t* data, uint8_t* value) { | 189 bool VideoOrientation::Parse(const uint8_t* data, uint8_t* value) { |
190 *value = data[0]; | 190 *value = data[0]; |
191 return true; | 191 return true; |
192 } | 192 } |
193 | 193 |
194 bool VideoOrientation::Write(uint8_t* data, uint8_t value) { | 194 bool VideoOrientation::Write(uint8_t* data, uint8_t value) { |
195 data[0] = value; | 195 data[0] = value; |
196 return true; | 196 return true; |
197 } | 197 } |
198 } // namespace webrtc | 198 } // namespace webrtc |
OLD | NEW |