diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/media/MediaFormatReader.h | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-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/MediaFormatReader.h')
-rw-r--r-- | dom/media/MediaFormatReader.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dom/media/MediaFormatReader.h b/dom/media/MediaFormatReader.h index 5c4e04172d..b29d25db83 100644 --- a/dom/media/MediaFormatReader.h +++ b/dom/media/MediaFormatReader.h @@ -430,6 +430,7 @@ class MediaFormatReader final Maybe<TimeStamp> mWaitingForDataStartTime; bool mWaitingForKey; bool mReceivedNewData; + UniquePtr<PerformanceRecorderMulti<PlaybackStage>> mDecodePerfRecorder; // Pending seek. MozPromiseRequestHolder<MediaTrackDemuxer::SeekPromise> mSeekRequest; @@ -474,6 +475,9 @@ class MediaFormatReader final mDrainState = DrainState::DrainRequested; } + void StartRecordDecodingPerf(const TrackType aTrack, + const MediaRawData* aSample); + // Track decoding error and fail when we hit the limit. uint32_t mNumOfConsecutiveDecodingError; uint32_t mMaxConsecutiveDecodingError; @@ -552,7 +556,7 @@ class MediaFormatReader final // Rejecting the promise will stop the reader from decoding ahead. virtual bool HasPromise() const = 0; virtual void RejectPromise(const MediaResult& aError, - const char* aMethodName) = 0; + StaticString aMethodName) = 0; // Clear track demuxer related data. void ResetDemuxer() { @@ -688,20 +692,20 @@ class MediaFormatReader final bool HasPromise() const override { return mHasPromise; } - RefPtr<DataPromise<Type>> EnsurePromise(const char* aMethodName) { + RefPtr<DataPromise<Type>> EnsurePromise(StaticString aMethodName) { MOZ_ASSERT(mOwner->OnTaskQueue()); mHasPromise = true; return mPromise.Ensure(aMethodName); } - void ResolvePromise(Type* aData, const char* aMethodName) { + void ResolvePromise(Type* aData, StaticString aMethodName) { MOZ_ASSERT(mOwner->OnTaskQueue()); mPromise.Resolve(aData, aMethodName); mHasPromise = false; } void RejectPromise(const MediaResult& aError, - const char* aMethodName) override { + StaticString aMethodName) override { MOZ_ASSERT(mOwner->OnTaskQueue()); mPromise.Reject(aError, aMethodName); mHasPromise = false; |