Home
last modified time | relevance | path

Searched refs:nowUs (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/av/media/libstagefright/
DMediaClock.cpp64 int64_t nowUs = ALooper::GetNowUs(); in updateAnchor() local
66 anchorTimeMediaUs + (nowUs - anchorTimeRealUs) * (double)mPlaybackRate; in updateAnchor()
77 mAnchorTimeMediaUs + (nowUs - mAnchorTimeRealUs) * (double)mPlaybackRate; in updateAnchor()
83 mAnchorTimeRealUs = nowUs; in updateAnchor()
100 int64_t nowUs = ALooper::GetNowUs(); in setPlaybackRate() local
101 mAnchorTimeMediaUs += (nowUs - mAnchorTimeRealUs) * (double)mPlaybackRate; in setPlaybackRate()
106 mAnchorTimeRealUs = nowUs; in setPlaybackRate()
157 int64_t nowUs = ALooper::GetNowUs(); in getRealTimeFor() local
160 getMediaTime_l(nowUs, &nowMediaUs, true /* allowPastMaxTime */); in getRealTimeFor()
164 *outRealUs = (targetMediaUs - nowMediaUs) / (double)mPlaybackRate + nowUs; in getRealTimeFor()
DMediaSync.cpp311 int64_t nowUs = ALooper::GetNowUs(); in updateQueuedAudioData() local
314 + getPlayedOutAudioDurationMedia_l(nowUs); in updateQueuedAudioData()
320 oldRealTime = getRealTime(mNextBufferItemMediaUs, nowUs); in updateQueuedAudioData()
323 mMediaClock->updateAnchor(nowMediaUs, nowUs, maxMediaTimeUs); in updateQueuedAudioData()
327 int64_t newRealTime = getRealTime(mNextBufferItemMediaUs, nowUs); in updateQueuedAudioData()
463 int64_t MediaSync::getRealTime(int64_t mediaTimeUs, int64_t nowUs) { in getRealTime() argument
468 return nowUs; in getRealTime()
477 int64_t MediaSync::getPlayedOutAudioDurationMedia_l(int64_t nowUs) { in getPlayedOutAudioDurationMedia_l() argument
491 const int64_t timestampAge = nowUs - numFramesPlayedAt; in getPlayedOutAudioDurationMedia_l()
502 (long long)nowUs, (long long)numFramesPlayedAt); in getPlayedOutAudioDurationMedia_l()
[all …]
DThrottledSource.cpp45 int64_t nowUs = ALooper::GetNowUs(); in readAt() local
48 mStartTimeUs = nowUs; in readAt()
58 if (whenUs > nowUs) { in readAt()
59 usleep(whenUs - nowUs); in readAt()
DVBRISeeker.cpp172 int64_t nowUs = 0; in getOffsetForTime() local
175 while (segmentIndex < mSegments.size() && nowUs < *timeUs) { in getOffsetForTime()
176 nowUs += segmentDurationUs; in getOffsetForTime()
182 *timeUs = nowUs; in getOffsetForTime()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerRenderer.cpp356 int64_t nowUs = ALooper::GetNowUs(); in getCurrentPosition() local
357 int64_t nowMediaUs = mAudioSink->getPlayedOutDurationUs(nowUs) in getCurrentPosition()
359 mMediaClock->updateAnchor(nowMediaUs, nowUs, -1); in getCurrentPosition()
834 int64_t nowUs = ALooper::GetNowUs(); in fillAudioBuffer() local
836 mAudioFirstAnchorTimeMediaUs + mAudioSink->getPlayedOutDurationUs(nowUs); in fillAudioBuffer()
838 mMediaClock->updateAnchor(nowMediaUs, nowUs, INT64_MAX); in fillAudioBuffer()
1062 int64_t NuPlayer::Renderer::getPendingAudioPlayoutDurationUs(int64_t nowUs) { in getPendingAudioPlayoutDurationUs() argument
1065 int64_t nowUs = ALooper::GetNowUs(); in getPendingAudioPlayoutDurationUs() local
1067 if (mMediaClock->getMediaTime(nowUs, &mediaUs) != OK) { in getPendingAudioPlayoutDurationUs()
1073 return writtenAudioDurationUs - mAudioSink->getPlayedOutDurationUs(nowUs); in getPendingAudioPlayoutDurationUs()
[all …]
DNuPlayerRenderer.h210 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
213 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
220 int64_t getPendingAudioPlayoutDurationUs(int64_t nowUs);
229 int64_t getRealTimeUs(int64_t mediaTimeUs, int64_t nowUs);
/frameworks/av/media/libstagefright/wifi-display/source/
DRepeaterSource.cpp131 int64_t nowUs = ALooper::GetNowUs(); in read() local
132 int64_t delayUs = bufferTimeUs - nowUs; in read()
149 int64_t nowUs = ALooper::GetNowUs(); in read() local
150 if (nowUs - mLastBufferUpdateUs > 1000000ll) { in read()
DConverter.cpp350 int64_t nowUs = ALooper::GetNowUs(); in onMessageReceived() local
353 mFirstSilentFrameUs = nowUs; in onMessageReceived()
354 } else if (nowUs >= mFirstSilentFrameUs + 10000000ll) { in onMessageReceived()
383 int64_t nowUs = ALooper::GetNowUs(); in onMessageReceived()
385 mIsVideo ? "video" : "audio", nowUs - whenUs); in onMessageReceived()
DPlaybackSession.cpp831 int64_t nowUs = ALooper::GetNowUs(); in schedulePullExtractor() local
834 mFirstSampleTimeRealUs = nowUs; in schedulePullExtractor()
839 delayUs = whenUs - nowUs; in schedulePullExtractor()
DTSPacketizer.cpp848 int64_t nowUs = ALooper::GetNowUs(); in packetize() local
850 uint64_t PCR = nowUs * 27; // PCR based on a 27MHz clock in packetize()
/frameworks/base/core/java/com/android/internal/os/
DKernelUidCpuTimeReader.java70 long nowUs = SystemClock.elapsedRealtime() * 1000; in readDelta() local
98 final long timeDiffUs = nowUs - mLastTimeReadUs; in readDelta()
143 mLastTimeReadUs = nowUs; in readDelta()
/frameworks/av/media/libstagefright/foundation/
DALooper.cpp207 int64_t nowUs = GetNowUs(); in loop() local
209 if (whenUs > nowUs) { in loop()
210 int64_t delayUs = whenUs - nowUs; in loop()
DANetworkSession.cpp294 int64_t nowUs = ALooper::GetNowUs(); in readMore() local
295 buf->meta()->setInt64("arrivalTimeUs", nowUs); in readMore()
373 int64_t nowUs = ALooper::GetNowUs(); in readMore() local
374 packet->meta()->setInt64("arrivalTimeUs", nowUs); in readMore()
407 int64_t nowUs = ALooper::GetNowUs(); in readMore() local
408 data->meta()->setInt64("arrivalTimeUs", nowUs); in readMore()
526 int64_t nowUs = ALooper::GetNowUs(); in dumpFragmentStats()
527 int64_t delayMs = (nowUs - frag.mTimeUs) / 1000ll; in dumpFragmentStats()
673 int64_t nowUs = ALooper::GetNowUs(); in writeMore()
676 || nowUs > mLastStallReportUs + 100000ll) { in writeMore()
[all …]
/frameworks/av/media/libstagefright/rtsp/
DARTPSource.cpp178 int64_t nowUs = ALooper::GetNowUs(); in addFIR() local
179 if (mLastFIRRequestUs >= 0 && mLastFIRRequestUs + 5000000ll > nowUs) { in addFIR()
184 mLastFIRRequestUs = nowUs; in addFIR()
DUDPPusher.cpp105 int64_t nowUs = ALooper::GetNowUs(); in onPush() local
106 (new AMessage(kWhatPush, this))->post(whenUs - nowUs); in onPush()
DARTPWriter.cpp419 uint64_t nowUs = ALooper::GetNowUs(); in GetNowNTP() local
421 nowUs += ((70ll * 365 + 17) * 24) * 60 * 60 * 1000000ll; in GetNowNTP()
423 uint64_t hi = nowUs / 1000000ll; in GetNowNTP()
424 uint64_t lo = ((1ll << 32) * (nowUs % 1000000ll)) / 1000000ll; in GetNowNTP()
DARTPConnection.cpp308 int64_t nowUs = ALooper::GetNowUs(); in onPollStreams() local
310 || mLastReceiverReportTimeUs + 5000000ll <= nowUs) { in onPollStreams()
361 mLastReceiverReportTimeUs = nowUs; in onPollStreams()
DMyTransmitter.h144 uint64_t nowUs = tv.tv_sec * 1000000ll + tv.tv_usec; in ntpTime() local
146 nowUs += ((70ll * 365 + 17) * 24) * 60 * 60 * 1000000ll; in ntpTime()
148 uint64_t hi = nowUs / 1000000ll; in ntpTime()
149 uint64_t lo = ((1ll << 32) * (nowUs % 1000000ll)) / 1000000ll; in ntpTime()
/frameworks/av/media/libstagefright/wifi-display/rtp/
DRTPSender.cpp270 int64_t nowUs = ALooper::GetNowUs(); in queueTSPackets() local
271 uint32_t rtpTime = (nowUs * 9) / 100ll; in queueTSPackets()
495 uint64_t nowUs = tv.tv_sec * 1000000ll + tv.tv_usec; in GetNowNTP() local
497 nowUs += ((70ll * 365 + 17) * 24) * 60 * 60 * 1000000ll; in GetNowNTP()
499 uint64_t hi = nowUs / 1000000ll; in GetNowNTP()
500 uint64_t lo = ((1ll << 32) * (nowUs % 1000000ll)) / 1000000ll; in GetNowNTP()
/frameworks/av/include/media/stagefright/
DMediaSync.h236 int64_t getRealTime(int64_t mediaTimeUs, int64_t nowUs);
238 int64_t getPlayedOutAudioDurationMedia_l(int64_t nowUs);
/frameworks/base/media/java/android/media/
DMediaPlayer.java3782 long nowUs; in notifyTimedEvent() local
3784 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
3789 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
3791 long nextTimeUs = nowUs; in notifyTimedEvent()
3801 .append(nowUs).append(") from {"); in notifyTimedEvent()
3823 } else if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) { in notifyTimedEvent()
3827 } else if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) { in notifyTimedEvent()
3832 if (nextTimeUs > nowUs && !mPaused) { in notifyTimedEvent()
3834 if (DEBUG) Log.d(TAG, "scheduling for " + nextTimeUs + " and " + nowUs); in notifyTimedEvent()
3835 scheduleNotification(NOTIFY_TIME, nextTimeUs - nowUs); in notifyTimedEvent()
[all …]
/frameworks/base/media/jni/
Dandroid_media_MediaSync.cpp285 int64_t nowUs = ALooper::GetNowUs(); in android_media_MediaSync_native_getTimestamp() local
287 if (mediaClock->getMediaTime(nowUs, &mediaUs) != OK) { in android_media_MediaSync_native_getTimestamp()
294 (jlong)(nowUs * 1000)); in android_media_MediaSync_native_getTimestamp()
/frameworks/av/cmds/stagefright/
DSimplePlayer.cpp509 int64_t nowUs = ALooper::GetNowUs(); in onDoMoreStuff() local
512 mStartTimeRealUs = nowUs + 1000000ll; in onDoMoreStuff()
522 int64_t lateByUs = nowUs - whenRealUs; in onDoMoreStuff()
/frameworks/av/media/libmediaplayerservice/
DMediaPlayerService.cpp1508 int64_t MediaPlayerService::AudioOutput::getPlayedOutDurationUs(int64_t nowUs) const in getPlayedOutDurationUs()
1524 const int64_t timestampAge = nowUs - numFramesPlayedAt; in getPlayedOutDurationUs()
1533 (long long)nowUs, (long long)numFramesPlayedAt); in getPlayedOutDurationUs()
1534 numFramesPlayedAt = nowUs - kStaleTimestamp100ms; in getPlayedOutDurationUs()
1539 numFramesPlayedAt = nowUs; in getPlayedOutDurationUs()
1545 numFramesPlayedAt = nowUs; in getPlayedOutDurationUs()
1553 + nowUs - numFramesPlayedAt; in getPlayedOutDurationUs()
1566 (long long)durationUs, (long long)nowUs, numFramesPlayed, (long long)numFramesPlayedAt); in getPlayedOutDurationUs()
/frameworks/av/include/media/
DMediaPlayerInterface.h102 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;

12