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

Commit 0145bf60 authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Additional fixes for extended offload support

 * Fix compilation with debug enabled
 * Allow FLAC offload to be enabled independent of QCOM_HARDWARE,
   tested with the Nexus 5X and is working!
 * Disable the FLACExtractor if offload is enabled since it can
   only output decoded PCM. This will force FFMPEG to be used,
   which does everything we need for FLAC offload

Change-Id: I7d71c153a6a6ea7df8e32bc73f5cbe9f51cdcf64
parent 1512587e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,15 +17,15 @@ LOCAL_C_INCLUDES:= \

LOCAL_CFLAGS += -Wno-multichar -Werror

ifeq ($(call is-vendor-board-platform,QCOM),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio

ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true)
       LOCAL_CFLAGS += -DENABLE_AV_ENHANCEMENTS
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD)),true)
       LOCAL_CFLAGS += -DFLAC_OFFLOAD_ENABLED
endif
endif

LOCAL_MODULE:= libavextensions
LOCAL_CFLAGS += -DLOG_NDEBUG=0
+2 −2
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
#include <media/stagefright/MPEG4Writer.h>
#include <media/stagefright/Utils.h>

#ifdef QCOM_HARDWARE
#if defined(QCOM_HARDWARE) || defined(FLAC_OFFLOAD_ENABLED)
#include "QCMediaDefs.h"
#include "QCMetaData.h"
#ifdef FLAC_OFFLOAD_ENABLED
@@ -97,13 +97,13 @@ static const MetaKeyEntry MetaKeyTable[] {
   {kKeyUseArbitraryMode     , "use-arbitrary-mode"     , INT32},  //bool (int32_t)
   {kKeySmoothStreaming      , "smooth-streaming"       , INT32},  //bool (int32_t)
   {kKeyHFR                  , "hfr"                    , INT32},  // int32_t
#endif
#ifdef FLAC_OFFLOAD_ENABLED
   {kKeyMinBlkSize           , "min-block-size"         , INT32},
   {kKeyMaxBlkSize           , "max-block-size"         , INT32},
   {kKeyMinFrmSize           , "min-frame-size"         , INT32},
   {kKeyMaxFrmSize           , "max-frame-size"         , INT32},
#endif
#endif


   {kKeyBitRate              , "bitrate"                , INT32},
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MetaData.h>
#include <inttypes.h>

namespace android {

+2 −1
Original line number Diff line number Diff line
@@ -178,10 +178,11 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true)
    LOCAL_CFLAGS += -DQTI_FLAC_DECODER
endif
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD)),true)
    LOCAL_CFLAGS += -DFLAC_OFFLOAD_ENABLED
endif
endif

LOCAL_CLANG := true

+2 −0
Original line number Diff line number Diff line
@@ -232,7 +232,9 @@ void DataSource::RegisterDefaultSniffers() {
    RegisterSniffer_l(SniffMatroska);
    RegisterSniffer_l(SniffOgg);
    RegisterSniffer_l(SniffWAV);
#ifndef FLAC_OFFLOAD_ENABLED
    RegisterSniffer_l(SniffFLAC);
#endif
    RegisterSniffer_l(SniffAMR);
    RegisterSniffer_l(SniffMPEG2TS);
    RegisterSniffer_l(SniffMP3);
Loading