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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_packet.h

Issue 2506373004: RtpPacket::payload() return rtc::ArrayView instead of raw pointer (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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 6981eabc254f09d5314fbf4f875377d38f04ea4c..3f4d5769ba9156d5c399941a2dc0f157256921e1 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet.h
@@ -12,6 +12,7 @@
#include <vector>
+#include "webrtc/base/array_view.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/copyonwritebuffer.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@@ -56,7 +57,7 @@ class Packet {
// Payload.
size_t payload_size() const;
size_t padding_size() const;
- const uint8_t* payload() const;
+ rtc::ArrayView<const uint8_t> payload() const;
// Buffer.
rtc::CopyOnWriteBuffer Buffer() const;

Powered by Google App Engine
This is Rietveld 408576698