diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/media/MediaFormatReader.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/MediaFormatReader.h')
-rw-r--r-- | dom/media/MediaFormatReader.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/dom/media/MediaFormatReader.h b/dom/media/MediaFormatReader.h index fcc3f20036..5c4e04172d 100644 --- a/dom/media/MediaFormatReader.h +++ b/dom/media/MediaFormatReader.h @@ -21,6 +21,7 @@ # include "mozilla/StateMirroring.h" # include "mozilla/StaticPrefs_media.h" # include "mozilla/TaskQueue.h" +# include "mozilla/TimeStamp.h" # include "mozilla/ThreadSafeWeakPtr.h" # include "mozilla/dom/MediaDebugInfoBinding.h" @@ -370,7 +371,7 @@ class MediaFormatReader final mCodecName(""), mUpdateScheduled(false), mDemuxEOS(false), - mWaitingForData(false), + mWaitingForDataStartTime(Nothing()), mWaitingForKey(false), mReceivedNewData(false), mFlushing(false), @@ -426,7 +427,7 @@ class MediaFormatReader final // Only accessed from reader's task queue. bool mUpdateScheduled; bool mDemuxEOS; - bool mWaitingForData; + Maybe<TimeStamp> mWaitingForDataStartTime; bool mWaitingForKey; bool mReceivedNewData; @@ -446,7 +447,7 @@ class MediaFormatReader final bool IsWaitingForData() const { MOZ_ASSERT(mOwner->OnTaskQueue()); - return mWaitingForData; + return !!mWaitingForDataStartTime; } bool IsWaitingForKey() const { @@ -583,7 +584,7 @@ class MediaFormatReader final void ResetState() { MOZ_ASSERT(mOwner->OnTaskQueue()); mDemuxEOS = false; - mWaitingForData = false; + mWaitingForDataStartTime.reset(); mQueuedSamples.Clear(); mDecodeRequest.DisconnectIfExists(); mDrainRequest.DisconnectIfExists(); @@ -885,6 +886,16 @@ class MediaFormatReader final Maybe<uint64_t> mMediaEngineId; const Maybe<TrackingId> mTrackingId; + + // The start time of reading the metdata and how long does it take. This + // measurement includes the time of downloading media resource over the + // internet. + Maybe<TimeStamp> mReadMetadataStartTime; + TimeDuration mReadMetaDataTime; + + // The total amount of time we have been waiting for the video data due to + // lacking of data. + TimeDuration mTotalWaitingForVideoDataTime; }; } // namespace mozilla |