summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaDecoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/media/MediaDecoder.h
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.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