diff options
author | trav90 <travawine@palemoon.org> | 2018-10-08 21:11:58 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-08 21:11:58 -0500 |
commit | 2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930 (patch) | |
tree | 3a2ad31b7eea082fa1072d0a98827613dfb5de74 /dom | |
parent | 5a83ed9ebacfa2bd653953b359dd5456817b03c3 (diff) | |
download | uxp-2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930.tar.gz |
Add Span support to MediaRawData
Diffstat (limited to 'dom')
-rw-r--r-- | dom/media/MediaData.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<const uint8_t>() { return MakeSpan(Data(), Size()); } const CryptoSample& mCrypto; RefPtr<MediaByteBuffer> mExtraData; |