diff options
Diffstat (limited to 'media/libmediaplayerservice/MediaPlayerService.cpp')
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 61 |
1 files changed, 3 insertions, 58 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index d45c17b..82d5c14 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -56,7 +56,6 @@ #include "MetadataRetrieverClient.h" #include "MidiFile.h" -#include "VorbisPlayer.h" #include <media/PVPlayer.h> #include "TestPlayerStub.h" #include "StagefrightPlayer.h" @@ -197,8 +196,6 @@ extmap FILE_EXTS [] = { {".rtttl", SONIVOX_PLAYER}, {".rtx", SONIVOX_PLAYER}, {".ota", SONIVOX_PLAYER}, - {".ogg", VORBIS_PLAYER}, - {".oga", VORBIS_PLAYER}, #ifndef NO_OPENCORE {".wma", PV_PLAYER}, {".wmv", PV_PLAYER}, @@ -666,37 +663,9 @@ 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; -} - -// By default we use the VORBIS_PLAYER for vorbis playback (duh!), -// but if the magic property is set we will use our new experimental -// stagefright code instead. -static player_type OverrideStagefrightForVorbis(player_type player) { - if (player != VORBIS_PLAYER) { - return player; - } - -#if BUILD_WITH_FULL_STAGEFRIGHT - char value[PROPERTY_VALUE_MAX]; - if (property_get("media.stagefright.enable-vorbis", value, NULL) - && (!strcmp(value, "1") || !strcmp(value, "true"))) { - return STAGEFRIGHT_PLAYER; - } -#endif - - return VORBIS_PLAYER; + return STAGEFRIGHT_PLAYER; } - player_type getPlayerType(int fd, int64_t offset, int64_t length) { char buf[20]; @@ -708,7 +677,7 @@ player_type getPlayerType(int fd, int64_t offset, int64_t length) // Ogg vorbis? if (ident == 0x5367674f) // 'OggS' - return OverrideStagefrightForVorbis(VORBIS_PLAYER); + return STAGEFRIGHT_PLAYER; #ifndef NO_OPENCORE if (ident == 0x75b22630) { @@ -744,13 +713,6 @@ player_type getPlayerType(const char* url) return TEST_PLAYER; } - bool useStagefrightForHTTP = false; - char value[PROPERTY_VALUE_MAX]; - if (property_get("media.stagefright.enable-http", value, NULL) - && (!strcmp(value, "1") || !strcasecmp(value, "true"))) { - useStagefrightForHTTP = true; - } - // use MidiFile for MIDI extensions int lenURL = strlen(url); for (int i = 0; i < NELEM(FILE_EXTS); ++i) { @@ -758,22 +720,11 @@ player_type getPlayerType(const char* url) int start = lenURL - len; if (start > 0) { if (!strncasecmp(url + start, FILE_EXTS[i].extension, len)) { - if (FILE_EXTS[i].playertype == VORBIS_PLAYER - && !strncasecmp(url, "http://", 7) - && useStagefrightForHTTP) { - return STAGEFRIGHT_PLAYER; - } - return OverrideStagefrightForVorbis(FILE_EXTS[i].playertype); + return FILE_EXTS[i].playertype; } } } - if (!strncasecmp(url, "http://", 7)) { - if (!useStagefrightForHTTP) { - return PV_PLAYER; - } - } - if (!strncasecmp(url, "rtsp://", 7)) { char value[PROPERTY_VALUE_MAX]; if (!property_get("media.stagefright.enable-rtsp", value, NULL) @@ -802,16 +753,10 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie, LOGV(" create MidiFile"); p = new MidiFile(); break; - case VORBIS_PLAYER: - 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(); |