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

Commit 753fd9a3 authored by Andreas Huber's avatar Andreas Huber
Browse files

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

We form the new component name by appending the suffix ".secure".

Change-Id: I509848b50ae92edb179a941493ca611f923213ec
parent 422e3f74
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)