From 2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930 Mon Sep 17 00:00:00 2001 From: trav90 Date: Mon, 8 Oct 2018 21:11:58 -0500 Subject: Add Span support to MediaRawData --- dom/media/MediaData.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dom') diff --git a/dom/media/MediaData.h b/dom/media/MediaData.h index a79aac6edf..905b4c1d99 100644 --- a/dom/media/MediaData.h +++ b/dom/media/MediaData.h @@ -14,6 +14,7 @@ #include "nsIMemoryReporter.h" #include "SharedBuffer.h" #include "mozilla/RefPtr.h" +#include "mozilla/Span.h" #include "mozilla/UniquePtr.h" #include "mozilla/UniquePtrExtensions.h" #include "nsTArray.h" @@ -631,6 +632,8 @@ public: { return sizeof(*this) + mBuffer.ComputedSizeOfExcludingThis(); } + // Access the buffer as a Span. + operator Span() { return MakeSpan(Data(), Size()); } const CryptoSample& mCrypto; RefPtr mExtraData; -- cgit v1.2.3