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

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: Update unittests 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_cvo.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698