Home
last modified time | relevance | path

Searched refs:nowUs (Results 1 – 25 of 31) 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()
122 updateAnchorTimesAndPlaybackRate_l(nowMediaUs, nowUs, mPlaybackRate); in updateAnchor()
141 int64_t nowUs = ALooper::GetNowUs(); in setPlaybackRate() local
142 int64_t nowMediaUs = mAnchorTimeMediaUs + (nowUs - mAnchorTimeRealUs) * (double)mPlaybackRate; in setPlaybackRate()
147 updateAnchorTimesAndPlaybackRate_l(nowMediaUs, nowUs, rate); in setPlaybackRate()
202 int64_t nowUs = ALooper::GetNowUs(); in getRealTimeFor() local
205 getMediaTime_l(nowUs, &nowMediaUs, true /* allowPastMaxTime */); in getRealTimeFor()
209 *outRealUs = (targetMediaUs - nowMediaUs) / (double)mPlaybackRate + nowUs; in getRealTimeFor()
DVideoRenderQualityTracker.cpp241 onFrameReleased(contentTimeUs, nowUs() * 1000); in onFrameReleased()
673 int64_t VideoRenderQualityTracker::nowUs() { in nowUs() function in android::VideoRenderQualityTracker
/frameworks/av/media/module/foundation/
DALooper.cpp177 int64_t nowUs = getNowUs(); in post() local
178 whenUs = (delayUs > INT64_MAX - nowUs ? INT64_MAX : nowUs + delayUs); in post()
209 int64_t nowUs = getNowUs(); in postUnique() local
210 whenUs = (delayUs > INT64_MAX - nowUs ? INT64_MAX : nowUs + delayUs); in postUnique()
264 int64_t nowUs = getNowUs(); in loop() local
266 if (whenUs > nowUs) { in loop()
267 int64_t delayUs = whenUs - nowUs; in loop()
/frameworks/av/media/libstagefright/rtsp/
DARTPSource.cpp198 void ARTPSource::calcTimeGapRtpRtcp(const sp<ABuffer> &buffer, int64_t nowUs) { in calcTimeGapRtpRtcp() argument
203 int64_t elapsedMs = (nowUs - mLastSrUpdateTimeUs) / 1000; in calcTimeGapRtpRtcp()
233 void ARTPSource::calcUnderlineDelay(const sp<ABuffer> &buffer, int64_t nowUs) { in calcUnderlineDelay() argument
234 int64_t elapsedMs = (nowUs - mSysAnchorTime) / 1000; in calcUnderlineDelay()
245 void ARTPSource::adjustAnchorTimeIfRequired(int64_t nowUs) { in adjustAnchorTimeIfRequired() argument
246 if (nowUs - mLastSysAnchorTimeUpdatedUs < 1000000L) { in adjustAnchorTimeIfRequired()
258 mLastSysAnchorTimeUpdatedUs = nowUs; in adjustAnchorTimeIfRequired()
266 int64_t nowUs = ALooper::GetNowUs(); in queuePacket() local
275 mFirstSysTime = nowUs; in queuePacket()
276 mSysAnchorTime = nowUs; in queuePacket()
[all …]
DARTPConnection.cpp481 int64_t nowUs = ALooper::GetNowUs(); in onPollStreams() local
491 it->mLastPollTimeUs = nowUs; in onPollStreams()
553 checkRxBitrate(nowUs); in onPollStreams()
556 || mLastReceiverReportTimeUs + 5000000LL <= nowUs) { in onPollStreams()
598 mLastReceiverReportTimeUs = nowUs; in onPollStreams()
711 int64_t nowUs = ALooper::GetNowUs(); in notifyCongestionToUpperLayerIfNeeded() local
714 mLastCongestionNotifyTimeUs = nowUs; in notifyCongestionToUpperLayerIfNeeded()
717 bool isNeedToUpdate = (mLastCongestionNotifyTimeUs + kMinOneSecondNotifyDelayUs <= nowUs); in notifyCongestionToUpperLayerIfNeeded()
725 mLastCongestionNotifyTimeUs = nowUs; in notifyCongestionToUpperLayerIfNeeded()
1022 int64_t nowUs = ALooper::GetNowUs(); in parseBYE() local
[all …]
DQualManager.cpp124 void QualManager::setTargetBitrate(uint8_t fraction, int64_t nowUs, bool isTooLowPkts) { in setTargetBitrate() argument
150 nowUs - mLastSetBitrateTime > 5000000ll) { in setTargetBitrate()
152 mLastSetBitrateTime = nowUs; in setTargetBitrate()
DUDPPusher.cpp105 int64_t nowUs = ALooper::GetNowUs(); in onPush() local
106 (new AMessage(kWhatPush, this))->post(whenUs - nowUs); in onPush()
DARTPWriter.cpp819 uint64_t nowUs = systemTime(SYSTEM_TIME_REALTIME) / 1000ll; in GetNowNTP() local
821 nowUs += ((70LL * 365 + 17) * 24) * 60 * 60 * 1000000LL; in GetNowNTP()
823 uint64_t hi = nowUs / 1000000LL; in GetNowNTP()
824 uint64_t lo = ((1LL << 32) * (nowUs % 1000000LL)) / 1000000LL; in GetNowNTP()
/frameworks/av/media/module/extractors/mp3/
DVBRISeeker.cpp174 int64_t nowUs = 0; in getOffsetForTime() local
177 while (segmentIndex < mSegments.size() && nowUs < *timeUs) { in getOffsetForTime()
178 nowUs += segmentDurationUs; in getOffsetForTime()
184 *timeUs = nowUs; in getOffsetForTime()
/frameworks/av/media/libstagefright/rtsp/include/media/stagefright/rtsp/
DARTPSource.h89 void notifyPktInfo(int32_t bitrate, int64_t nowUs, bool isRegular);
154 void calcTimeGapRtpRtcp(const sp<ABuffer> &buffer, int64_t nowUs);
155 void calcUnderlineDelay(const sp<ABuffer> &buffer, int64_t nowUs);
156 void adjustAnchorTimeIfRequired(int64_t nowUs);
DQualManager.h33 void setTargetBitrate(uint8_t fraction, int64_t nowUs, bool isTooLowPkts);
DARTPConnection.h113 void checkRxBitrate(int64_t nowUs);
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerRenderer.cpp404 int64_t nowUs = ALooper::GetNowUs(); in getCurrentPosition() local
405 int64_t playedOutDurationUs = mAudioSink->getPlayedOutDurationUs(nowUs); in getCurrentPosition()
411 mMediaClock->updateAnchor(nowMediaUs, nowUs, -1); in getCurrentPosition()
999 int64_t nowUs = ALooper::GetNowUs(); in fillAudioBuffer() local
1001 mAudioFirstAnchorTimeMediaUs + mAudioSink->getPlayedOutDurationUs(nowUs); in fillAudioBuffer()
1003 mMediaClock->updateAnchor(nowMediaUs, nowUs, INT64_MAX); in fillAudioBuffer()
1246 int64_t NuPlayer::Renderer::getPendingAudioPlayoutDurationUs(int64_t nowUs) { in getPendingAudioPlayoutDurationUs() argument
1249 int64_t nowUs = ALooper::GetNowUs(); in getPendingAudioPlayoutDurationUs() local
1251 if (mMediaClock->getMediaTime(nowUs, &mediaUs) != OK) { in getPendingAudioPlayoutDurationUs()
1258 const int64_t audioSinkPlayedUs = mAudioSink->getPlayedOutDurationUs(nowUs); in getPendingAudioPlayoutDurationUs()
[all …]
/frameworks/av/media/libmediaplayerservice/nuplayer/include/nuplayer/
DNuPlayerRenderer.h235 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
238 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false);
271 int64_t getPendingAudioPlayoutDurationUs(int64_t nowUs);
280 int64_t getRealTimeUs(int64_t mediaTimeUs, int64_t nowUs);
/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);
DVideoRenderQualityTracker.h335 static int64_t nowUs();
/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/module/foundation/tests/
DAMessage_test.cpp37 void setClockUs(int64_t nowUs) { in setClockUs() argument
38 mClockUs = nowUs; in setClockUs()
/frameworks/base/media/java/android/media/
DMediaPlayer.java6091 long nowUs; in notifyTimedEvent() local
6093 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
6098 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent()
6100 long nextTimeUs = nowUs; in notifyTimedEvent()
6110 .append(nowUs).append(") from {"); in notifyTimedEvent()
6132 } else if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) { in notifyTimedEvent()
6136 } else if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) { in notifyTimedEvent()
6141 if (nextTimeUs > nowUs && !mPaused) { in notifyTimedEvent()
6143 if (DEBUG) Log.d(TAG, "scheduling for " + nextTimeUs + " and " + nowUs); in notifyTimedEvent()
6151 listener.onTimedEvent(nowUs); in notifyTimedEvent()
/frameworks/av/include/media/
DMediaPlayerInterface.h105 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;
/frameworks/av/media/libmediaplayerservice/include/
DMediaPlayerInterface.h105 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;
/frameworks/av/media/libmediaplayerservice/
DMediaPlayerService.cpp1935 int64_t MediaPlayerService::AudioOutput::getPlayedOutDurationUs(int64_t nowUs) const in getPlayedOutDurationUs()
1953 numFramesPlayedAtUs = nowUs; in getPlayedOutDurationUs()
1959 numFramesPlayedAtUs = nowUs; in getPlayedOutDurationUs()
1967 + nowUs - numFramesPlayedAtUs; in getPlayedOutDurationUs()
1980 (long long)durationUs, (long long)nowUs, in getPlayedOutDurationUs()

12