зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374138 - Let MediaDecoderReaderWrapper::RequestVideoData() have a const media::TimeUnit& parameter; r=jya
MozReview-Commit-ID: DgCLE6xXEkn --HG-- extra : rebase_source : 4708c4f4e601e76bacb6c99341a9b4cc8e8eca10
This commit is contained in:
Родитель
fafb858b26
Коммит
a17a205bc3
|
@ -62,19 +62,19 @@ MediaDecoderReaderWrapper::RequestAudioData()
|
|||
}
|
||||
|
||||
RefPtr<MediaDecoderReaderWrapper::VideoDataPromise>
|
||||
MediaDecoderReaderWrapper::RequestVideoData(media::TimeUnit aTimeThreshold)
|
||||
MediaDecoderReaderWrapper::RequestVideoData(const media::TimeUnit& aTimeThreshold)
|
||||
{
|
||||
MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
|
||||
MOZ_ASSERT(!mShutdown);
|
||||
|
||||
if (aTimeThreshold > media::TimeUnit::Zero()) {
|
||||
aTimeThreshold += StartTime();
|
||||
}
|
||||
const auto threshold = aTimeThreshold > media::TimeUnit::Zero()
|
||||
? aTimeThreshold + StartTime()
|
||||
: aTimeThreshold;
|
||||
|
||||
int64_t startTime = StartTime().ToMicroseconds();
|
||||
return InvokeAsync(
|
||||
mReader->OwnerThread(), mReader.get(), __func__,
|
||||
&MediaDecoderReader::RequestVideoData, aTimeThreshold)
|
||||
&MediaDecoderReader::RequestVideoData, threshold)
|
||||
->Then(mOwnerThread, __func__,
|
||||
[startTime] (RefPtr<VideoData> aVideo) {
|
||||
aVideo->AdjustForStartTime(startTime);
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
RefPtr<AudioDataPromise> RequestAudioData();
|
||||
|
||||
RefPtr<VideoDataPromise>
|
||||
RequestVideoData(media::TimeUnit aTimeThreshold);
|
||||
RequestVideoData(const media::TimeUnit& aTimeThreshold);
|
||||
|
||||
RefPtr<WaitForDataPromise> WaitForData(MediaData::Type aType);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче