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

Commit e963ebdb authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "When using "secure input buffer mode" we instantiate a different OMX component"

parents 96d8a6f8 753fd9a3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -442,9 +442,17 @@ sp<MediaSource> OMXCodec::Create(
    sp<OMXCodecObserver> observer = new OMXCodecObserver;
    IOMX::node_id node = 0;

    const char *componentName;
    for (size_t i = 0; i < matchingCodecs.size(); ++i) {
        componentName = matchingCodecs[i].string();
        const char *componentNameBase = matchingCodecs[i].string();
        const char *componentName = componentNameBase;

        AString tmp;
        if (flags & kUseSecureInputBuffers) {
            tmp = componentNameBase;
            tmp.append(".secure");

            componentName = tmp.c_str();
        }

        if (createEncoder) {
            sp<MediaSource> softwareCodec =
@@ -459,7 +467,7 @@ sp<MediaSource> OMXCodec::Create(

        LOGV("Attempting to allocate OMX node '%s'", componentName);

        uint32_t quirks = getComponentQuirks(componentName, createEncoder);
        uint32_t quirks = getComponentQuirks(componentNameBase, createEncoder);

        if (!createEncoder
                && (quirks & kOutputBuffersAreUnreadable)