Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74e0f3a6 authored by Bill Yi's avatar Bill Yi
Browse files

Merge commit 'f71d2618' into HEAD

parents 9cc6bb62 f71d2618
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ protected:

private:
    // used by ResourceManagerClient
    status_t reclaim();
    status_t reclaim(bool force = false);
    friend struct ResourceManagerClient;

private:
@@ -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.
     */
+4 −0
Original line number Diff line number Diff line
@@ -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);
    }

+7 −2
Original line number Diff line number Diff line
@@ -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,
@@ -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;
+4 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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;
}

+2 −0
Original line number Diff line number Diff line
@@ -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