summaryrefslogtreecommitdiffstats
path: root/dom/media/mediasource/MediaSourceDemuxer.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/media/mediasource/MediaSourceDemuxer.h
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/mediasource/MediaSourceDemuxer.h')
-rw-r--r--dom/media/mediasource/MediaSourceDemuxer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/dom/media/mediasource/MediaSourceDemuxer.h b/dom/media/mediasource/MediaSourceDemuxer.h
index 177aae769b..fa25878af9 100644
--- a/dom/media/mediasource/MediaSourceDemuxer.h
+++ b/dom/media/mediasource/MediaSourceDemuxer.h
@@ -101,13 +101,16 @@ class MediaSourceDemuxer : public MediaDataDemuxer,
class MediaSourceTrackDemuxer
: public MediaTrackDemuxer,
- public DecoderDoctorLifeLogger<MediaSourceTrackDemuxer> {
+ public DecoderDoctorLifeLogger<MediaSourceTrackDemuxer>,
+ public SingleWriterLockOwner {
public:
MediaSourceTrackDemuxer(MediaSourceDemuxer* aParent,
TrackInfo::TrackType aType,
TrackBuffersManager* aManager)
MOZ_REQUIRES(aParent->mMutex);
+ bool OnWritingThread() const override { return OnTaskQueue(); }
+
UniquePtr<TrackInfo> GetInfo() const override;
RefPtr<SeekPromise> Seek(const media::TimeUnit& aTime) override;
@@ -146,12 +149,12 @@ class MediaSourceTrackDemuxer
TrackInfo::TrackType mType;
// Mutex protecting members below accessed from multiple threads.
- Mutex mMutex MOZ_UNANNOTATED;
- media::TimeUnit mNextRandomAccessPoint;
+ MutexSingleWriter mMutex;
+ media::TimeUnit mNextRandomAccessPoint MOZ_GUARDED_BY(mMutex);
// Would be accessed in MFR's demuxer proxy task queue and TaskQueue, and
// only be set on the TaskQueue. It can be accessed while on TaskQueue without
// the need for the lock.
- RefPtr<TrackBuffersManager> mManager;
+ RefPtr<TrackBuffersManager> mManager MOZ_GUARDED_BY(mMutex);
// Only accessed on TaskQueue
Maybe<RefPtr<MediaRawData>> mNextSample;