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

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

Issue 2553863003: Parse FlexFEC RTP headers in Call and add integration with BWE. (Closed)
Patch Set: danilchap comments 2. 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_ 10 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_
(...skipping 13 matching lines...) Expand all
24 24
25 namespace rtp { 25 namespace rtp {
26 class Packet { 26 class Packet {
27 public: 27 public:
28 using ExtensionType = RTPExtensionType; 28 using ExtensionType = RTPExtensionType;
29 using ExtensionManager = RtpHeaderExtensionMap; 29 using ExtensionManager = RtpHeaderExtensionMap;
30 static constexpr size_t kMaxExtensionHeaders = 14; 30 static constexpr size_t kMaxExtensionHeaders = 14;
31 31
32 // Parse and copy given buffer into Packet. 32 // Parse and copy given buffer into Packet.
33 bool Parse(const uint8_t* buffer, size_t size); 33 bool Parse(const uint8_t* buffer, size_t size);
34 bool Parse(rtc::ArrayView<const uint8_t> packet);
34 35
35 // Parse and move given buffer into Packet. 36 // Parse and move given buffer into Packet.
36 bool Parse(rtc::CopyOnWriteBuffer packet); 37 bool Parse(rtc::CopyOnWriteBuffer packet);
37 38
38 // Maps parsed extensions to their types to allow use of GetExtension. 39 // Maps parsed extensions to their types to allow use of GetExtension.
39 // Used after parsing when |extensions| can't be provided until base rtp 40 // Used after parsing when |extensions| can't be provided until base rtp
40 // header is parsed. 41 // header is parsed.
41 void IdentifyExtensions(const ExtensionManager* extensions); 42 void IdentifyExtensions(const ExtensionManager* extensions);
42 43
43 // Header. 44 // Header.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 uint16_t offset = 0; 192 uint16_t offset = 0;
192 if (!AllocateExtension(Extension::kId, Extension::kValueSizeBytes, &offset)) 193 if (!AllocateExtension(Extension::kId, Extension::kValueSizeBytes, &offset))
193 return false; 194 return false;
194 memset(WriteAt(offset), 0, Extension::kValueSizeBytes); 195 memset(WriteAt(offset), 0, Extension::kValueSizeBytes);
195 return true; 196 return true;
196 } 197 }
197 } // namespace rtp 198 } // namespace rtp
198 } // namespace webrtc 199 } // namespace webrtc
199 200
200 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_ 201 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698