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

Commit a6f9da5b authored by Naresh Tanniru's avatar Naresh Tanniru Committed by Ricardo Cerqueira
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 da5a24f1
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -215,6 +215,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);
@@ -296,6 +310,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);