зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1164697 - Fix time unit of AudioOffloadPlayer r=bholley
This commit is contained in:
Родитель
dfa3b487fe
Коммит
dcb4911aa5
|
@ -385,13 +385,6 @@ status_t AudioOffloadPlayer::DoSeek()
|
|||
return OK;
|
||||
}
|
||||
|
||||
double AudioOffloadPlayer::GetMediaTimeSecs()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return (static_cast<double>(GetMediaTimeUs()) /
|
||||
static_cast<double>(USECS_PER_S));
|
||||
}
|
||||
|
||||
int64_t AudioOffloadPlayer::GetMediaTimeUs()
|
||||
{
|
||||
android::Mutex::Autolock autoLock(mLock);
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
|
||||
virtual void SetVolume(double aVolume) override;
|
||||
|
||||
virtual double GetMediaTimeSecs() override;
|
||||
virtual int64_t GetMediaTimeUs() override;
|
||||
|
||||
// To update progress bar when the element is visible
|
||||
virtual void SetElementVisibility(bool aIsVisible) override;;
|
||||
|
@ -192,8 +192,6 @@ private:
|
|||
// Used only from main thread so no lock is needed.
|
||||
nsRefPtr<mozilla::dom::WakeLock> mWakeLock;
|
||||
|
||||
int64_t GetMediaTimeUs();
|
||||
|
||||
// Provide the playback position in microseconds from total number of
|
||||
// frames played by audio track
|
||||
int64_t GetOutputPlayPositionUs_l() const;
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
virtual void SetVolume(double aVolume) {}
|
||||
|
||||
virtual double GetMediaTimeSecs() { return 0; }
|
||||
virtual int64_t GetMediaTimeUs() { return 0; }
|
||||
|
||||
// To update progress bar when the element is visible
|
||||
virtual void SetElementVisibility(bool aIsVisible) {}
|
||||
|
|
|
@ -244,7 +244,7 @@ MediaOmxCommonDecoder::CurrentPosition()
|
|||
}
|
||||
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
return mAudioOffloadPlayer->GetMediaTimeSecs();
|
||||
return mAudioOffloadPlayer->GetMediaTimeUs();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче