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

Commit 52a90662 authored by bohu's avatar bohu Committed by Bo Hu
Browse files

codecs: ignore failed codec builder

Currently there are two codec builders:
omx and c2. When one of them fails to build,
the other one might still succeed.
This situation can happen in 64bit only guest.
when omx will fail as WAI; but c2 can succeed.

This cl will ignore the failed builder and
continue with other builders.

BUG: 170418402

Test:
lunch sdk_phone64_x86_64-userdebug
m -j
emulator

check codec lists

Change-Id: I7e17e07130dd7dab8666a59ad5d5b9fdff5b8b8a
parent 4c51bbb3
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -209,9 +209,12 @@ MediaCodecList::MediaCodecList(std::vector<MediaCodecListBuilderBase*> builders)
            ALOGD("ignored a null builder");
            continue;
        }
        mInitCheck = builder->buildMediaCodecList(&writer);
        if (mInitCheck != OK) {
            break;
        auto currentCheck = builder->buildMediaCodecList(&writer);
        if (currentCheck != OK) {
            ALOGD("ignored failed builder");
            continue;
        } else {
            mInitCheck = currentCheck;
        }
    }
    writer.writeGlobalSettings(mGlobalSettings);
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ private:
    static sp<IMediaCodecList> sCodecList;
    static sp<IMediaCodecList> sRemoteList;

    status_t mInitCheck;
    status_t mInitCheck{NO_INIT};

    sp<AMessage> mGlobalSettings;
    std::vector<sp<MediaCodecInfo> > mCodecInfos;