/frameworks/av/media/libstagefright/ |
D | MediaSync.cpp | 314 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 …]
|
D | ThrottledSource.cpp | 45 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()
|
D | MediaClock.cpp | 99 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/libstagefright/rtsp/ |
D | ARTPSource.cpp | 175 void ARTPSource::calcTimeGapRtpRtcp(const sp<ABuffer> &buffer, int64_t nowUs) { in calcTimeGapRtpRtcp() argument 180 int64_t elapsedMs = (nowUs - mLastSrUpdateTimeUs) / 1000; in calcTimeGapRtpRtcp() 210 void ARTPSource::calcUnderlineDelay(const sp<ABuffer> &buffer, int64_t nowUs) { in calcUnderlineDelay() argument 211 int64_t elapsedMs = (nowUs - mSysAnchorTime) / 1000; in calcUnderlineDelay() 222 void ARTPSource::adjustAnchorTimeIfRequired(int64_t nowUs) { in adjustAnchorTimeIfRequired() argument 223 if (nowUs - mLastSysAnchorTimeUpdatedUs < 1000000L) { in adjustAnchorTimeIfRequired() 235 mLastSysAnchorTimeUpdatedUs = nowUs; in adjustAnchorTimeIfRequired() 243 int64_t nowUs = ALooper::GetNowUs(); in queuePacket() local 252 mFirstSysTime = nowUs; in queuePacket() 253 mSysAnchorTime = nowUs; in queuePacket() [all …]
|
D | ARTPSource.h | 87 void notifyPktInfo(int32_t bitrate, int64_t nowUs, bool isRegular); 150 void calcTimeGapRtpRtcp(const sp<ABuffer> &buffer, int64_t nowUs); 151 void calcUnderlineDelay(const sp<ABuffer> &buffer, int64_t nowUs); 152 void adjustAnchorTimeIfRequired(int64_t nowUs);
|
D | ARTPConnection.cpp | 448 int64_t nowUs = ALooper::GetNowUs(); in onPollStreams() local 458 it->mLastPollTimeUs = nowUs; in onPollStreams() 522 checkRxBitrate(nowUs); in onPollStreams() 525 || mLastReceiverReportTimeUs + 5000000LL <= nowUs) { in onPollStreams() 568 mLastReceiverReportTimeUs = nowUs; in onPollStreams() 925 int64_t nowUs = ALooper::GetNowUs(); in parseBYE() local 926 int32_t timeDiff = (nowUs - mLastBitrateReportTimeUs) / 1000000ll; in parseBYE() 928 source->notifyPktInfo(bitrate, nowUs, true /* isRegular */); in parseBYE() 1145 void ARTPConnection::checkRxBitrate(int64_t nowUs) { in checkRxBitrate() argument 1148 mLastBitrateReportTimeUs = nowUs; in checkRxBitrate() [all …]
|
D | QualManager.cpp | 124 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()
|
D | UDPPusher.cpp | 105 int64_t nowUs = ALooper::GetNowUs(); in onPush() local 106 (new AMessage(kWhatPush, this))->post(whenUs - nowUs); in onPush()
|
D | QualManager.h | 33 void setTargetBitrate(uint8_t fraction, int64_t nowUs, bool isTooLowPkts);
|
D | ARTPConnection.h | 105 void checkRxBitrate(int64_t nowUs);
|
D | MyTransmitter.h | 144 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()
|
D | ARTPWriter.cpp | 793 uint64_t nowUs = systemTime(SYSTEM_TIME_REALTIME) / 1000ll; in GetNowNTP() local 795 nowUs += ((70LL * 365 + 17) * 24) * 60 * 60 * 1000000LL; in GetNowNTP() 797 uint64_t hi = nowUs / 1000000LL; in GetNowNTP() 798 uint64_t lo = ((1LL << 32) * (nowUs % 1000000LL)) / 1000000LL; in GetNowNTP()
|
/frameworks/av/media/libstagefright/foundation/ |
D | ALooper.cpp | 173 int64_t nowUs = GetNowUs(); in post() local 174 whenUs = (delayUs > INT64_MAX - nowUs ? INT64_MAX : nowUs + delayUs); in post() 209 int64_t nowUs = GetNowUs(); in loop() local 211 if (whenUs > nowUs) { in loop() 212 int64_t delayUs = whenUs - nowUs; in loop()
|
/frameworks/av/media/libmediaplayerservice/nuplayer/ |
D | NuPlayerRenderer.cpp | 400 int64_t nowUs = ALooper::GetNowUs(); in getCurrentPosition() local 401 int64_t playedOutDurationUs = mAudioSink->getPlayedOutDurationUs(nowUs); in getCurrentPosition() 407 mMediaClock->updateAnchor(nowMediaUs, nowUs, -1); in getCurrentPosition() 956 int64_t nowUs = ALooper::GetNowUs(); in fillAudioBuffer() local 958 mAudioFirstAnchorTimeMediaUs + mAudioSink->getPlayedOutDurationUs(nowUs); in fillAudioBuffer() 960 mMediaClock->updateAnchor(nowMediaUs, nowUs, INT64_MAX); in fillAudioBuffer() 1203 int64_t NuPlayer::Renderer::getPendingAudioPlayoutDurationUs(int64_t nowUs) { in getPendingAudioPlayoutDurationUs() argument 1206 int64_t nowUs = ALooper::GetNowUs(); in getPendingAudioPlayoutDurationUs() local 1208 if (mMediaClock->getMediaTime(nowUs, &mediaUs) != OK) { in getPendingAudioPlayoutDurationUs() 1215 const int64_t audioSinkPlayedUs = mAudioSink->getPlayedOutDurationUs(nowUs); in getPendingAudioPlayoutDurationUs() [all …]
|
D | NuPlayerRenderer.h | 232 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false); 235 int64_t *mediaUs, int64_t nowUs, bool allowPastQueuedVideo = false); 242 int64_t getPendingAudioPlayoutDurationUs(int64_t nowUs); 251 int64_t getRealTimeUs(int64_t mediaTimeUs, int64_t nowUs);
|
/frameworks/av/media/extractors/mp3/ |
D | VBRISeeker.cpp | 174 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/include/media/stagefright/ |
D | MediaSync.h | 236 int64_t getRealTime(int64_t mediaTimeUs, int64_t nowUs); 238 int64_t getPlayedOutAudioDurationMedia_l(int64_t nowUs);
|
/frameworks/base/media/jni/ |
D | android_media_MediaSync.cpp | 285 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/ |
D | SimplePlayer.cpp | 512 int64_t nowUs = ALooper::GetNowUs(); in onDoMoreStuff() local 515 mStartTimeRealUs = nowUs + 1000000ll; in onDoMoreStuff() 525 int64_t lateByUs = nowUs - whenRealUs; in onDoMoreStuff()
|
/frameworks/base/media/java/android/media/ |
D | MediaPlayer.java | 6024 long nowUs; in notifyTimedEvent() local 6026 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent() 6031 nowUs = getCurrentTimeUs(refreshTime, true); in notifyTimedEvent() 6033 long nextTimeUs = nowUs; in notifyTimedEvent() 6043 .append(nowUs).append(") from {"); in notifyTimedEvent() 6065 } else if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) { in notifyTimedEvent() 6069 } else if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) { in notifyTimedEvent() 6074 if (nextTimeUs > nowUs && !mPaused) { in notifyTimedEvent() 6076 if (DEBUG) Log.d(TAG, "scheduling for " + nextTimeUs + " and " + nowUs); in notifyTimedEvent() 6084 listener.onTimedEvent(nowUs); in notifyTimedEvent()
|
/frameworks/av/media/libmediaplayerservice/include/ |
D | MediaPlayerInterface.h | 105 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;
|
/frameworks/av/include/media/ |
D | MediaPlayerInterface.h | 105 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const = 0;
|
/frameworks/av/media/libmediaplayerservice/ |
D | MediaPlayerService.cpp | 1922 int64_t MediaPlayerService::AudioOutput::getPlayedOutDurationUs(int64_t nowUs) const in getPlayedOutDurationUs() 1940 numFramesPlayedAtUs = nowUs; in getPlayedOutDurationUs() 1946 numFramesPlayedAtUs = nowUs; in getPlayedOutDurationUs() 1954 + nowUs - numFramesPlayedAtUs; in getPlayedOutDurationUs() 1967 (long long)durationUs, (long long)nowUs, in getPlayedOutDurationUs()
|
D | MediaPlayerService.h | 99 virtual int64_t getPlayedOutDurationUs(int64_t nowUs) const;
|
/frameworks/av/media/libstagefright/httplive/ |
D | LiveSession.cpp | 104 int64_t nowUs = ALooper::GetNowUs(); in addBandwidthMeasurement() local 106 entry.mTimestampUs = nowUs; in addBandwidthMeasurement() 130 if (nowUs - it->mTimestampUs < kMaxBandwidthHistoryAgeUs && in addBandwidthMeasurement()
|