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 | 30203f696adad92f70c21a02c2b27c0f4ee3689a (patch) | |
tree | 3a2ad31b7eea082fa1072d0a98827613dfb5de74 | |
parent | 174c2a75aad8cb869f57dbab161e14f89fa181fe (diff) | |
download | aura-central-30203f696adad92f70c21a02c2b27c0f4ee3689a.tar.gz |
Add Span support to MediaRawData
-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 a79aac6ed..905b4c1d9 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; |