summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaDecoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/media/MediaDecoder.h
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/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