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

Commit 806d8883 authored by Naresh Tanniru's avatar Naresh Tanniru Committed by Steve Kondik
Browse files

frameworks/av: fix for testAACEncoder CTS testcase

- testAACEncoders CTS testcase is failing for
  Hardware aac encoder use case

- hardware encoder has bitrate limitation
  due to which  CTS testcase is failing

- Removed hardware AAC encoder component from MediaCodec list,
  added in OMXCodec path on specific request from
  Stagefright recorder

Change-Id: Idff8abf4b768f63262da0576768fb13c9d6df1de
parent 7e512c42
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -62,9 +62,6 @@ MediaCodecList::MediaCodecList()

        addMediaCodec(true /* encoder */, "AACEncoder", "audio/mp4a-latm");

        addMediaCodec(
                true /* encoder */, "OMX.qcom.audio.encoder.aac", "audio/mp4a-latm");

        addMediaCodec(
                false /* encoder */, "OMX.google.raw.decoder", "audio/raw");
    }
+22 −0
Original line number Diff line number Diff line
@@ -253,6 +253,20 @@ void OMXCodec::findMatchingCodecs(
    }

    size_t index = 0;

#ifdef ENABLE_QC_AV_ENHANCEMENTS
    //Check if application specially reuqested for  aac hardware encoder
    //This is not a part of  mediacodec list
    if (matchComponentName && !strcmp("OMX.qcom.audio.encoder.aac", matchComponentName)) {
        matchingCodecs->add();

        CodecNameAndQuirks *entry = &matchingCodecs->editItemAt(index);
        entry->mName = String8("OMX.qcom.audio.encoder.aac");
        entry->mQuirks = 0;
        return;
    }
#endif

    for (;;) {
        ssize_t matchIndex =
            list->findCodecByType(mime, createEncoder, index);
@@ -351,6 +365,14 @@ bool OMXCodec::findCodecQuirks(const char *componentName, uint32_t *quirks) {
    if (list == NULL) {
        return false;
    }
#ifdef ENABLE_QC_AV_ENHANCEMENTS
    //Check for aac hardware encoder
    //This is not a part of  mediacodec list
    if (componentName && !strcmp("OMX.qcom.audio.encoder.aac", componentName)) {
        *quirks = 0;
        return true;
    }
#endif

    ssize_t index = list->findCodecByName(componentName);