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

Commit d930ab64 authored by Wonsik Kim's avatar Wonsik Kim Committed by Gerrit Code Review
Browse files

Merge "CCodecConfig: Add mapper for aac-profile"

parents bf58beb6 189d4db8
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -733,6 +733,17 @@ void CCodecConfig::initializeStandardParams() {
            return C2Value();
        }));

    add(ConfigMapper(KEY_AAC_PROFILE, C2_PARAMKEY_PROFILE_LEVEL, "profile")
        .limitTo(D::AUDIO & D::ENCODER & (D::CONFIG | D::PARAM))
        .withMapper([mapper](C2Value v) -> C2Value {
            C2Config::profile_t c2 = PROFILE_UNUSED;
            int32_t sdk;
            if (mapper && v.get(&sdk) && mapper->mapProfile(sdk, &c2)) {
                return c2;
            }
            return PROFILE_UNUSED;
        }));

    // convert to dBFS and add default
    add(ConfigMapper(KEY_AAC_DRC_TARGET_REFERENCE_LEVEL, C2_PARAMKEY_DRC_TARGET_REFERENCE_LEVEL, "value")
        .limitTo(D::AUDIO & D::DECODER & (D::CONFIG | D::PARAM | D::READ))