Merge change 24702 into eclair

* changes:
  Only build the "full" stagefright (including MediaExtractors and MediaPlayer) if BUILD_WITH_FULL_STAGEFRIGHT define is set (to true).
This commit is contained in:
Android (Google) Code Review
2009-09-11 13:11:20 -04:00
4 changed files with 33 additions and 11 deletions

View File

@@ -1,3 +1,5 @@
ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
@@ -38,3 +40,5 @@ LOCAL_CFLAGS += -Wno-multichar
LOCAL_MODULE:= record
include $(BUILD_EXECUTABLE)
endif

View File

@@ -10,13 +10,21 @@ LOCAL_SRC_FILES:= \
MediaRecorderClient.cpp \
MediaPlayerService.cpp \
MetadataRetrieverClient.cpp \
StagefrightPlayer.cpp \
TestPlayerStub.cpp \
VorbisPlayer.cpp \
VorbisMetadataRetriever.cpp \
MidiMetadataRetriever.cpp \
MidiFile.cpp
ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
LOCAL_SRC_FILES += \
StagefrightPlayer.cpp
LOCAL_CFLAGS += -DBUILD_WITH_FULL_STAGEFRIGHT=1
endif
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl -lpthread
endif

View File

@@ -602,11 +602,13 @@ void MediaPlayerService::Client::disconnect()
}
static player_type getDefaultPlayerType() {
#if BUILD_WITH_FULL_STAGEFRIGHT
char value[PROPERTY_VALUE_MAX];
if (property_get("media.stagefright.enable-player", value, NULL)
&& (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
return STAGEFRIGHT_PLAYER;
}
#endif
return PV_PLAYER;
}
@@ -684,10 +686,12 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie,
LOGV(" create VorbisPlayer");
p = new VorbisPlayer();
break;
#if BUILD_WITH_FULL_STAGEFRIGHT
case STAGEFRIGHT_PLAYER:
LOGV(" create StagefrightPlayer");
p = new StagefrightPlayer;
break;
#endif
case TEST_PLAYER:
LOGV("Create Test Player stub");
p = new TestPlayerStub();

View File

@@ -2,6 +2,19 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
ESDS.cpp \
MediaBuffer.cpp \
MediaBufferGroup.cpp \
MediaDefs.cpp \
MediaSource.cpp \
MetaData.cpp \
OMXCodec.cpp \
Utils.cpp \
OMXClient.cpp
ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
LOCAL_SRC_FILES += \
AMRExtractor.cpp \
CachingDataSource.cpp \
DataSource.cpp \
@@ -9,28 +22,21 @@ LOCAL_SRC_FILES:= \
HTTPDataSource.cpp \
HTTPStream.cpp \
JPEGSource.cpp \
MediaExtractor.cpp \
MP3Extractor.cpp \
MPEG4Extractor.cpp \
MPEG4Writer.cpp \
MediaBuffer.cpp \
MediaBufferGroup.cpp \
MediaDefs.cpp \
MediaExtractor.cpp \
MediaPlayerImpl.cpp \
MediaSource.cpp \
MetaData.cpp \
MmapSource.cpp \
OMXCodec.cpp \
SampleTable.cpp \
ShoutcastSource.cpp \
TimeSource.cpp \
TimedEventQueue.cpp \
Utils.cpp \
AudioPlayer.cpp \
ESDS.cpp \
OMXClient.cpp \
string.cpp
endif
LOCAL_C_INCLUDES:= \
$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
$(TOP)/external/opencore/android