summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaData.h
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-10-10 06:37:08 +0200
committerGitHub <noreply@github.com>2018-10-10 06:37:08 +0200
commitea5b5766a92bc13fc7eb9dc484e133a7a0638d50 (patch)
treea986c0e98d6c437ee1da1cc0ed0e318cf2132942 /dom/media/MediaData.h
parent237f05bcdc3e5e1316b5454a43ffaecd4ff12577 (diff)
parent81c39ba87667566a83febdc8c22e300ea8313897 (diff)
downloadUXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar
UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar.gz
UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar.lz
UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar.xz
UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.zip
Merge pull request #830 from trav90/media-work
Several WebM/VPX fixes
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;