Home
last modified time | relevance | path

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

12

/frameworks/av/media/libstagefright/
DMediaSync.cpp314 int64_t nowUs = ALooper::GetNowUs(); in updateQueuedAudioData() local
317 + getPlayedOutAudioDurationMedia_l(nowUs); in updateQueuedAudioData()
323 oldRealTime = getRealTime(mNextBufferItemMediaUs, nowUs); in updateQueuedAudioData()
326 mMediaClock->updateAnchor(nowMediaUs, nowUs, maxMediaTimeUs); in updateQueuedAudioData()
330 int64_t newRealTime = getRealTime(mNextBufferItemMediaUs, nowUs); in updateQueuedAudioData()
466 int64_t MediaSync::getRealTime(int64_t mediaTimeUs, int64_t nowUs) { in getRealTime() argument
471 return nowUs; in getRealTime()
480 int64_t MediaSync::getPlayedOutAudioDurationMedia_l(int64_t nowUs) { in getPlayedOutAudioDurationMedia_l() argument
497 numFramesPlayedAtUs = nowUs; in getPlayedOutAudioDurationMedia_l()
504 numFramesPlayedAtUs = nowUs; 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()
DMediaClock.cpp99 int64_t nowUs = ALooper::GetNowUs(); in updateAnchor() local
101 anchorTimeMediaUs + (nowUs - anchorTimeRealUs) * (double)mPlaybackRate; in updateAnchor()
112 mAnchorTimeMediaUs + (nowUs - mAnchorTimeRealUs) * (double)mPlaybackRate; in updateAnchor()
118 updateAnchorTimesAndPlaybackRate_l(nowMediaUs, nowUs, mPlaybackRate); in updateAnchor()
137 int64_t nowUs = ALooper::GetNowUs(); in setPlaybackRate() local
138 int64_t nowMediaUs = mAnchorTimeMediaUs + (nowUs - mAnchorTimeRealUs) * (double)mPlaybackRate; in setPlaybackRate()
143 updateAnchorTimesAndPlaybackRate_l(nowMediaUs, nowUs, rate); in setPlaybackRate()
198 int64_t nowUs = ALooper::GetNowUs(); in getRealTimeFor() local
201 getMediaTime_l(nowUs, &nowMediaUs, true /* allowPastMaxTime */); in getRealTimeFor()
205 *outRealUs = (targetMediaUs - nowMediaUs) / (double)mPlaybackRate + nowUs; in getRealTimeFor()
/frameworks/av/media/extractors/mp3/
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.cpp360 int64_t nowUs = ALooper::GetNowUs(); in getCurrentPosition() local
361 int64_t nowMediaUs = mAudioSink->getPlayedOutDurationUs(nowUs) in getCurrentPosition()
363 mMediaClock->updateAnchor(nowMediaUs, nowUs, -1); in getCurrentPosition()
902 int64_t nowUs = ALooper::GetNowUs(); in fillAudioBuffer() local
904 mAudioFirstAnchorTimeMediaUs + mAudioSink->getPlayedOutDurationUs(nowUs); in fillAudioBuffer()
906 mMediaClock->updateAnchor(nowMediaUs, nowUs, INT64_MAX); in fillAudioBuffer()
1149 int64_t NuPlayer::Renderer::getPendingAudioPlayoutDurationUs(int64_t nowUs) { in getPendingAudioPlayoutDurationUs() argument
1152 int64_t nowUs = ALooper::GetNowUs(); in getPendingAudioPlayoutDurationUs() local
1154 if (mMediaClock->getMediaTime(nowUs, &mediaUs) != OK) { in getPendingAudioPlayoutDurationUs()
1161 const int64_t audioSinkPlayedUs = mAudioSink->getPlayedOutDurationUs(nowUs); in getPendingAudioPlayoutDurationUs()
[all …]
DNuPlayerRenderer.h225 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
228 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
235 int64_t getPendingAudioPlayoutDurationUs(int64_t nowUs);
244 int64_t getRealTimeUs(int64_t mediaTimeUs, int64_t nowUs);
/frameworks/av/media/libmediaplayer2/nuplayer2/
DNuPlayer2Renderer.cpp359 int64_t nowUs = ALooper::GetNowUs(); in getCurrentPosition() local
360 int64_t nowMediaUs = mAudioSink->getPlayedOutDurationUs(nowUs) in getCurrentPosition()
362 mMediaClock->updateAnchor(nowMediaUs, nowUs, -1); in getCurrentPosition()
901 int64_t nowUs = ALooper::GetNowUs(); in fillAudioBuffer() local
903 mAudioFirstAnchorTimeMediaUs + mAudioSink->getPlayedOutDurationUs(nowUs); in fillAudioBuffer()
905 mMediaClock->updateAnchor(nowMediaUs, nowUs, INT64_MAX); in fillAudioBuffer()
1148 int64_t NuPlayer2::Renderer::getPendingAudioPlayoutDurationUs(int64_t nowUs) { in getPendingAudioPlayoutDurationUs() argument
1151 int64_t nowUs = ALooper::GetNowUs(); in getPendingAudioPlayoutDurationUs() local
1153 if (mMediaClock->getMediaTime(nowUs, &mediaUs) != OK) { in getPendingAudioPlayoutDurationUs()
1160 const int64_t audioSinkPlayedUs = mAudioSink->getPlayedOutDurationUs(nowUs); in getPendingAudioPlayoutDurationUs()
[all …]
DNuPlayer2Renderer.h225 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
228 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
235 int64_t getPendingAudioPlayoutDurationUs(int64_t nowUs);
244 int64_t getRealTimeUs(int64_t mediaTimeUs, int64_t nowUs);
/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.cpp283 int64_t nowUs = ALooper::GetNowUs(); in readMore() local
284 buf->meta()->setInt64("arrivalTimeUs", nowUs); in readMore()
362 int64_t nowUs = ALooper::GetNowUs(); in readMore() local
363 packet->meta()->setInt64("arrivalTimeUs", nowUs); in readMore()
396 int64_t nowUs = ALooper::GetNowUs(); in readMore() local
397 data->meta()->setInt64("arrivalTimeUs", nowUs); in readMore()
515 int64_t nowUs = ALooper::GetNowUs(); in dumpFragmentStats()
516 int64_t delayMs = (nowUs - frag.mTimeUs) / 1000ll; in dumpFragmentStats()
662 int64_t nowUs = ALooper::GetNowUs(); in writeMore()
665 || nowUs > mLastStallReportUs + 100000ll) { in writeMore()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DKernelUidCpuTimeReader.java73 long nowUs = SystemClock.elapsedRealtime() * 1000; in readDeltaImpl() local
94 final long timeDiffUs = nowUs - mLastTimeReadUs; in readDeltaImpl()
134 mLastTimeReadUs = nowUs; in readDeltaImpl()
/frameworks/av/media/libstagefright/rtsp/
DUDPPusher.cpp105 int64_t nowUs = ALooper::GetNowUs(); in onPush() local
106 (new AMessage(kWhatPush, this))->post(whenUs - nowUs); in onPush()
DARTPSource.cpp182 int64_t nowUs = ALooper::GetNowUs(); in addFIR() local
183 if (mLastFIRRequestUs >= 0 && mLastFIRRequestUs + 5000000ll > nowUs) { in addFIR()
188 mLastFIRRequestUs = nowUs; in addFIR()
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/include/media/stagefright/
DMediaSync.h236 int64_t getRealTime(int64_t mediaTimeUs, int64_t nowUs);
238 int64_t getPlayedOutAudioDurationMedia_l(int64_t nowUs);
/frameworks/av/media/libmediaplayer2/
DMediaPlayer2AudioOutput.cpp196 int64_t MediaPlayer2AudioOutput::getPlayedOutDurationUs(int64_t nowUs) const { in getPlayedOutDurationUs()
213 numFramesPlayedAtUs = nowUs; in getPlayedOutDurationUs()
219 numFramesPlayedAtUs = nowUs; in getPlayedOutDurationUs()
227 + nowUs - numFramesPlayedAtUs; in getPlayedOutDurationUs()
240 (long long)durationUs, (long long)nowUs, in getPlayedOutDurationUs()
/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.cpp512 int64_t nowUs = ALooper::GetNowUs(); in onDoMoreStuff() local
515 mStartTimeRealUs = nowUs + 1000000ll; in onDoMoreStuff()
525 int64_t lateByUs = nowUs - whenRealUs; in onDoMoreStuff()
/frameworks/av/media/libmediaplayer2/include/mediaplayer2/
DMediaPlayer2AudioOutput.h53 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const;
DMediaPlayer2Interface.h89 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;
/frameworks/base/media/java/android/media/
DMediaPlayer2Impl.java4601 long nowUs; in notifyTimedEvent() local
4603 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
4608 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
4610 long nextTimeUs = nowUs; in notifyTimedEvent()
4620 .append(nowUs).append(") from {"); in notifyTimedEvent()
4642 } else if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) { in notifyTimedEvent()
4646 } else if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) { in notifyTimedEvent()
4651 if (nextTimeUs > nowUs && !mPaused) { in notifyTimedEvent()
4653 if (DEBUG) Log.d(TAG, "scheduling for " + nextTimeUs + " and " + nowUs); in notifyTimedEvent()
4661 listener.onTimedEvent(nowUs); in notifyTimedEvent()
DMediaPlayer.java5758 long nowUs; in notifyTimedEvent() local
5760 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
5765 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
5767 long nextTimeUs = nowUs; in notifyTimedEvent()
5777 .append(nowUs).append(") from {"); in notifyTimedEvent()
5799 } else if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) { in notifyTimedEvent()
5803 } else if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) { in notifyTimedEvent()
5808 if (nextTimeUs > nowUs && !mPaused) { in notifyTimedEvent()
5810 if (DEBUG) Log.d(TAG, "scheduling for " + nextTimeUs + " and " + nowUs); in notifyTimedEvent()
5818 listener.onTimedEvent(nowUs); in notifyTimedEvent()
/frameworks/av/include/media/
DMediaPlayerInterface.h106 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;

12