Home | History | Annotate | Download | only in nuplayer

Lines Matching refs:nowUs

205         int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo) {
211 return getCurrentPositionFromAnchor(mediaUs, nowUs, allowPastQueuedVideo);
225 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo) {
235 int64_t positionUs = (nowUs - mAnchorTimeRealUs) + mAnchorTimeMediaUs;
238 positionUs -= (nowUs - mPauseStartedTimeRealUs);
645 int64_t nowUs = ALooper::GetNowUs();
646 setAnchorTime(mAudioFirstAnchorTimeMediaUs, nowUs - getPlayedOutAudioDurationUs(nowUs));
767 int64_t NuPlayer::Renderer::getPendingAudioPlayoutDurationUs(int64_t nowUs) {
770 return writtenAudioDurationUs - getPlayedOutAudioDurationUs(nowUs);
773 int64_t NuPlayer::Renderer::getRealTimeUs(int64_t mediaTimeUs, int64_t nowUs) {
776 &currentPositionUs, nowUs, true /* allowPastQueuedVideo */) != OK) {
779 return nowUs;
781 return (mediaTimeUs - currentPositionUs) + nowUs;
791 int64_t nowUs = ALooper::GetNowUs();
793 mediaTimeUs, nowUs + getPendingAudioPlayoutDurationUs(nowUs), mNumFramesWritten);
820 int64_t nowUs = ALooper::GetNowUs();
831 setAnchorTime(mediaTimeUs, nowUs);
834 realTimeUs = nowUs;
836 realTimeUs = getRealTimeUs(mediaTimeUs, nowUs);
846 delayUs = realTimeUs - nowUs;
865 delayUs = realTimeUs - nowUs;
893 int64_t nowUs = -1;
901 nowUs = ALooper::GetNowUs();
902 realTimeUs = getRealTimeUs(mediaTimeUs, nowUs);
908 if (nowUs == -1) {
909 nowUs = ALooper::GetNowUs();
911 setVideoLateByUs(nowUs - realTimeUs);
1312 int64_t NuPlayer::Renderer::getPlayedOutAudioDurationUs(int64_t nowUs) {
1323 const int64_t timestampAge = nowUs - numFramesPlayedAt;
1331 ALOGV("getTimestamp: returned stale timestamp nowUs(%lld) numFramesPlayedAt(%lld)",
1332 (long long)nowUs, (long long)numFramesPlayedAt);
1333 numFramesPlayedAt = nowUs - kStaleTimestamp100ms;
1338 numFramesPlayedAt = nowUs;
1344 numFramesPlayedAt = nowUs;
1352 + nowUs - numFramesPlayedAt;
1355 // (1) In case 1, the time nowUs is computed before getTimestamp() is called and
1356 // numFramesPlayedAt is greater than nowUs by time more than numFramesPlayed.
1364 ALOGV("getPlayedOutAudioDurationUs(%lld) nowUs(%lld) frames(%u) framesAt(%lld)",
1365 (long long)durationUs, (long long)nowUs, numFramesPlayed, (long long)numFramesPlayedAt);