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

Commit f917fa30 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "omx: calculate nodePrefix only for components listed in IOmx" am: 5032895b am: 0cc43f41

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1401263

Change-Id: Iee04951ad63740cbd2505259b2ef82be475ed8dd
parents 9f231233 0cc43f41
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -54,6 +54,24 @@ OmxStore::OmxStore(
        });
    }

    if (!nodes.empty()) {
        auto anyNode = nodes.cbegin();
        std::string::const_iterator first = anyNode->cbegin();
        std::string::const_iterator last = anyNode->cend();
        for (const std::string &name : nodes) {
            std::string::const_iterator it1 = first;
            for (std::string::const_iterator it2 = name.cbegin();
                    it1 != last && it2 != name.cend() && tolower(*it1) == tolower(*it2);
                    ++it1, ++it2) {
            }
            last = it1;
        }
        mPrefix = std::string(first, last);
        LOG(INFO) << "omx common prefix: '" << mPrefix.c_str() << "'";
    } else {
        LOG(INFO) << "omx common prefix: no nodes";
    }

    MediaCodecsXmlParser parser;
    parser.parseXmlFilesInSearchDirs(xmlNames, searchDirs);
    if (profilingResultsXmlPath != nullptr) {
@@ -112,8 +130,6 @@ OmxStore::OmxStore(
        mRoleList[i] = std::move(role);
        ++i;
    }

    mPrefix = parser.getCommonPrefix();
}

OmxStore::~OmxStore() {