Loading media/libstagefright/MediaCodec.cpp +11 −13 Original line number Diff line number Diff line Loading @@ -1609,24 +1609,22 @@ void MediaCodec::statsBufferSent(int64_t presentationUs, const sp<MediaCodecBuff mFramesInput++; } const int64_t nowNs = systemTime(SYSTEM_TIME_MONOTONIC); BufferFlightTiming_t startdata = { presentationUs, nowNs }; { // mutex access to mBuffersInFlight and other stats Mutex::Autolock al(mLatencyLock); // XXX: we *could* make sure that the time is later than the end of queue // as part of a consistency check... if (!mTunneled) { const int64_t nowNs = systemTime(SYSTEM_TIME_MONOTONIC); BufferFlightTiming_t startdata = { presentationUs, nowNs }; mBuffersInFlight.push_back(startdata); } if (mIsLowLatencyModeOn && mIndexOfFirstFrameWhenLowLatencyOn < 0) { mIndexOfFirstFrameWhenLowLatencyOn = mInputBufferCounter; } ++mInputBufferCounter; } } // when we get a buffer back from the codec void MediaCodec::statsBufferReceived(int64_t presentationUs, const sp<MediaCodecBuffer> &buffer) { Loading Loading
media/libstagefright/MediaCodec.cpp +11 −13 Original line number Diff line number Diff line Loading @@ -1609,24 +1609,22 @@ void MediaCodec::statsBufferSent(int64_t presentationUs, const sp<MediaCodecBuff mFramesInput++; } const int64_t nowNs = systemTime(SYSTEM_TIME_MONOTONIC); BufferFlightTiming_t startdata = { presentationUs, nowNs }; { // mutex access to mBuffersInFlight and other stats Mutex::Autolock al(mLatencyLock); // XXX: we *could* make sure that the time is later than the end of queue // as part of a consistency check... if (!mTunneled) { const int64_t nowNs = systemTime(SYSTEM_TIME_MONOTONIC); BufferFlightTiming_t startdata = { presentationUs, nowNs }; mBuffersInFlight.push_back(startdata); } if (mIsLowLatencyModeOn && mIndexOfFirstFrameWhenLowLatencyOn < 0) { mIndexOfFirstFrameWhenLowLatencyOn = mInputBufferCounter; } ++mInputBufferCounter; } } // when we get a buffer back from the codec void MediaCodec::statsBufferReceived(int64_t presentationUs, const sp<MediaCodecBuffer> &buffer) { Loading