Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc

Issue 2280703002: Ignore Camera and Flip bits in CVO when parsing video rotation (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return true; 175 return true;
176 case MediaType::AUDIO: 176 case MediaType::AUDIO:
177 case MediaType::DATA: 177 case MediaType::DATA:
178 return false; 178 return false;
179 } 179 }
180 RTC_NOTREACHED(); 180 RTC_NOTREACHED();
181 return false; 181 return false;
182 } 182 }
183 183
184 bool VideoOrientation::Parse(const uint8_t* data, VideoRotation* rotation) { 184 bool VideoOrientation::Parse(const uint8_t* data, VideoRotation* rotation) {
185 *rotation = ConvertCVOByteToVideoRotation(data[0] & 0x03); 185 *rotation = ConvertCVOByteToVideoRotation(data[0]);
186 return true; 186 return true;
187 } 187 }
188 188
189 bool VideoOrientation::Write(uint8_t* data, VideoRotation rotation) { 189 bool VideoOrientation::Write(uint8_t* data, VideoRotation rotation) {
190 data[0] = ConvertVideoRotationToCVOByte(rotation); 190 data[0] = ConvertVideoRotationToCVOByte(rotation);
191 return true; 191 return true;
192 } 192 }
193 193
194 bool VideoOrientation::Parse(const uint8_t* data, uint8_t* value) { 194 bool VideoOrientation::Parse(const uint8_t* data, uint8_t* value) {
195 *value = data[0]; 195 *value = data[0];
196 return true; 196 return true;
197 } 197 }
198 198
199 bool VideoOrientation::Write(uint8_t* data, uint8_t value) { 199 bool VideoOrientation::Write(uint8_t* data, uint8_t value) {
200 data[0] = value; 200 data[0] = value;
201 return true; 201 return true;
202 } 202 }
203 } // namespace webrtc 203 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698