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

Commit efd99ec8 authored by Bill Yi's avatar Bill Yi
Browse files

Merge pi-dr1-dev to aosp-master

Change-Id: I5d9258cdbcf160849cc159d017fd97ec5e6211ce
parents 31215a03 d7d5ad51
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -247,8 +247,9 @@ MediaBufferBase* MidiEngine::readBuffer() {
        EAS_I32 numRendered;
        EAS_RESULT result = EAS_Render(mEasData, p, mEasConfig->mixBufferSize, &numRendered);
        if (result != EAS_SUCCESS) {
            ALOGE("EAS_Render returned %ld", result);
            break;
            ALOGE("EAS_Render() returned %ld, numBytesOutput = %d", result, numBytesOutput);
            buffer->release();
            return NULL; // Stop processing to prevent infinite loops.
        }
        p += numRendered * mEasConfig->numChannels;
        numBytesOutput += numRendered * mEasConfig->numChannels * sizeof(EAS_PCM);
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ public:
     * successful only when validation is successful.
     */
    static constexpr char const * const xmlFiles[] = {
            "odm/etc/media_profiles_V1_0.xml",
            "vendor/etc/media_profiles_V1_0.xml",
            "system/etc/media_profiles.xml"
            };
+4 −1
Original line number Diff line number Diff line
@@ -301,10 +301,13 @@ status_t FrameDecoder::extractInternal() {
            err = mSource->read(&mediaBuffer, &mReadOptions);
            mReadOptions.clearSeekTo();
            if (err != OK) {
                ALOGW("Input Error or EOS");
                mHaveMoreInputs = false;
                if (!mFirstSample && err == ERROR_END_OF_STREAM) {
                    (void)mDecoder->queueInputBuffer(
                            index, 0, 0, 0, MediaCodec::BUFFER_FLAG_EOS);
                    err = OK;
                } else {
                    ALOGW("Input Error: err=%d", err);
                }
                break;
            }
+14 −6
Original line number Diff line number Diff line
@@ -860,7 +860,15 @@ static CodecBase *CreateCCodec() {
}

//static
sp<CodecBase> MediaCodec::GetCodecBase(const AString &name) {
sp<CodecBase> MediaCodec::GetCodecBase(const AString &name, const char *owner) {
    if (owner) {
        if (strncmp(owner, "default", 8) == 0) {
            return new ACodec;
        } else if (strncmp(owner, "codec2", 7) == 0) {
            return CreateCCodec();
        }
    }

    if (name.startsWithIgnoreCase("c2.")) {
        return CreateCCodec();
    } else if (name.startsWithIgnoreCase("omx.")) {
@@ -884,11 +892,6 @@ status_t MediaCodec::init(const AString &name) {
    // we need to invest in an extra looper to free the main event
    // queue.

    mCodec = GetCodecBase(name);
    if (mCodec == NULL) {
        return NAME_NOT_FOUND;
    }

    mCodecInfo.clear();

    bool secureCodec = false;
@@ -922,6 +925,11 @@ status_t MediaCodec::init(const AString &name) {
        return NAME_NOT_FOUND;
    }

    mCodec = GetCodecBase(name, mCodecInfo->getOwnerName());
    if (mCodec == NULL) {
        return NAME_NOT_FOUND;
    }

    if (mIsVideo) {
        // video codec needs dedicated looper
        if (mCodecLooper == NULL) {
+599 −840

File changed.

Preview size limit exceeded, changes collapsed.

Loading