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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_utility.h

Issue 2528993002: Revert of Remove RTPPayloadStrategy and simplify RTPPayloadRegistry (Closed)
Patch Set: Created 4 years 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) 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 18 matching lines...) Expand all
29 ReceiveStatistics* NullObjectReceiveStatistics(); 29 ReceiveStatistics* NullObjectReceiveStatistics();
30 30
31 namespace RtpUtility { 31 namespace RtpUtility {
32 32
33 struct Payload { 33 struct Payload {
34 char name[RTP_PAYLOAD_NAME_SIZE]; 34 char name[RTP_PAYLOAD_NAME_SIZE];
35 bool audio; 35 bool audio;
36 PayloadUnion typeSpecific; 36 PayloadUnion typeSpecific;
37 }; 37 };
38 38
39 typedef std::map<int8_t, Payload*> PayloadTypeMap;
40
39 bool StringCompare(const char* str1, const char* str2, const uint32_t length); 41 bool StringCompare(const char* str1, const char* str2, const uint32_t length);
40 42
41 // Round up to the nearest size that is a multiple of 4. 43 // Round up to the nearest size that is a multiple of 4.
42 size_t Word32Align(size_t size); 44 size_t Word32Align(size_t size);
43 45
44 class RtpHeaderParser { 46 class RtpHeaderParser {
45 public: 47 public:
46 RtpHeaderParser(const uint8_t* rtpData, size_t rtpDataLength); 48 RtpHeaderParser(const uint8_t* rtpData, size_t rtpDataLength);
47 ~RtpHeaderParser(); 49 ~RtpHeaderParser();
48 50
49 bool RTCP() const; 51 bool RTCP() const;
50 bool ParseRtcp(RTPHeader* header) const; 52 bool ParseRtcp(RTPHeader* header) const;
51 bool Parse(RTPHeader* parsedPacket, 53 bool Parse(RTPHeader* parsedPacket,
52 RtpHeaderExtensionMap* ptrExtensionMap = nullptr) const; 54 RtpHeaderExtensionMap* ptrExtensionMap = nullptr) const;
53 55
54 private: 56 private:
55 void ParseOneByteExtensionHeader(RTPHeader* parsedPacket, 57 void ParseOneByteExtensionHeader(RTPHeader* parsedPacket,
56 const RtpHeaderExtensionMap* ptrExtensionMap, 58 const RtpHeaderExtensionMap* ptrExtensionMap,
57 const uint8_t* ptrRTPDataExtensionEnd, 59 const uint8_t* ptrRTPDataExtensionEnd,
58 const uint8_t* ptr) const; 60 const uint8_t* ptr) const;
59 61
60 const uint8_t* const _ptrRTPDataBegin; 62 const uint8_t* const _ptrRTPDataBegin;
61 const uint8_t* const _ptrRTPDataEnd; 63 const uint8_t* const _ptrRTPDataEnd;
62 }; 64 };
63 } // namespace RtpUtility 65 } // namespace RtpUtility
64 } // namespace webrtc 66 } // namespace webrtc
65 67
66 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ 68 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h ('k') | webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698