summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaDecoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /dom/media/MediaDecoder.h
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/MediaDecoder.h')
-rw-r--r--dom/media/MediaDecoder.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h
index f2f10a67c6..a5494e9a84 100644
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -207,6 +207,20 @@ class MediaDecoder : public DecoderDoctorLifeLogger<MediaDecoder> {
// not connected to streams created by captureStreamUntilEnded.
enum class OutputCaptureState { Capture, Halt, None };
+ const char* OutputCaptureStateToStr(OutputCaptureState aState) const {
+ switch (aState) {
+ case OutputCaptureState::Capture:
+ return "Capture";
+ case OutputCaptureState::Halt:
+ return "Halt";
+ case OutputCaptureState::None:
+ return "None";
+ default:
+ MOZ_ASSERT_UNREACHABLE("Not defined state!");
+ return "Not-defined";
+ }
+ }
+
// Set the output capture state of this decoder.
// @param aState Capture: Output is captured into output tracks, and
// aDummyTrack must be provided.
@@ -742,6 +756,12 @@ class MediaDecoder : public DecoderDoctorLifeLogger<MediaDecoder> {
bool mShouldDelaySeek = false;
Maybe<SeekTarget> mDelayedSeekTarget;
+# ifdef MOZ_WMF_MEDIA_ENGINE
+ // True if we've ever recreated a new state machine due to the previous state
+ // didn't support the media format or key system.
+ bool mStateMachineRecreated = false;
+# endif
+
public:
Canonical<double>& CanonicalVolume() { return mVolume; }
Canonical<bool>& CanonicalPreservesPitch() { return mPreservesPitch; }
@@ -815,6 +835,11 @@ class MediaDecoder : public DecoderDoctorLifeLogger<MediaDecoder> {
// consistent with the previous destroyed one.
bool mPendingStatusUpdateForNewlyCreatedStateMachine = false;
# endif
+
+ // The time of creating the media decoder state machine, it's used to record
+ // the probe for measuring the first video frame loaded time. Reset after
+ // reporting the measurement to avoid a dulpicated report.
+ Maybe<TimeStamp> mMDSMCreationTime;
};
} // namespace mozilla