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

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

Issue 2766323006: Correcting the amount of padding when send side bwe includes RTP overhead.
Patch Set: update Created 3 years, 8 months 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 uint8_t PayloadType() const; 44 uint8_t PayloadType() const;
45 uint16_t SequenceNumber() const; 45 uint16_t SequenceNumber() const;
46 uint32_t Timestamp() const; 46 uint32_t Timestamp() const;
47 uint32_t Ssrc() const; 47 uint32_t Ssrc() const;
48 std::vector<uint32_t> Csrcs() const; 48 std::vector<uint32_t> Csrcs() const;
49 49
50 // TODO(danilchap): Remove this function when all code update to use RtpPacket 50 // TODO(danilchap): Remove this function when all code update to use RtpPacket
51 // directly. Function is there just for easier backward compatibilty. 51 // directly. Function is there just for easier backward compatibilty.
52 void GetHeader(RTPHeader* header) const; 52 void GetHeader(RTPHeader* header) const;
53 53
54 size_t headers_size() const; 54 virtual size_t headers_size() const;
55 55
56 // Payload. 56 // Payload.
57 size_t payload_size() const; 57 size_t payload_size() const;
58 size_t padding_size() const; 58 size_t padding_size() const;
59 rtc::ArrayView<const uint8_t> payload() const; 59 rtc::ArrayView<const uint8_t> payload() const;
60 60
61 // Buffer. 61 // Buffer.
62 rtc::CopyOnWriteBuffer Buffer() const; 62 rtc::CopyOnWriteBuffer Buffer() const;
63 size_t capacity() const; 63 size_t capacity() const;
64 size_t size() const; 64 virtual size_t size() const;
65 const uint8_t* data() const; 65 const uint8_t* data() const;
66 size_t FreeCapacity() const; 66 size_t FreeCapacity() const;
67 size_t MaxPayloadSize() const; 67 size_t MaxPayloadSize() const;
68 68
69 // Reset fields and buffer. 69 // Reset fields and buffer.
70 void Clear(); 70 void Clear();
71 71
72 // Header setters. 72 // Header setters.
73 void CopyHeaderFrom(const Packet& packet); 73 void CopyHeaderFrom(const Packet& packet);
74 void SetMarker(bool marker_bit); 74 void SetMarker(bool marker_bit);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 uint16_t offset = 0; 186 uint16_t offset = 0;
187 if (!AllocateExtension(Extension::kId, Extension::kValueSizeBytes, &offset)) 187 if (!AllocateExtension(Extension::kId, Extension::kValueSizeBytes, &offset))
188 return false; 188 return false;
189 memset(WriteAt(offset), 0, Extension::kValueSizeBytes); 189 memset(WriteAt(offset), 0, Extension::kValueSizeBytes);
190 return true; 190 return true;
191 } 191 }
192 } // namespace rtp 192 } // namespace rtp
193 } // namespace webrtc 193 } // namespace webrtc
194 194
195 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_ 195 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698