diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp')
-rw-r--r-- | dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp index b964036a4a..06b5f7c476 100644 --- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp +++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp @@ -114,15 +114,17 @@ void GMPVideoDecoder::Decoded(GMPVideoi420Frame* aDecodedFrame) { RefPtr<VideoData> v = r.unwrap(); MOZ_ASSERT(v); - mPerformanceRecorder.Record(static_cast<int64_t>(decodedFrame->Timestamp()), - [&](DecodeStage& aStage) { - aStage.SetImageFormat(DecodeStage::YUV420P); - aStage.SetResolution(decodedFrame->Width(), - decodedFrame->Height()); - aStage.SetYUVColorSpace(b.mYUVColorSpace); - aStage.SetColorDepth(b.mColorDepth); - aStage.SetColorRange(b.mColorRange); - }); + mPerformanceRecorder.Record( + static_cast<int64_t>(decodedFrame->Timestamp()), + [&](DecodeStage& aStage) { + aStage.SetImageFormat(DecodeStage::YUV420P); + aStage.SetResolution(decodedFrame->Width(), decodedFrame->Height()); + aStage.SetYUVColorSpace(b.mYUVColorSpace); + aStage.SetColorDepth(b.mColorDepth); + aStage.SetColorRange(b.mColorRange); + aStage.SetStartTimeAndEndTime(v->mTime.ToMicroseconds(), + v->GetEndTime().ToMicroseconds()); + }); if (mReorderFrames) { mReorderQueue.Push(std::move(v)); @@ -130,11 +132,11 @@ void GMPVideoDecoder::Decoded(GMPVideoi420Frame* aDecodedFrame) { mUnorderedData.AppendElement(std::move(v)); } - if (mSamples.IsEmpty()) { - // If we have no remaining samples in the table, then we have processed - // all outstanding decode requests. - ProcessReorderQueue(mDecodePromise, __func__); - } + if (mSamples.IsEmpty()) { + // If we have no remaining samples in the table, then we have processed + // all outstanding decode requests. + ProcessReorderQueue(mDecodePromise, __func__); + } } void GMPVideoDecoder::ReceivedDecodedReferenceFrame(const uint64_t aPictureId) { @@ -201,7 +203,7 @@ void GMPVideoDecoder::Terminated() { } void GMPVideoDecoder::ProcessReorderQueue( - MozPromiseHolder<DecodePromise>& aPromise, const char* aMethodName) { + MozPromiseHolder<DecodePromise>& aPromise, StaticString aMethodName) { if (aPromise.IsEmpty()) { return; } |