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/source/byte_io.h" | 16 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 | 19 |
20 RtpData* NullObjectRtpData() { | 20 RtpData* NullObjectRtpData() { |
21 static NullRtpData null_rtp_data; | 21 static NullRtpData null_rtp_data; |
22 return &null_rtp_data; | 22 return &null_rtp_data; |
23 } | 23 } |
24 | 24 |
25 RtpFeedback* NullObjectRtpFeedback() { | 25 RtpFeedback* NullObjectRtpFeedback() { |
26 static NullRtpFeedback null_rtp_feedback; | 26 static NullRtpFeedback null_rtp_feedback; |
27 return &null_rtp_feedback; | 27 return &null_rtp_feedback; |
28 } | 28 } |
29 | 29 |
30 RtpAudioFeedback* NullObjectRtpAudioFeedback() { | |
31 static NullRtpAudioFeedback null_rtp_audio_feedback; | |
32 return &null_rtp_audio_feedback; | |
33 } | |
34 | |
35 ReceiveStatistics* NullObjectReceiveStatistics() { | 30 ReceiveStatistics* NullObjectReceiveStatistics() { |
36 static NullReceiveStatistics null_receive_statistics; | 31 static NullReceiveStatistics null_receive_statistics; |
37 return &null_receive_statistics; | 32 return &null_receive_statistics; |
38 } | 33 } |
39 | 34 |
40 namespace RtpUtility { | 35 namespace RtpUtility { |
41 | 36 |
42 enum { | 37 enum { |
43 kRtcpExpectedVersion = 2, | 38 kRtcpExpectedVersion = 2, |
44 kRtcpMinHeaderLength = 4, | 39 kRtcpMinHeaderLength = 4, |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 if (*ptr != 0) { | 427 if (*ptr != 0) { |
433 return num_zero_bytes; | 428 return num_zero_bytes; |
434 } | 429 } |
435 ptr++; | 430 ptr++; |
436 num_zero_bytes++; | 431 num_zero_bytes++; |
437 } | 432 } |
438 return num_zero_bytes; | 433 return num_zero_bytes; |
439 } | 434 } |
440 } // namespace RtpUtility | 435 } // namespace RtpUtility |
441 } // namespace webrtc | 436 } // namespace webrtc |
OLD | NEW |