Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/rtp_packet.h |
| diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet.h b/webrtc/modules/rtp_rtcp/source/rtp_packet.h |
| index 75c73cfbcc92ccb07f7a1331a6e6b3345f79d432..293e12b5ee8aeaef6a599b720c2c0d1c80635b7e 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtp_packet.h |
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_packet.h |
| @@ -95,6 +95,19 @@ class Packet { |
| template <typename Extension> |
| bool ReserveExtension(); |
| + bool HasRawExtension(int id) const; |
|
nisse-webrtc
2017/04/03 09:38:00
|id| is the numerical value used on the wire (and
danilchap
2017/04/03 10:57:00
Failed to find verbose enough argument name, so ad
|
| + |
| + // Returns place where extension with |id| is stored. |
| + // Returns empty arrayview if extension is not present. |
|
nisse-webrtc
2017/04/03 09:38:00
The return convention makes sense, assuming that n
danilchap
2017/04/03 10:57:00
Yes, extension is not allowed to have 0 length.
|
| + rtc::ArrayView<const uint8_t> GetRawExtension(int id) const; |
| + |
| + // Allocates and store header extension. Returns true on success. |
| + bool SetRawExtension(int id, rtc::ArrayView<const uint8_t> data); |
| + |
| + // Allocates and returns place to store rtp header extension. |
| + // Returns empty arrayview on failure. |
| + rtc::ArrayView<uint8_t> AllocateRawExtension(int id, size_t length); |
| + |
| // Reserve size_bytes for payload. Returns nullptr on failure. |
| uint8_t* SetPayloadSize(size_t size_bytes); |
| // Same as SetPayloadSize but doesn't guarantee to keep current payload. |