diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/media/hls/HLSDecoder.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/hls/HLSDecoder.h')
-rw-r--r-- | dom/media/hls/HLSDecoder.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dom/media/hls/HLSDecoder.h b/dom/media/hls/HLSDecoder.h index 0f65457765..3624a8c3f4 100644 --- a/dom/media/hls/HLSDecoder.h +++ b/dom/media/hls/HLSDecoder.h @@ -47,6 +47,8 @@ class HLSDecoder final : public MediaDecoder { // Called when Exoplayer start to load media. Main thread only. void NotifyLoad(nsCString aMediaUrl); + bool IsHLSDecoder() const override { return true; } + private: friend class HLSResourceCallbacksSupport; @@ -61,8 +63,9 @@ class HLSDecoder final : public MediaDecoder { return true; } - void UpdateCurrentPrincipal(nsCString aMediaUrl); - already_AddRefed<nsIPrincipal> GetContentPrincipal(nsCString aMediaUrl); + void UpdateCurrentPrincipal(nsIURI* aMediaUri); + already_AddRefed<nsIPrincipal> GetContentPrincipal(nsIURI* aMediaUri); + void RecordMediaUsage(nsIURI* aMediaUri); static size_t sAllocatedInstances; // Access only in the main thread. @@ -72,6 +75,9 @@ class HLSDecoder final : public MediaDecoder { java::GeckoHLSResourceWrapper::Callbacks::GlobalRef mJavaCallbacks; RefPtr<HLSResourceCallbacksSupport> mCallbackSupport; nsCOMPtr<nsIPrincipal> mContentPrincipal; + // There can be multiple media files loaded for one HLS content. Use this flag + // to ensure we only record once per content. + bool mUsageRecorded; }; } // namespace mozilla |