summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaData.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-24 11:13:33 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-24 11:13:33 +0200
commit579881ffb4aa0b145c793825cd1b0628e7cd6cdc (patch)
tree65d59fc6b73f120ac1bc2214d4a8442421076b04 /dom/media/MediaData.h
parenta02c44648a3f7d6f3904eebba026ce5e6f781bef (diff)
parentf71c04d814416ebf52dd54109f2d04f1cbd397c0 (diff)
downloadUXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar
UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar.gz
UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar.lz
UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar.xz
UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.zip
Merge branch 'master' into Sync-weave
Diffstat (limited to 'dom/media/MediaData.h')
-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;