summaryrefslogtreecommitdiffstats
path: root/dom/media/platforms/agnostic
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/platforms/agnostic')
-rw-r--r--dom/media/platforms/agnostic/AOMDecoder.cpp2
-rw-r--r--dom/media/platforms/agnostic/DAV1DDecoder.cpp2
-rw-r--r--dom/media/platforms/agnostic/TheoraDecoder.cpp2
-rw-r--r--dom/media/platforms/agnostic/VPXDecoder.cpp2
-rw-r--r--dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp32
-rw-r--r--dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h2
6 files changed, 26 insertions, 16 deletions
diff --git a/dom/media/platforms/agnostic/AOMDecoder.cpp b/dom/media/platforms/agnostic/AOMDecoder.cpp
index cb7f784848..284c209d51 100644
--- a/dom/media/platforms/agnostic/AOMDecoder.cpp
+++ b/dom/media/platforms/agnostic/AOMDecoder.cpp
@@ -284,6 +284,8 @@ RefPtr<MediaDataDecoder::DecodePromise> AOMDecoder::ProcessDecode(
aStage.SetYUVColorSpace(b.mYUVColorSpace);
aStage.SetColorRange(b.mColorRange);
aStage.SetColorDepth(b.mColorDepth);
+ aStage.SetStartTimeAndEndTime(v->mTime.ToMicroseconds(),
+ v->GetEndTime().ToMicroseconds());
});
results.AppendElement(std::move(v));
}
diff --git a/dom/media/platforms/agnostic/DAV1DDecoder.cpp b/dom/media/platforms/agnostic/DAV1DDecoder.cpp
index e93ceb27a1..e7339dd8a9 100644
--- a/dom/media/platforms/agnostic/DAV1DDecoder.cpp
+++ b/dom/media/platforms/agnostic/DAV1DDecoder.cpp
@@ -352,6 +352,8 @@ Result<already_AddRefed<VideoData>, MediaResult> DAV1DDecoder::ConstructImage(
aStage.SetYUVColorSpace(b.mYUVColorSpace);
aStage.SetColorRange(b.mColorRange);
aStage.SetColorDepth(b.mColorDepth);
+ aStage.SetStartTimeAndEndTime(aPicture.m.timestamp,
+ aPicture.m.timestamp + aPicture.m.duration);
});
return VideoData::CreateAndCopyData(
diff --git a/dom/media/platforms/agnostic/TheoraDecoder.cpp b/dom/media/platforms/agnostic/TheoraDecoder.cpp
index d60093a204..30dde14697 100644
--- a/dom/media/platforms/agnostic/TheoraDecoder.cpp
+++ b/dom/media/platforms/agnostic/TheoraDecoder.cpp
@@ -236,6 +236,8 @@ RefPtr<MediaDataDecoder::DecodePromise> TheoraDecoder::ProcessDecode(
aStage.SetYUVColorSpace(b.mYUVColorSpace);
aStage.SetColorRange(b.mColorRange);
aStage.SetColorDepth(b.mColorDepth);
+ aStage.SetStartTimeAndEndTime(v->mTime.ToMicroseconds(),
+ v->GetEndTime().ToMicroseconds());
});
});
diff --git a/dom/media/platforms/agnostic/VPXDecoder.cpp b/dom/media/platforms/agnostic/VPXDecoder.cpp
index 1b07606bd5..637c6a6452 100644
--- a/dom/media/platforms/agnostic/VPXDecoder.cpp
+++ b/dom/media/platforms/agnostic/VPXDecoder.cpp
@@ -272,6 +272,8 @@ RefPtr<MediaDataDecoder::DecodePromise> VPXDecoder::ProcessDecode(
aStage.SetYUVColorSpace(b.mYUVColorSpace);
aStage.SetColorRange(b.mColorRange);
aStage.SetColorDepth(b.mColorDepth);
+ aStage.SetStartTimeAndEndTime(v->mTime.ToMicroseconds(),
+ v->GetEndTime().ToMicroseconds());
});
});
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;
}
diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h
index 1f0f59c685..6f831e5fbc 100644
--- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h
+++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.h
@@ -72,7 +72,7 @@ class GMPVideoDecoder final : public MediaDataDecoder,
virtual GMPUniquePtr<GMPVideoEncodedFrame> CreateFrame(MediaRawData* aSample);
virtual const VideoInfo& GetConfig() const;
void ProcessReorderQueue(MozPromiseHolder<DecodePromise>& aPromise,
- const char* aMethodName);
+ StaticString aMethodName);
private:
~GMPVideoDecoder() = default;