summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-09-11 09:54:52 -0700
committerAndreas Huber <andih@google.com>2009-09-11 09:54:52 -0700
commit8f0e4aace6c0643f7c4005184c7df2c73368f0dc (patch)
treefb0065cc26fe6f3b6dfc2104985684e8e9077966
parent777893a928680f09e306b4b9efc1d5cf4479a9da (diff)
downloadframeworks_av-8f0e4aace6c0643f7c4005184c7df2c73368f0dc.zip
frameworks_av-8f0e4aace6c0643f7c4005184c7df2c73368f0dc.tar.gz
frameworks_av-8f0e4aace6c0643f7c4005184c7df2c73368f0dc.tar.bz2
Only build the "full" stagefright (including MediaExtractors and MediaPlayer) if BUILD_WITH_FULL_STAGEFRIGHT define is set (to true).
-rw-r--r--cmds/stagefright/Android.mk4
-rw-r--r--media/libmediaplayerservice/Android.mk10
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp4
-rw-r--r--media/libstagefright/Android.mk26
4 files changed, 33 insertions, 11 deletions
diff --git a/cmds/stagefright/Android.mk b/cmds/stagefright/Android.mk
index 4550d1a..39ed769 100644
--- a/cmds/stagefright/Android.mk
+++ b/cmds/stagefright/Android.mk
@@ -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
diff --git a/media/libmediaplayerservice/Android.mk b/media/libmediaplayerservice/Android.mk
index 59ecde6..93b7a3a 100644
--- a/media/libmediaplayerservice/Android.mk
+++ b/media/libmediaplayerservice/Android.mk
@@ -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
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 8998f10..8b1c9dc 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -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();
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 22769ba..79a32b5 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -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