Skip to content

Commit

Permalink
frameworks/av: Fixup after squashed commit of CAF media features
Browse files Browse the repository at this point in the history
 * Fixed makefiles and ifdefs
 * Remarked out one line in MPEG4Extractor.cpp due to compile error

Change-Id: I40a8b12f8ca3fe0f372d68b0e3cf02aa33ffe3c3
  • Loading branch information
arco authored and gmillz committed Nov 25, 2013
1 parent fa0fe08 commit 815b10f
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 25 deletions.
8 changes: 6 additions & 2 deletions media/libmedia/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ LOCAL_SRC_FILES:= \
AudioTrackShared.cpp \
IAudioFlinger.cpp \
IAudioFlingerClient.cpp \
IDirectTrack.cpp \
IDirectTrackClient.cpp \
IAudioTrack.cpp \
IAudioRecord.cpp \
ICrypto.cpp \
Expand Down Expand Up @@ -78,6 +76,12 @@ ifeq ($(BOARD_USE_SAMSUNG_SEPARATEDSTREAM),true)
LOCAL_CFLAGS += -DUSE_SAMSUNG_SEPARATEDSTREAM
endif

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
LOCAL_SRC_FILES += \
IDirectTrack.cpp \
IDirectTrackClient.cpp
endif

# for <cutils/atomic-inline.h>
LOCAL_CFLAGS += -DANDROID_SMP=$(if $(findstring true,$(TARGET_CPU_SMP)),1,0)
LOCAL_SRC_FILES += SingleStateQueue.cpp
Expand Down
2 changes: 1 addition & 1 deletion media/libstagefright/ACodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ status_t ACodec::setComponentRole(
"audio_decoder.amrnb", "audio_encoder.amrnb" },
{ MEDIA_MIMETYPE_AUDIO_AMR_WB,
"audio_decoder.amrwb", "audio_encoder.amrwb" },
#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
{ MEDIA_MIMETYPE_AUDIO_AMR_WB_PLUS,
"audio_decoder.amrwbplus", "audio_encoder.amrwbplus" },
#endif
Expand Down
35 changes: 23 additions & 12 deletions media/libstagefright/Android.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

ifeq ($(BOARD_USES_ALSA_AUDIO),true)
ifeq ($(USE_TUNNEL_MODE),true)
LOCAL_CFLAGS += -DUSE_TUNNEL_MODE
endif
ifeq ($(NO_TUNNEL_MODE_FOR_MULTICHANNEL),true)
LOCAL_CFLAGS += -DNO_TUNNEL_MODE_FOR_MULTICHANNEL
endif
endif

include frameworks/av/media/libstagefright/codecs/common/Config.mk

ifeq ($(BOARD_HTC_3D_SUPPORT),true)
Expand All @@ -34,7 +25,6 @@ LOCAL_SRC_FILES:= \
FLACExtractor.cpp \
HTTPBase.cpp \
JPEGSource.cpp \
LPAPlayerALSA.cpp \
MP3Extractor.cpp \
MPEG2TSWriter.cpp \
MPEG4Extractor.cpp \
Expand Down Expand Up @@ -64,7 +54,6 @@ LOCAL_SRC_FILES:= \
ThrottledSource.cpp \
TimeSource.cpp \
TimedEventQueue.cpp \
TunnelPlayer.cpp \
Utils.cpp \
VBRISeeker.cpp \
WAVExtractor.cpp \
Expand Down Expand Up @@ -92,6 +81,22 @@ else
LOCAL_C_INCLUDES += $(TOP)/frameworks/native/include/media/openmax
endif

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
ifeq ($(BOARD_USES_ALSA_AUDIO),true)
LOCAL_SRC_FILES += LPAPlayerALSA.cpp
endif
ifeq ($(USE_TUNNEL_MODE),true)
LOCAL_SRC_FILES += TunnelPlayer.cpp
LOCAL_CFLAGS += -DUSE_TUNNEL_MODE
endif
ifeq ($(TUNNEL_MODE_SUPPORTS_AMRWB),true)
LOCAL_CFLAGS += -DTUNNEL_MODE_SUPPORTS_AMRWB
endif
ifeq ($(NO_TUNNEL_MODE_FOR_MULTICHANNEL),true)
LOCAL_CFLAGS += -DNO_TUNNEL_MODE_FOR_MULTICHANNEL
endif
endif

ifneq ($(TARGET_QCOM_MEDIA_VARIANT),)
LOCAL_C_INCLUDES += \
$(TOP)/hardware/qcom/media-$(TARGET_QCOM_MEDIA_VARIANT)/mm-core/inc
Expand Down Expand Up @@ -139,9 +144,15 @@ LOCAL_STATIC_LIBRARIES := \

ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true)
LOCAL_CFLAGS += -DENABLE_AV_ENHANCEMENTS
LOCAL_C_INCLUDES += $(TOP)/hardware/qcom/media/mm-core/inc
LOCAL_SRC_FILES += ExtendedMediaDefs.cpp
LOCAL_SRC_FILES += ExtendedWriter.cpp
ifneq ($(TARGET_QCOM_MEDIA_VARIANT),)
LOCAL_C_INCLUDES += \
$(TOP)/hardware/qcom/media-$(TARGET_QCOM_MEDIA_VARIANT)/mm-core/inc
else
LOCAL_C_INCLUDES += \
$(TOP)/hardware/qcom/media/mm-core/inc
endif
endif #TARGET_ENABLE_AV_ENHANCEMENTS

LOCAL_SRC_FILES += \
Expand Down
4 changes: 2 additions & 2 deletions media/libstagefright/AudioSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <media/stagefright/foundation/ALooper.h>
#include <cutils/properties.h>
#include <stdlib.h>
#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
#include <QCMediaDefs.h>
#endif
#include <system/audio.h>
Expand Down Expand Up @@ -131,7 +131,7 @@ AudioSource::AudioSource( audio_source_t inputSource, const sp<MetaData>& meta )
frameSize = AMR_FRAMESIZE;
mMaxBufferSize = AMR_FRAMESIZE*10;
}
#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
else if ( !strcasecmp( mime, MEDIA_MIMETYPE_AUDIO_QCELP ) ) {
mFormat = AUDIO_FORMAT_QCELP;
frameSize = QCELP_FRAMESIZE;
Expand Down
2 changes: 1 addition & 1 deletion media/libstagefright/AwesomePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3282,7 +3282,7 @@ bool AwesomePlayer::inSupportedTunnelFormats(const char * mime) {
MEDIA_MIMETYPE_AUDIO_AAC,
#ifdef TUNNEL_MODE_SUPPORTS_AMRWB
MEDIA_MIMETYPE_AUDIO_AMR_WB,
#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
MEDIA_MIMETYPE_AUDIO_AMR_WB_PLUS
#endif
#endif
Expand Down
10 changes: 5 additions & 5 deletions media/libstagefright/MPEG4Extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MetaData.h>
#include <utils/String8.h>
#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
#include <QCMediaDefs.h>
#include "include/ExtendedUtils.h"
#endif
Expand Down Expand Up @@ -330,7 +330,7 @@ static const char *FourCC2MIME(uint32_t fourcc) {
case FOURCC('a', 'v', 'c', '1'):
return MEDIA_MIMETYPE_VIDEO_AVC;

#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
case FOURCC('s', 'q', 'c', 'p'):
return MEDIA_MIMETYPE_AUDIO_QCELP;
case FOURCC('s', 'e', 'v', 'c'):
Expand Down Expand Up @@ -2302,7 +2302,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
return ERROR_MALFORMED;
}

#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
if (objectTypeIndication == 0xA0) {
mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_EVRC);
return OK;
Expand Down Expand Up @@ -3230,8 +3230,8 @@ status_t MPEG4Source::read(

return ERROR_IO;
}
#ifdef ENABLE_QC_AV_ENHANCEMENTS
ExtendedUtils::helper_mpeg4extractor_checkAC3EAC3(mBuffer, mFormat, size);
#ifdef ENABLE_AV_ENHANCEMENTS
// ExtendedUtils::helper_mpeg4extractor_checkAC3EAC3(mBuffer, mFormat, size);
#endif
CHECK(mBuffer != NULL);
mBuffer->set_range(0, size);
Expand Down
4 changes: 2 additions & 2 deletions media/libstagefright/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <media/AudioParameter.h>
#include <media/stagefright/ExtendedCodec.h>

#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
#include "QCMetaData.h"
#endif

Expand Down Expand Up @@ -134,7 +134,7 @@ status_t convertMetaDataToMessage(
msg->setInt32("is-adts", true);
}

#ifdef ENABLE_QC_AV_ENHANCEMENTS
#ifdef ENABLE_AV_ENHANCEMENTS
uint32_t type;
const void *data;
size_t size;
Expand Down

0 comments on commit 815b10f

Please sign in to comment.