Bug 1524890 - P12. Serialise TimeUnit over ipdl. r=mjf
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 23 Feb 2019 09:21:41 +0000
changeset 518682 c3f6ea574cdfcf501513ed10c2f2320f7a47a09c
parent 518681 9b93c2718c181e8f2b7dfc0df6a0032163626300
child 518683 c4e8f8c88edf083314a06318f4eaba78f3ecc943
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1524890
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1524890 - P12. Serialise TimeUnit over ipdl. r=mjf Nicer than passing int64_t directly. Differential Revision: https://phabricator.services.mozilla.com/D20171
dom/media/ipc/MediaIPCUtils.h
dom/media/ipc/PMediaDecoderParams.ipdlh
dom/media/ipc/PRemoteDecoder.ipdl
dom/media/ipc/PVideoDecoder.ipdl
dom/media/ipc/RemoteAudioDecoder.cpp
dom/media/ipc/RemoteDecoderChild.cpp
dom/media/ipc/RemoteDecoderParent.cpp
dom/media/ipc/RemoteDecoderParent.h
dom/media/ipc/RemoteVideoDecoder.cpp
dom/media/ipc/VideoDecoderChild.cpp
dom/media/ipc/VideoDecoderParent.cpp
dom/media/ipc/VideoDecoderParent.h
--- a/dom/media/ipc/MediaIPCUtils.h
+++ b/dom/media/ipc/MediaIPCUtils.h
@@ -2,20 +2,20 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_media_MediaIPCUtils_h
 #define mozilla_dom_media_MediaIPCUtils_h
 
+#include "PlatformDecoderModule.h"
 #include "ipc/IPCMessageUtils.h"
+#include "mozilla/GfxMessageUtils.h"
 #include "mozilla/gfx/Rect.h"
-#include "mozilla/GfxMessageUtils.h"
-#include "PlatformDecoderModule.h"
 
 namespace IPC {
 template <>
 struct ParamTraits<mozilla::VideoInfo> {
   typedef mozilla::VideoInfo paramType;
 
   static void Write(Message* aMsg, const paramType& aParam) {
     // TrackInfo
@@ -93,11 +93,57 @@ struct ParamTraits<mozilla::AudioInfo> {
 template <>
 struct ParamTraits<mozilla::MediaDataDecoder::ConversionRequired>
     : public ContiguousEnumSerializerInclusive<
           mozilla::MediaDataDecoder::ConversionRequired,
           mozilla::MediaDataDecoder::ConversionRequired(0),
           mozilla::MediaDataDecoder::ConversionRequired(
               mozilla::MediaDataDecoder::ConversionRequired::kNeedAnnexB)> {};
 
+template <>
+struct ParamTraits<mozilla::media::TimeUnit> {
+  typedef mozilla::media::TimeUnit paramType;
+
+  static void Write(Message* aMsg, const paramType& aParam) {
+    WriteParam(aMsg, aParam.IsValid());
+    WriteParam(aMsg, aParam.IsValid() ? aParam.ToMicroseconds() : 0);
+  }
+
+  static bool Read(const Message* aMsg, PickleIterator* aIter,
+                   paramType* aResult) {
+    bool valid;
+    int64_t value;
+    if (ReadParam(aMsg, aIter, &valid) && ReadParam(aMsg, aIter, &value)) {
+      if (!valid) {
+        *aResult = mozilla::media::TimeUnit::Invalid();
+      } else {
+        *aResult = mozilla::media::TimeUnit::FromMicroseconds(value);
+      }
+      return true;
+    }
+    return false;
+  };
+};
+
+template <>
+struct ParamTraits<mozilla::media::TimeInterval> {
+  typedef mozilla::media::TimeInterval paramType;
+
+  static void Write(Message* aMsg, const paramType& aParam) {
+    WriteParam(aMsg, aParam.mStart);
+    WriteParam(aMsg, aParam.mEnd);
+    WriteParam(aMsg, aParam.mFuzz);
+  }
+
+  static bool Read(const Message* aMsg, PickleIterator* aIter,
+                   paramType* aResult) {
+    if (ReadParam(aMsg, aIter, &aResult->mStart) &&
+        ReadParam(aMsg, aIter, &aResult->mEnd) &&
+        ReadParam(aMsg, aIter, &aResult->mFuzz)) {
+      return true;
+    }
+    return false;
+  }
+};
+
 }  // namespace IPC
 
 #endif  // mozilla_dom_media_MediaIPCUtils_h
--- a/dom/media/ipc/PMediaDecoderParams.ipdlh
+++ b/dom/media/ipc/PMediaDecoderParams.ipdlh
@@ -1,20 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+include "mozilla/dom/MediaIPCUtils.h";
+
+using mozilla::media::TimeUnit from "TimeUnits.h";
+
 namespace mozilla {
 
 struct MediaDataIPDL
 {
   int64_t offset;
-  int64_t time;
-  int64_t timecode;
-  int64_t duration;
+  TimeUnit time;
+  TimeUnit timecode;
+  TimeUnit duration;
   bool keyframe;
 };
 
 struct MediaRawDataIPDL
 {
   MediaDataIPDL base;
   Shmem buffer;
 };
--- a/dom/media/ipc/PRemoteDecoder.ipdl
+++ b/dom/media/ipc/PRemoteDecoder.ipdl
@@ -49,17 +49,17 @@ parent:
   async Init();
 
   async Input(MediaRawDataIPDL data);
 
   async Flush();
   async Drain();
   async Shutdown();
   // To clear the threshold, call with INT64_MIN.
-  async SetSeekThreshold(int64_t time);
+  async SetSeekThreshold(TimeUnit time);
 
   async __delete__();
 
 child:
   async InitComplete(TrackType trackType,
                      nsCString decoderDescription,
                      ConversionRequired conversion);
   async InitFailed(nsresult reason);
--- a/dom/media/ipc/PVideoDecoder.ipdl
+++ b/dom/media/ipc/PVideoDecoder.ipdl
@@ -1,15 +1,13 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-include "mozilla/dom/MediaIPCUtils.h";
-
 include protocol PVideoDecoderManager;
 include PMediaDecoderParams;
 include LayersSurfaces;
 using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
 
 namespace mozilla {
 
 struct VideoDataIPDL
@@ -33,17 +31,17 @@ parent:
   async Init();
 
   async Input(MediaRawDataIPDL data);
 
   async Flush();
   async Drain();
   async Shutdown();
   // To clear the threshold, call with INT64_MIN.
-  async SetSeekThreshold(int64_t time);
+  async SetSeekThreshold(TimeUnit time);
 
   async __delete__();
 
 child:
   async InitComplete(nsCString decoderDescription, bool hardware, nsCString hardwareReason, uint32_t conversion);
   async InitFailed(nsresult reason);
 
   async FlushComplete();
--- a/dom/media/ipc/RemoteAudioDecoder.cpp
+++ b/dom/media/ipc/RemoteAudioDecoder.cpp
@@ -21,21 +21,19 @@ mozilla::ipc::IPCResult RemoteAudioDecod
 
   AlignedAudioBuffer alignedAudioBuffer;
   alignedAudioBuffer.SetLength(aData.buffer().Size<AudioDataValue>());
   PodCopy(alignedAudioBuffer.Data(), aData.buffer().get<AudioDataValue>(),
           alignedAudioBuffer.Length());
 
   DeallocShmem(aData.buffer());
 
-  RefPtr<AudioData> audio =
-      new AudioData(aData.base().offset(),
-                    media::TimeUnit::FromMicroseconds(aData.base().time()),
-                    std::move(alignedAudioBuffer), aData.channels(),
-                    aData.rate(), aData.channelMap());
+  RefPtr<AudioData> audio = new AudioData(
+      aData.base().offset(), aData.base().time(), std::move(alignedAudioBuffer),
+      aData.channels(), aData.rate(), aData.channelMap());
 
   mDecodedData.AppendElement(std::move(audio));
   return IPC_OK();
 }
 
 MediaResult RemoteAudioDecoderChild::InitIPDL(
     const AudioInfo& aAudioInfo,
     const CreateDecoderParams::OptionSet& aOptions) {
@@ -109,18 +107,17 @@ void RemoteAudioDecoderParent::ProcessDe
     if (AllocShmem(audio->Data().Length() * sizeof(AudioDataValue),
                    Shmem::SharedMemory::TYPE_BASIC, &buffer) &&
         audio->Data().Length() == buffer.Size<AudioDataValue>()) {
       PodCopy(buffer.get<AudioDataValue>(), audio->Data().Elements(),
               audio->Data().Length());
     }
 
     RemoteAudioDataIPDL output(
-        MediaDataIPDL(data->mOffset, data->mTime.ToMicroseconds(),
-                      data->mTimecode.ToMicroseconds(),
-                      data->mDuration.ToMicroseconds(), data->mKeyframe),
+        MediaDataIPDL(data->mOffset, data->mTime, data->mTimecode,
+                      data->mDuration, data->mKeyframe),
         audio->mChannels, audio->mRate, audio->mChannelMap, buffer);
 
     Unused << SendOutput(output);
   }
 }
 
 }  // namespace mozilla
--- a/dom/media/ipc/RemoteDecoderChild.cpp
+++ b/dom/media/ipc/RemoteDecoderChild.cpp
@@ -107,19 +107,18 @@ RefPtr<MediaDataDecoder::DecodePromise> 
   if (!AllocShmem(aSample->Size(), Shmem::SharedMemory::TYPE_BASIC, &buffer)) {
     return MediaDataDecoder::DecodePromise::CreateAndReject(
         NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__);
   }
 
   memcpy(buffer.get<uint8_t>(), aSample->Data(), aSample->Size());
 
   MediaRawDataIPDL sample(
-      MediaDataIPDL(aSample->mOffset, aSample->mTime.ToMicroseconds(),
-                    aSample->mTimecode.ToMicroseconds(),
-                    aSample->mDuration.ToMicroseconds(), aSample->mKeyframe),
+      MediaDataIPDL(aSample->mOffset, aSample->mTime, aSample->mTimecode,
+                    aSample->mDuration, aSample->mKeyframe),
       buffer);
   SendInput(sample);
 
   return mDecodePromise.Ensure(__func__);
 }
 
 RefPtr<MediaDataDecoder::FlushPromise> RemoteDecoderChild::Flush() {
   AssertOnManagerThread();
@@ -162,17 +161,17 @@ bool RemoteDecoderChild::IsHardwareAccel
 nsCString RemoteDecoderChild::GetDescriptionName() const {
   AssertOnManagerThread();
   return mDescription;
 }
 
 void RemoteDecoderChild::SetSeekThreshold(const media::TimeUnit& aTime) {
   AssertOnManagerThread();
   if (mCanSend) {
-    SendSetSeekThreshold(aTime.IsValid() ? aTime.ToMicroseconds() : INT64_MIN);
+    SendSetSeekThreshold(aTime);
   }
 }
 
 MediaDataDecoder::ConversionRequired RemoteDecoderChild::NeedsConversion()
     const {
   AssertOnManagerThread();
   return mConversion;
 }
--- a/dom/media/ipc/RemoteDecoderParent.cpp
+++ b/dom/media/ipc/RemoteDecoderParent.cpp
@@ -67,19 +67,19 @@ mozilla::ipc::IPCResult RemoteDecoderPar
   RefPtr<MediaRawData> data = new MediaRawData(aData.buffer().get<uint8_t>(),
                                                aData.buffer().Size<uint8_t>());
   if (aData.buffer().Size<uint8_t>() && !data->Data()) {
     // OOM
     Error(NS_ERROR_OUT_OF_MEMORY);
     return IPC_OK();
   }
   data->mOffset = aData.base().offset();
-  data->mTime = TimeUnit::FromMicroseconds(aData.base().time());
-  data->mTimecode = TimeUnit::FromMicroseconds(aData.base().timecode());
-  data->mDuration = TimeUnit::FromMicroseconds(aData.base().duration());
+  data->mTime = aData.base().time();
+  data->mTimecode = aData.base().timecode();
+  data->mDuration = aData.base().duration();
   data->mKeyframe = aData.base().keyframe();
 
   DeallocShmem(aData.buffer());
 
   RefPtr<RemoteDecoderParent> self = this;
   mDecoder->Decode(data)->Then(
       mManagerTaskQueue, __func__,
       [self, this](const MediaDataDecoder::DecodedData& aResults) {
@@ -131,22 +131,20 @@ mozilla::ipc::IPCResult RemoteDecoderPar
   if (mDecoder) {
     mDecoder->Shutdown();
   }
   mDecoder = nullptr;
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult RemoteDecoderParent::RecvSetSeekThreshold(
-    const int64_t& aTime) {
+    const TimeUnit& aTime) {
   MOZ_ASSERT(!mDestroyed);
   MOZ_ASSERT(OnManagerThread());
-  mDecoder->SetSeekThreshold(aTime == INT64_MIN
-                                 ? TimeUnit::Invalid()
-                                 : TimeUnit::FromMicroseconds(aTime));
+  mDecoder->SetSeekThreshold(aTime);
   return IPC_OK();
 }
 
 void RemoteDecoderParent::ActorDestroy(ActorDestroyReason aWhy) {
   MOZ_ASSERT(!mDestroyed);
   MOZ_ASSERT(OnManagerThread());
   if (mDecoder) {
     mDecoder->Shutdown();
--- a/dom/media/ipc/RemoteDecoderParent.h
+++ b/dom/media/ipc/RemoteDecoderParent.h
@@ -27,17 +27,17 @@ class RemoteDecoderParent : public PRemo
   void Destroy();
 
   // PRemoteDecoderParent
   IPCResult RecvInit();
   IPCResult RecvInput(const MediaRawDataIPDL& aData);
   IPCResult RecvFlush();
   IPCResult RecvDrain();
   IPCResult RecvShutdown();
-  IPCResult RecvSetSeekThreshold(const int64_t& aTime);
+  IPCResult RecvSetSeekThreshold(const media::TimeUnit& aTime);
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  protected:
   virtual ~RemoteDecoderParent();
 
   bool OnManagerThread();
   void Error(const MediaResult& aError);
--- a/dom/media/ipc/RemoteVideoDecoder.cpp
+++ b/dom/media/ipc/RemoteVideoDecoder.cpp
@@ -89,21 +89,19 @@ mozilla::ipc::IPCResult RemoteVideoDecod
     const DecodedOutputIPDL& aDecodedData) {
   AssertOnManagerThread();
   MOZ_ASSERT(aDecodedData.type() == DecodedOutputIPDL::TRemoteVideoDataIPDL);
   const RemoteVideoDataIPDL& aData = aDecodedData.get_RemoteVideoDataIPDL();
 
   RefPtr<Image> image = DeserializeImage(aData.sdBuffer(), aData.frameSize());
 
   RefPtr<VideoData> video = VideoData::CreateFromImage(
-      aData.display(), aData.base().offset(),
-      media::TimeUnit::FromMicroseconds(aData.base().time()),
-      media::TimeUnit::FromMicroseconds(aData.base().duration()), image,
-      aData.base().keyframe(),
-      media::TimeUnit::FromMicroseconds(aData.base().timecode()));
+      aData.display(), aData.base().offset(), aData.base().time(),
+      aData.base().duration(), image, aData.base().keyframe(),
+      aData.base().timecode());
 
   mDecodedData.AppendElement(std::move(video));
   return IPC_OK();
 }
 
 MediaResult RemoteVideoDecoderChild::InitIPDL(
     const VideoInfo& aVideoInfo, float aFramerate,
     const CreateDecoderParams::OptionSet& aOptions) {
@@ -186,17 +184,16 @@ void RemoteVideoDecoderParent::ProcessDe
     if (AllocShmem(image->GetDataSize(), Shmem::SharedMemory::TYPE_BASIC,
                    &buffer) &&
         image->GetDataSize() == buffer.Size<uint8_t>()) {
       sdBuffer.data() = buffer;
       image->BuildSurfaceDescriptorBuffer(sdBuffer);
     }
 
     RemoteVideoDataIPDL output(
-        MediaDataIPDL(data->mOffset, data->mTime.ToMicroseconds(),
-                      data->mTimecode.ToMicroseconds(),
-                      data->mDuration.ToMicroseconds(), data->mKeyframe),
+        MediaDataIPDL(data->mOffset, data->mTime, data->mTimecode,
+                      data->mDuration, data->mKeyframe),
         video->mDisplay, image->GetSize(), sdBuffer, video->mFrameID);
     Unused << SendOutput(output);
   }
 }
 
 }  // namespace mozilla
--- a/dom/media/ipc/VideoDecoderChild.cpp
+++ b/dom/media/ipc/VideoDecoderChild.cpp
@@ -53,21 +53,19 @@ mozilla::ipc::IPCResult VideoDecoderChil
 
   // The Image here creates a TextureData object that takes ownership
   // of the SurfaceDescriptor, and is responsible for making sure that
   // it gets deallocated.
   RefPtr<Image> image =
       new GPUVideoImage(GetManager(), aData.sd(), aData.frameSize());
 
   RefPtr<VideoData> video = VideoData::CreateFromImage(
-      aData.display(), aData.base().offset(),
-      media::TimeUnit::FromMicroseconds(aData.base().time()),
-      media::TimeUnit::FromMicroseconds(aData.base().duration()), image,
-      aData.base().keyframe(),
-      media::TimeUnit::FromMicroseconds(aData.base().timecode()));
+      aData.display(), aData.base().offset(), aData.base().time(),
+      aData.base().duration(), image, aData.base().keyframe(),
+      aData.base().timecode());
 
   mDecodedData.AppendElement(std::move(video));
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult VideoDecoderChild::RecvInputExhausted() {
   AssertOnManagerThread();
   mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
@@ -238,19 +236,18 @@ RefPtr<MediaDataDecoder::DecodePromise> 
   if (!AllocShmem(aSample->Size(), Shmem::SharedMemory::TYPE_BASIC, &buffer)) {
     return MediaDataDecoder::DecodePromise::CreateAndReject(
         NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__);
   }
 
   memcpy(buffer.get<uint8_t>(), aSample->Data(), aSample->Size());
 
   MediaRawDataIPDL sample(
-      MediaDataIPDL(aSample->mOffset, aSample->mTime.ToMicroseconds(),
-                    aSample->mTimecode.ToMicroseconds(),
-                    aSample->mDuration.ToMicroseconds(), aSample->mKeyframe),
+      MediaDataIPDL(aSample->mOffset, aSample->mTime, aSample->mTimecode,
+                    aSample->mDuration, aSample->mKeyframe),
       buffer);
   SendInput(sample);
   return mDecodePromise.Ensure(__func__);
 }
 
 RefPtr<MediaDataDecoder::FlushPromise> VideoDecoderChild::Flush() {
   AssertOnManagerThread();
   mDecodePromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
@@ -298,17 +295,17 @@ bool VideoDecoderChild::IsHardwareAccele
 nsCString VideoDecoderChild::GetDescriptionName() const {
   AssertOnManagerThread();
   return mDescription;
 }
 
 void VideoDecoderChild::SetSeekThreshold(const media::TimeUnit& aTime) {
   AssertOnManagerThread();
   if (mCanSend) {
-    SendSetSeekThreshold(aTime.IsValid() ? aTime.ToMicroseconds() : INT64_MIN);
+    SendSetSeekThreshold(aTime);
   }
 }
 
 MediaDataDecoder::ConversionRequired VideoDecoderChild::NeedsConversion()
     const {
   AssertOnManagerThread();
   return mConversion;
 }
--- a/dom/media/ipc/VideoDecoderParent.cpp
+++ b/dom/media/ipc/VideoDecoderParent.cpp
@@ -136,19 +136,19 @@ mozilla::ipc::IPCResult VideoDecoderPare
   RefPtr<MediaRawData> data = new MediaRawData(aData.buffer().get<uint8_t>(),
                                                aData.buffer().Size<uint8_t>());
   if (aData.buffer().Size<uint8_t>() && !data->Data()) {
     // OOM
     Error(NS_ERROR_OUT_OF_MEMORY);
     return IPC_OK();
   }
   data->mOffset = aData.base().offset();
-  data->mTime = TimeUnit::FromMicroseconds(aData.base().time());
-  data->mTimecode = TimeUnit::FromMicroseconds(aData.base().timecode());
-  data->mDuration = TimeUnit::FromMicroseconds(aData.base().duration());
+  data->mTime = aData.base().time();
+  data->mTimecode = aData.base().timecode();
+  data->mDuration = aData.base().duration();
   data->mKeyframe = aData.base().keyframe();
 
   DeallocShmem(aData.buffer());
 
   RefPtr<VideoDecoderParent> self = this;
   mDecoder->Decode(data)->Then(
       mManagerTaskQueue, __func__,
       [self, this](MediaDataDecoder::DecodedData&& aResults) {
@@ -189,19 +189,18 @@ void VideoDecoderParent::ProcessDecodedD
     }
 
     if (texture && !texture->IsAddedToCompositableClient()) {
       texture->InitIPDLActor(mKnowsCompositor);
       texture->SetAddedToCompositableClient();
     }
 
     VideoDataIPDL output(
-        MediaDataIPDL(data->mOffset, data->mTime.ToMicroseconds(),
-                      data->mTimecode.ToMicroseconds(),
-                      data->mDuration.ToMicroseconds(), data->mKeyframe),
+        MediaDataIPDL(data->mOffset, data->mTime, data->mTimecode,
+                      data->mDuration, data->mKeyframe),
         video->mDisplay, texture ? texture->GetSize() : IntSize(),
         texture ? mParent->StoreImage(video->mImage, texture)
                 : SurfaceDescriptorGPUVideo(0, null_t()),
         video->mFrameID);
     Unused << SendOutput(output);
   }
 }
 
@@ -243,22 +242,20 @@ mozilla::ipc::IPCResult VideoDecoderPare
   if (mDecoder) {
     mDecoder->Shutdown();
   }
   mDecoder = nullptr;
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult VideoDecoderParent::RecvSetSeekThreshold(
-    const int64_t& aTime) {
+    const TimeUnit& aTime) {
   MOZ_ASSERT(!mDestroyed);
   MOZ_ASSERT(OnManagerThread());
-  mDecoder->SetSeekThreshold(aTime == INT64_MIN
-                                 ? TimeUnit::Invalid()
-                                 : TimeUnit::FromMicroseconds(aTime));
+  mDecoder->SetSeekThreshold(aTime);
   return IPC_OK();
 }
 
 void VideoDecoderParent::ActorDestroy(ActorDestroyReason aWhy) {
   MOZ_ASSERT(!mDestroyed);
   MOZ_ASSERT(OnManagerThread());
   if (mDecoder) {
     mDecoder->Shutdown();
--- a/dom/media/ipc/VideoDecoderParent.h
+++ b/dom/media/ipc/VideoDecoderParent.h
@@ -37,17 +37,17 @@ class VideoDecoderParent final : public 
   void Destroy();
 
   // PVideoDecoderParent
   IPCResult RecvInit();
   IPCResult RecvInput(const MediaRawDataIPDL& aData);
   IPCResult RecvFlush();
   IPCResult RecvDrain();
   IPCResult RecvShutdown();
-  IPCResult RecvSetSeekThreshold(const int64_t& aTime);
+  IPCResult RecvSetSeekThreshold(const media::TimeUnit& aTime);
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
   bool OnManagerThread();
   void Error(const MediaResult& aError);
 
   ~VideoDecoderParent();