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

Commit 363be082 authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

Merge "codec2: trim log" into qt-r1-dev

am: 5fb6ec70

Change-Id: Ia324e08ab474973227b1cf559fcf0d2caec423ee
parents 68790eb7 5fb6ec70
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -375,7 +375,11 @@ public:

        // consumer usage is queried earlier.

        if (status.str().empty()) {
            ALOGD("ISConfig not changed");
        } else {
            ALOGD("ISConfig%s", status.str().c_str());
        }
        return err;
    }

+24 −2
Original line number Diff line number Diff line
@@ -235,7 +235,10 @@ struct StandardParams {
    const std::vector<ConfigMapper> &getConfigMappersForSdkKey(std::string key) const {
        auto it = mConfigMappers.find(key);
        if (it == mConfigMappers.end()) {
            if (mComplained.count(key) == 0) {
                ALOGD("no c2 equivalents for %s", key.c_str());
                mComplained.insert(key);
            }
            return NO_MAPPERS;
        }
        ALOGV("found %zu eqs for %s", it->second.size(), key.c_str());
@@ -304,6 +307,7 @@ struct StandardParams {

private:
    std::map<SdkKey, std::vector<ConfigMapper>> mConfigMappers;
    mutable std::set<std::string> mComplained;
};

const std::vector<ConfigMapper> StandardParams::NO_MAPPERS;
@@ -1028,7 +1032,25 @@ bool CCodecConfig::updateFormats(Domain domain) {
    }

    ReflectedParamUpdater::Dict reflected = mParamUpdater->getParams(paramPointers);
    ALOGD("c2 config is %s", reflected.debugString().c_str());
    std::string config = reflected.debugString();
    std::set<std::string> configLines;
    std::string diff;
    for (size_t start = 0; start != std::string::npos; ) {
        size_t end = config.find('\n', start);
        size_t count = (end == std::string::npos)
                ? std::string::npos
                : end - start + 1;
        std::string line = config.substr(start, count);
        configLines.insert(line);
        if (mLastConfig.count(line) == 0) {
            diff.append(line);
        }
        start = (end == std::string::npos) ? std::string::npos : end + 1;
    }
    if (!diff.empty()) {
        ALOGD("c2 config diff is %s", diff.c_str());
    }
    mLastConfig.swap(configLines);

    bool changed = false;
    if (domain & mInputDomain) {
+2 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ struct CCodecConfig {
    /// For now support a validation function.
    std::map<C2Param::Index, LocalParamValidator> mLocalParams;

    std::set<std::string> mLastConfig;

    CCodecConfig();

    /// initializes the members required to manage the format: descriptors, reflector,