diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/media/hls/HLSDecoder.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 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 |