| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
| 12 | 12 |
| 13 #include <string.h> | 13 #include <string.h> |
| 14 | 14 |
| 15 #include "webrtc/base/logging.h" | 15 #include "webrtc/base/logging.h" |
| 16 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" | |
| 17 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 16 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
| 18 | 17 |
| 19 namespace webrtc { | 18 namespace webrtc { |
| 20 | 19 |
| 21 RtpData* NullObjectRtpData() { | 20 RtpData* NullObjectRtpData() { |
| 22 static NullRtpData null_rtp_data; | 21 static NullRtpData null_rtp_data; |
| 23 return &null_rtp_data; | 22 return &null_rtp_data; |
| 24 } | 23 } |
| 25 | 24 |
| 26 RtpFeedback* NullObjectRtpFeedback() { | 25 RtpFeedback* NullObjectRtpFeedback() { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 header->extension.hasAbsoluteSendTime = false; | 239 header->extension.hasAbsoluteSendTime = false; |
| 241 header->extension.absoluteSendTime = 0; | 240 header->extension.absoluteSendTime = 0; |
| 242 | 241 |
| 243 // May not be present in packet. | 242 // May not be present in packet. |
| 244 header->extension.hasAudioLevel = false; | 243 header->extension.hasAudioLevel = false; |
| 245 header->extension.voiceActivity = false; | 244 header->extension.voiceActivity = false; |
| 246 header->extension.audioLevel = 0; | 245 header->extension.audioLevel = 0; |
| 247 | 246 |
| 248 // May not be present in packet. | 247 // May not be present in packet. |
| 249 header->extension.hasVideoRotation = false; | 248 header->extension.hasVideoRotation = false; |
| 250 header->extension.videoRotation = kVideoRotation_0; | 249 header->extension.videoRotation = 0; |
| 251 | 250 |
| 252 // May not be present in packet. | 251 // May not be present in packet. |
| 253 header->extension.playout_delay.min_ms = -1; | 252 header->extension.playout_delay.min_ms = -1; |
| 254 header->extension.playout_delay.max_ms = -1; | 253 header->extension.playout_delay.max_ms = -1; |
| 255 | 254 |
| 256 if (X) { | 255 if (X) { |
| 257 /* RTP header extension, RFC 3550. | 256 /* RTP header extension, RFC 3550. |
| 258 0 1 2 3 | 257 0 1 2 3 |
| 259 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 258 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
| 260 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 259 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 LOG(LS_WARNING) | 390 LOG(LS_WARNING) |
| 392 << "Incorrect coordination of video coordination len: " << len; | 391 << "Incorrect coordination of video coordination len: " << len; |
| 393 return; | 392 return; |
| 394 } | 393 } |
| 395 // 0 1 | 394 // 0 1 |
| 396 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | 395 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 |
| 397 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 396 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 398 // | ID | len=0 |0 0 0 0 C F R R| | 397 // | ID | len=0 |0 0 0 0 C F R R| |
| 399 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 398 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 400 header->extension.hasVideoRotation = true; | 399 header->extension.hasVideoRotation = true; |
| 401 header->extension.videoRotation = | 400 header->extension.videoRotation = ptr[0]; |
| 402 ConvertCVOByteToVideoRotation(ptr[0]); | |
| 403 break; | 401 break; |
| 404 } | 402 } |
| 405 case kRtpExtensionTransportSequenceNumber: { | 403 case kRtpExtensionTransportSequenceNumber: { |
| 406 if (len != 1) { | 404 if (len != 1) { |
| 407 LOG(LS_WARNING) << "Incorrect transport sequence number len: " | 405 LOG(LS_WARNING) << "Incorrect transport sequence number len: " |
| 408 << len; | 406 << len; |
| 409 return; | 407 return; |
| 410 } | 408 } |
| 411 // 0 1 2 | 409 // 0 1 2 |
| 412 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 | 410 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 if (*ptr != 0) { | 457 if (*ptr != 0) { |
| 460 return num_zero_bytes; | 458 return num_zero_bytes; |
| 461 } | 459 } |
| 462 ptr++; | 460 ptr++; |
| 463 num_zero_bytes++; | 461 num_zero_bytes++; |
| 464 } | 462 } |
| 465 return num_zero_bytes; | 463 return num_zero_bytes; |
| 466 } | 464 } |
| 467 } // namespace RtpUtility | 465 } // namespace RtpUtility |
| 468 } // namespace webrtc | 466 } // namespace webrtc |
| OLD | NEW |