Loading include/media/stagefright/AudioSource.h +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ private: int64_t mStartTimeUs; int16_t mMaxAmplitude; int64_t mPrevSampleTimeUs; int64_t mFirstSampleTimeUs; int64_t mInitialReadTimeUs; int64_t mNumFramesReceived; int64_t mNumClientOwnedBuffers; Loading media/libstagefright/AudioSource.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ AudioSource::AudioSource( mStartTimeUs(0), mMaxAmplitude(0), mPrevSampleTimeUs(0), mFirstSampleTimeUs(-1ll), mInitialReadTimeUs(0), mNumFramesReceived(0), mNumClientOwnedBuffers(0) { Loading Loading @@ -277,11 +276,7 @@ status_t AudioSource::read( } if (mSampleRate != mOutSampleRate) { if (mFirstSampleTimeUs < 0) { mFirstSampleTimeUs = timeUs; } timeUs = mFirstSampleTimeUs + (timeUs - mFirstSampleTimeUs) * (int64_t)mSampleRate / (int64_t)mOutSampleRate; timeUs *= (int64_t)mSampleRate / (int64_t)mOutSampleRate; buffer->meta_data()->setInt64(kKeyTime, timeUs); } Loading media/libstagefright/omx/GraphicBufferSource.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -792,7 +792,8 @@ int64_t GraphicBufferSource::getTimestamp(const BufferItem &item) { if (mPrevCaptureUs < 0ll) { // first capture mPrevCaptureUs = timeUs; mPrevFrameUs = timeUs; // adjust the first sample timestamp. mPrevFrameUs = (timeUs * mTimePerFrameUs) / mTimePerCaptureUs; } else { // snap to nearest capture point int64_t nFrames = (timeUs + mTimePerCaptureUs / 2 - mPrevCaptureUs) Loading Loading
include/media/stagefright/AudioSource.h +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ private: int64_t mStartTimeUs; int16_t mMaxAmplitude; int64_t mPrevSampleTimeUs; int64_t mFirstSampleTimeUs; int64_t mInitialReadTimeUs; int64_t mNumFramesReceived; int64_t mNumClientOwnedBuffers; Loading
media/libstagefright/AudioSource.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ AudioSource::AudioSource( mStartTimeUs(0), mMaxAmplitude(0), mPrevSampleTimeUs(0), mFirstSampleTimeUs(-1ll), mInitialReadTimeUs(0), mNumFramesReceived(0), mNumClientOwnedBuffers(0) { Loading Loading @@ -277,11 +276,7 @@ status_t AudioSource::read( } if (mSampleRate != mOutSampleRate) { if (mFirstSampleTimeUs < 0) { mFirstSampleTimeUs = timeUs; } timeUs = mFirstSampleTimeUs + (timeUs - mFirstSampleTimeUs) * (int64_t)mSampleRate / (int64_t)mOutSampleRate; timeUs *= (int64_t)mSampleRate / (int64_t)mOutSampleRate; buffer->meta_data()->setInt64(kKeyTime, timeUs); } Loading
media/libstagefright/omx/GraphicBufferSource.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -792,7 +792,8 @@ int64_t GraphicBufferSource::getTimestamp(const BufferItem &item) { if (mPrevCaptureUs < 0ll) { // first capture mPrevCaptureUs = timeUs; mPrevFrameUs = timeUs; // adjust the first sample timestamp. mPrevFrameUs = (timeUs * mTimePerFrameUs) / mTimePerCaptureUs; } else { // snap to nearest capture point int64_t nFrames = (timeUs + mTimePerCaptureUs / 2 - mPrevCaptureUs) Loading