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

Commit 7725466d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio : Fixed usage of QTI_FLAC_DECODER"

parents 83b3831b c4f2a4f4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@ class StagefrightPlayerFactory :
                               int64_t /*length*/,
                               float /*curScore*/) {

#ifdef QTI_FLAC_DECODER
        // Flac playback forced to Awesomeplayer
        if (fd) {
            char symName[40] = {0};
@@ -201,6 +202,7 @@ class StagefrightPlayerFactory :
                }
            }
        }
#endif
        if (getDefaultPlayerType()
                == STAGEFRIGHT_PLAYER) {
            char buf[20];
+6 −2
Original line number Diff line number Diff line
@@ -4773,7 +4773,9 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
                "OMX.qcom.audio.encoder.aac",  // OMX.qcom.audio.encoder.aac
                0,     // flags
                &matchingCodecs);
    } else if (!strcasecmp(mime.c_str(), MEDIA_MIMETYPE_AUDIO_FLAC) && !encoder) {
    }
#ifdef QTI_FLAC_DECODER
    else if (!strcasecmp(mime.c_str(), MEDIA_MIMETYPE_AUDIO_FLAC) && !encoder) {
        //use google's raw decoder
        OMXCodec::findMatchingCodecs(
                MEDIA_MIMETYPE_AUDIO_RAW,
@@ -4781,7 +4783,9 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
                "OMX.google.raw.decoder",
                0, //flags
                &matchingCodecs);
    } else
    }
#endif
     else
        OMXCodec::findMatchingCodecs(
                mime.c_str(),
                encoder, // createEncoder
+5 −3
Original line number Diff line number Diff line
@@ -286,16 +286,18 @@ status_t NuMediaExtractor::selectTrack(size_t index) {

    const char *mime;
    CHECK(source->getFormat()->findCString(kKeyMIMEType, &mime));
    if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC)) {
#ifdef QTI_FLAC_DECODER
    if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC)) {
        sp<MediaSource> mFlacSource = new FLACDecoder(source);
        info->mSource = mFlacSource;
        mFlacSource->start();
#endif
    } else {
    }
#else
    {
        CHECK_EQ((status_t)OK, source->start());
        info->mSource = source;
    }
#endif

    info->mTrackIndex = index;
    info->mFinalResult = OK;
+6 −2
Original line number Diff line number Diff line
@@ -310,7 +310,8 @@ void OMXCodec::findMatchingCodecs(
        return;
    }

    if (matchComponentName && !strncmp("FLACDecoder", matchComponentName, 10)) {
#ifdef QTI_FLAC_DECODER
    if (matchComponentName && !strncmp("FLACDecoder", matchComponentName, strlen("FLACDecoder"))) {
            matchingCodecs->add();

            CodecNameAndQuirks *entry = &matchingCodecs->editItemAt(index);
@@ -318,6 +319,7 @@ void OMXCodec::findMatchingCodecs(
            entry->mQuirks = 0;
            return;
    }
#endif
#endif

    for (;;) {
@@ -447,10 +449,12 @@ sp<MediaSource> OMXCodec::Create(

    Vector<CodecNameAndQuirks> matchingCodecs;

    if (!strncmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC, 10)) {
#ifdef QTI_FLAC_DECODER
    if (!strncmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC, strlen(MEDIA_MIMETYPE_AUDIO_FLAC))) {
        findMatchingCodecs(mime, createEncoder,
            "FLACDecoder", flags, &matchingCodecs);
    } else
#endif
        findMatchingCodecs(
            mime, createEncoder, matchComponentName, flags, &matchingCodecs);