summaryrefslogtreecommitdiffstats
path: root/dom/media
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-08 21:11:58 -0500
committertrav90 <travawine@palemoon.org>2018-10-08 21:11:58 -0500
commit2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930 (patch)
tree3a2ad31b7eea082fa1072d0a98827613dfb5de74 /dom/media
parent5a83ed9ebacfa2bd653953b359dd5456817b03c3 (diff)
downloadUXP-2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930.tar
UXP-2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930.tar.gz
UXP-2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930.tar.lz
UXP-2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930.tar.xz
UXP-2a00bf1262c48b5f90b8ff2ed81ef4b0bb97e930.zip
Add Span support to MediaRawData
Diffstat (limited to 'dom/media')
-rw-r--r--dom/media/MediaData.h3
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;