Bug 1546655 - Switch to NullableTimeUnit where applicable in DecodedStream. r=jya a=jcristau
authorAndreas Pehrson <apehrson@mozilla.com>
Wed, 22 May 2019 12:46:17 +0000
changeset 536572 2a54b1e72baea2b593c2e46722ab97629fec8e2a
parent 536571 083d8b196e64e7d0b4b67272abc4788630ef0f47
child 536573 facb1c6c89a56ef8d71602a4e8a9b8553e771223
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, jcristau
bugs1546655
milestone68.0
Bug 1546655 - Switch to NullableTimeUnit where applicable in DecodedStream. r=jya a=jcristau DecodedStream is already using this for mStartTime. Depends on D32109 Differential Revision: https://phabricator.services.mozilla.com/D32110
dom/media/mediasink/DecodedStream.cpp
--- a/dom/media/mediasink/DecodedStream.cpp
+++ b/dom/media/mediasink/DecodedStream.cpp
@@ -17,16 +17,17 @@
 #include "mozilla/AbstractThread.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/SyncRunnable.h"
 #include "mozilla/gfx/Point.h"
 #include "nsProxyRelease.h"
 
 namespace mozilla {
 
+using media::NullableTimeUnit;
 using media::TimeUnit;
 
 /*
  * A container class to make it easier to pass the playback info all the
  * way to DecodedStreamGraphListener from DecodedStream.
  */
 struct PlaybackInfoInit {
   TimeUnit mStartTime;
@@ -270,21 +271,21 @@ class DecodedStreamData {
   StreamTime mStreamAudioWritten;
   // mNextAudioTime is the end timestamp for the last packet sent to the stream.
   // Therefore audio packets starting at or after this time need to be copied
   // to the output stream.
   TimeUnit mNextAudioTime;
   // mLastVideoStartTime is the start timestamp for the last packet sent to the
   // stream. Therefore video packets starting after this time need to be copied
   // to the output stream.
-  Maybe<TimeUnit> mLastVideoStartTime;
+  NullableTimeUnit mLastVideoStartTime;
   // mLastVideoEndTime is the end timestamp for the last packet sent to the
   // stream. It is used to adjust durations of chunks sent to the output stream
   // when there are overlaps in VideoData.
-  Maybe<TimeUnit> mLastVideoEndTime;
+  NullableTimeUnit mLastVideoEndTime;
   // The timestamp of the last frame, so we can ensure time never goes
   // backwards.
   TimeStamp mLastVideoTimeStamp;
   // The last video image sent to the stream. Useful if we need to replicate
   // the image.
   RefPtr<layers::Image> mLastVideoImage;
   gfx::IntSize mLastVideoImageDisplaySize;
   bool mHaveSentFinishAudio;