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

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

Issue 2524923002: Remove RTPPayloadStrategy and simplify RTPPayloadRegistry (Closed)
Patch Set: Keep old interface public to allow external code to migrate. 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
41 bool StringCompare(const char* str1, const char* str2, const uint32_t length); 39 bool StringCompare(const char* str1, const char* str2, const uint32_t length);
42 40
43 // Round up to the nearest size that is a multiple of 4. 41 // Round up to the nearest size that is a multiple of 4.
44 size_t Word32Align(size_t size); 42 size_t Word32Align(size_t size);
45 43
46 class RtpHeaderParser { 44 class RtpHeaderParser {
47 public: 45 public:
48 RtpHeaderParser(const uint8_t* rtpData, size_t rtpDataLength); 46 RtpHeaderParser(const uint8_t* rtpData, size_t rtpDataLength);
49 ~RtpHeaderParser(); 47 ~RtpHeaderParser();
50 48
51 bool RTCP() const; 49 bool RTCP() const;
52 bool ParseRtcp(RTPHeader* header) const; 50 bool ParseRtcp(RTPHeader* header) const;
53 bool Parse(RTPHeader* parsedPacket, 51 bool Parse(RTPHeader* parsedPacket,
54 RtpHeaderExtensionMap* ptrExtensionMap = nullptr) const; 52 RtpHeaderExtensionMap* ptrExtensionMap = nullptr) const;
55 53
56 private: 54 private:
57 void ParseOneByteExtensionHeader(RTPHeader* parsedPacket, 55 void ParseOneByteExtensionHeader(RTPHeader* parsedPacket,
58 const RtpHeaderExtensionMap* ptrExtensionMap, 56 const RtpHeaderExtensionMap* ptrExtensionMap,
59 const uint8_t* ptrRTPDataExtensionEnd, 57 const uint8_t* ptrRTPDataExtensionEnd,
60 const uint8_t* ptr) const; 58 const uint8_t* ptr) const;
61 59
62 const uint8_t* const _ptrRTPDataBegin; 60 const uint8_t* const _ptrRTPDataBegin;
63 const uint8_t* const _ptrRTPDataEnd; 61 const uint8_t* const _ptrRTPDataEnd;
64 }; 62 };
65 } // namespace RtpUtility 63 } // namespace RtpUtility
66 } // namespace webrtc 64 } // namespace webrtc
67 65
68 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_UTILITY_H_ 66 #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