Loading include/media/stagefright/MediaCodec.h +4 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ protected: private: // used by ResourceManagerClient status_t reclaim(); status_t reclaim(bool force = false); friend struct ResourceManagerClient; private: Loading Loading @@ -385,6 +385,9 @@ private: uint64_t getGraphicBufferSize(); void addResource(const String8 &type, const String8 &subtype, uint64_t value); bool hasPendingBuffer(int portIndex); bool hasPendingBuffer(); /* called to get the last codec error when the sticky flag is set. * if no such codec error is found, returns UNKNOWN_ERROR. */ Loading include/media/stagefright/MediaCodecList.h +4 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,10 @@ struct MediaCodecList : public BnMediaCodecList { virtual size_t countCodecs() const; virtual sp<MediaCodecInfo> getCodecInfo(size_t index) const { if (index >= mCodecInfos.size()) { ALOGE("b/24445127"); return NULL; } return mCodecInfos.itemAt(index); } Loading media/libmedia/AudioTrack.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -1852,7 +1852,11 @@ nsecs_t AudioTrack::processAudioBuffer() case NO_ERROR: case DEAD_OBJECT: case TIMED_OUT: if (status != DEAD_OBJECT) { // for DEAD_OBJECT, we do not send a EVENT_STREAM_END after stop(); // instead, the application should handle the EVENT_NEW_IAUDIOTRACK. mCbf(EVENT_STREAM_END, mUserData, NULL); } { AutoMutex lock(mLock); // The previously assigned value of waitStreamEnd is no longer valid, Loading Loading @@ -1976,7 +1980,8 @@ nsecs_t AudioTrack::processAudioBuffer() if (err != NO_ERROR) { if (err == TIMED_OUT || err == WOULD_BLOCK || err == -EINTR || (isOffloaded() && (err == DEAD_OBJECT))) { return 0; // FIXME bug 25195759 return 1000000; } ALOGE("Error %d obtaining an audio buffer, giving up.", err); return NS_NEVER; Loading media/libmedia/AudioTrackShared.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -933,7 +933,7 @@ ssize_t StaticAudioTrackServerProxy::pollPosition() return (ssize_t) mState.mPosition; } status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush __unused) status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush) { if (mIsShutdown) { buffer->mFrameCount = 0; Loading Loading @@ -971,7 +971,9 @@ status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush // it is always larger or equal to avail. LOG_ALWAYS_FATAL_IF(mFramesReady < (int64_t) avail); buffer->mNonContig = mFramesReady == INT64_MAX ? SIZE_MAX : clampToSize(mFramesReady - avail); if (!ackFlush) { mUnreleased = avail; } return NO_ERROR; } Loading media/libmediaplayerservice/nuplayer/GenericSource.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -474,6 +474,8 @@ void NuPlayer::GenericSource::notifyPreparedAndCleanup(status_t err) { { Mutex::Autolock _l(mDisconnectLock); mDataSource.clear(); mDecryptHandle = NULL; mDrmManagerClient = NULL; mCachedSource.clear(); mHttpSource.clear(); } Loading Loading
include/media/stagefright/MediaCodec.h +4 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ protected: private: // used by ResourceManagerClient status_t reclaim(); status_t reclaim(bool force = false); friend struct ResourceManagerClient; private: Loading Loading @@ -385,6 +385,9 @@ private: uint64_t getGraphicBufferSize(); void addResource(const String8 &type, const String8 &subtype, uint64_t value); bool hasPendingBuffer(int portIndex); bool hasPendingBuffer(); /* called to get the last codec error when the sticky flag is set. * if no such codec error is found, returns UNKNOWN_ERROR. */ Loading
include/media/stagefright/MediaCodecList.h +4 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,10 @@ struct MediaCodecList : public BnMediaCodecList { virtual size_t countCodecs() const; virtual sp<MediaCodecInfo> getCodecInfo(size_t index) const { if (index >= mCodecInfos.size()) { ALOGE("b/24445127"); return NULL; } return mCodecInfos.itemAt(index); } Loading
media/libmedia/AudioTrack.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -1852,7 +1852,11 @@ nsecs_t AudioTrack::processAudioBuffer() case NO_ERROR: case DEAD_OBJECT: case TIMED_OUT: if (status != DEAD_OBJECT) { // for DEAD_OBJECT, we do not send a EVENT_STREAM_END after stop(); // instead, the application should handle the EVENT_NEW_IAUDIOTRACK. mCbf(EVENT_STREAM_END, mUserData, NULL); } { AutoMutex lock(mLock); // The previously assigned value of waitStreamEnd is no longer valid, Loading Loading @@ -1976,7 +1980,8 @@ nsecs_t AudioTrack::processAudioBuffer() if (err != NO_ERROR) { if (err == TIMED_OUT || err == WOULD_BLOCK || err == -EINTR || (isOffloaded() && (err == DEAD_OBJECT))) { return 0; // FIXME bug 25195759 return 1000000; } ALOGE("Error %d obtaining an audio buffer, giving up.", err); return NS_NEVER; Loading
media/libmedia/AudioTrackShared.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -933,7 +933,7 @@ ssize_t StaticAudioTrackServerProxy::pollPosition() return (ssize_t) mState.mPosition; } status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush __unused) status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush) { if (mIsShutdown) { buffer->mFrameCount = 0; Loading Loading @@ -971,7 +971,9 @@ status_t StaticAudioTrackServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush // it is always larger or equal to avail. LOG_ALWAYS_FATAL_IF(mFramesReady < (int64_t) avail); buffer->mNonContig = mFramesReady == INT64_MAX ? SIZE_MAX : clampToSize(mFramesReady - avail); if (!ackFlush) { mUnreleased = avail; } return NO_ERROR; } Loading
media/libmediaplayerservice/nuplayer/GenericSource.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -474,6 +474,8 @@ void NuPlayer::GenericSource::notifyPreparedAndCleanup(status_t err) { { Mutex::Autolock _l(mDisconnectLock); mDataSource.clear(); mDecryptHandle = NULL; mDrmManagerClient = NULL; mCachedSource.clear(); mHttpSource.clear(); } Loading