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

Commit 37576618 authored by Sharad Sangle's avatar Sharad Sangle Committed by Linux Build Service Account
Browse files

audio: add support for FLAC decoding

 added support for FLAC decoding

Change-Id: Ia35b0b9218fdf2584348a2a95bf0401c5065dedc
parent aeb382ad
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2069,7 +2069,7 @@ status_t ACodec::configureCodec(
            }
            err = setupG711Codec(encoder, sampleRate, numChannels);
        }
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC)) {
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC) && encoder) {
        int32_t numChannels = 0, sampleRate = 0, compressionLevel = -1;
        if (encoder &&
                (!msg->findInt32("channel-count", &numChannels)
@@ -4179,7 +4179,8 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {

                    if (params.nChannels <= 0
                            || (params.nChannels != 1 && !params.bInterleaved)
                            || params.nBitPerSample != 16u
                            || (params.nBitPerSample != 16u
                                    && params.nBitPerSample != 24u)// we support 16/24 bit s/w decoding
                            || params.eNumData != OMX_NumericalDataSigned
                            || params.ePCMMode != OMX_AUDIO_PCMModeLinear) {
                        ALOGE("unsupported PCM port: %u channels%s, %u-bit, %s(%d), %s(%d) mode ",
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@ LOCAL_SHARED_LIBRARIES := \
        libstagefright_foundation       \
        libdl

ifeq ($(call is-vendor-board-platform,QCOM),true)
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true)
    LOCAL_CFLAGS += -DQTI_FLAC_DECODER
endif
endif

LOCAL_MODULE:= libstagefright_omx
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ static const struct {
    { "OMX.google.raw.decoder", "rawdec", "audio_decoder.raw" },
    { "OMX.google.flac.encoder", "flacenc", "audio_encoder.flac" },
    { "OMX.google.gsm.decoder", "gsmdec", "audio_decoder.gsm" },
#ifdef QTI_FLAC_DECODER
    { "OMX.qti.audio.decoder.flac", "flacdec", "audio_decoder.flac" },
#endif
};

static const size_t kNumComponents =