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 |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 struct Payload | 40 struct Payload |
41 { | 41 { |
42 char name[RTP_PAYLOAD_NAME_SIZE]; | 42 char name[RTP_PAYLOAD_NAME_SIZE]; |
43 bool audio; | 43 bool audio; |
44 PayloadUnion typeSpecific; | 44 PayloadUnion typeSpecific; |
45 }; | 45 }; |
46 | 46 |
47 typedef std::map<int8_t, Payload*> PayloadTypeMap; | 47 typedef std::map<int8_t, Payload*> PayloadTypeMap; |
48 | 48 |
49 // Return the current RTP timestamp from the NTP timestamp | |
50 // returned by the specified clock. | |
51 uint32_t GetCurrentRTP(Clock* clock, uint32_t freq); | |
52 | |
53 // Return the current RTP absolute timestamp. | |
54 uint32_t ConvertNTPTimeToRTP(uint32_t NTPsec, | |
55 uint32_t NTPfrac, | |
56 uint32_t freq); | |
57 | |
58 uint32_t pow2(uint8_t exp); | 49 uint32_t pow2(uint8_t exp); |
59 | 50 |
60 // Returns true if |newTimestamp| is older than |existingTimestamp|. | 51 // Returns true if |newTimestamp| is older than |existingTimestamp|. |
61 // |wrapped| will be set to true if there has been a wraparound between the | 52 // |wrapped| will be set to true if there has been a wraparound between the |
62 // two timestamps. | 53 // two timestamps. |
63 bool OldTimestamp(uint32_t newTimestamp, | 54 bool OldTimestamp(uint32_t newTimestamp, |
64 uint32_t existingTimestamp, | 55 uint32_t existingTimestamp, |
65 bool* wrapped); | 56 bool* wrapped); |
66 | 57 |
67 bool StringCompare(const char* str1, | 58 bool StringCompare(const char* str1, |
(...skipping 24 matching lines...) Expand all Loading... |
92 const uint8_t* ptrRTPDataExtensionEnd, | 83 const uint8_t* ptrRTPDataExtensionEnd, |
93 const uint8_t* ptr) const; | 84 const uint8_t* ptr) const; |
94 | 85 |
95 const uint8_t* const _ptrRTPDataBegin; | 86 const uint8_t* const _ptrRTPDataBegin; |
96 const uint8_t* const _ptrRTPDataEnd; | 87 const uint8_t* const _ptrRTPDataEnd; |
97 }; | 88 }; |
98 } // namespace RtpUtility | 89 } // namespace RtpUtility |
99 } // namespace webrtc | 90 } // namespace webrtc |
100 | 91 |
101 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ | 92 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ |
OLD | NEW |