Loading include/media/stagefright/MediaDefs.h +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ extern const char *MEDIA_MIMETYPE_AUDIO_RAW; extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4; extern const char *MEDIA_MIMETYPE_CONTAINER_WAV; extern const char *MEDIA_MIMETYPE_CONTAINER_VORBIS; } // namespace android Loading media/libmediaplayerservice/MediaPlayerService.cpp +35 −7 Original line number Diff line number Diff line Loading @@ -674,6 +674,26 @@ static player_type getDefaultPlayerType() { 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; } player_type getPlayerType(int fd, int64_t offset, int64_t length) { char buf[20]; Loading @@ -685,7 +705,7 @@ player_type getPlayerType(int fd, int64_t offset, int64_t length) // Ogg vorbis? if (ident == 0x5367674f) // 'OggS' return VORBIS_PLAYER; return OverrideStagefrightForVorbis(VORBIS_PLAYER); #ifndef NO_OPENCORE if (ident == 0x75b22630) { Loading Loading @@ -721,6 +741,13 @@ 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) { Loading @@ -728,17 +755,18 @@ player_type getPlayerType(const char* url) int start = lenURL - len; if (start > 0) { if (!strncmp(url + start, FILE_EXTS[i].extension, len)) { return FILE_EXTS[i].playertype; if (FILE_EXTS[i].playertype == VORBIS_PLAYER && !strncasecmp(url, "http://", 7) && useStagefrightForHTTP) { return STAGEFRIGHT_PLAYER; } return OverrideStagefrightForVorbis(FILE_EXTS[i].playertype); } } } if (!strncasecmp(url, "http://", 7)) { char value[PROPERTY_VALUE_MAX]; if (!property_get("media.stagefright.enable-http", value, NULL) || (strcmp(value, "1") && strcasecmp(value, "true"))) { // For now, we're going to use PV for http-based playback // by default until we can clear up a few more issues. if (!useStagefrightForHTTP) { return PV_PLAYER; } } Loading media/libstagefright/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ LOCAL_SRC_FILES += \ StagefrightMetadataRetriever.cpp \ TimeSource.cpp \ TimedEventQueue.cpp \ VorbisExtractor.cpp \ WAVExtractor.cpp \ string.cpp Loading media/libstagefright/DataSource.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "include/MP3Extractor.h" #include "include/MPEG4Extractor.h" #include "include/WAVExtractor.h" #include "include/VorbisExtractor.h" #include <media/stagefright/CachingDataSource.h> #include <media/stagefright/DataSource.h> Loading Loading @@ -92,6 +93,7 @@ void DataSource::RegisterDefaultSniffers() { RegisterSniffer(SniffMPEG4); RegisterSniffer(SniffAMR); RegisterSniffer(SniffWAV); RegisterSniffer(SniffVorbis); } // static Loading media/libstagefright/MediaDefs.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -34,5 +34,6 @@ const char *MEDIA_MIMETYPE_AUDIO_RAW = "audio/raw"; const char *MEDIA_MIMETYPE_CONTAINER_MPEG4 = "video/mpeg4"; const char *MEDIA_MIMETYPE_CONTAINER_WAV = "audio/wav"; const char *MEDIA_MIMETYPE_CONTAINER_VORBIS = "application/ogg"; } // namespace android Loading
include/media/stagefright/MediaDefs.h +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ extern const char *MEDIA_MIMETYPE_AUDIO_RAW; extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4; extern const char *MEDIA_MIMETYPE_CONTAINER_WAV; extern const char *MEDIA_MIMETYPE_CONTAINER_VORBIS; } // namespace android Loading
media/libmediaplayerservice/MediaPlayerService.cpp +35 −7 Original line number Diff line number Diff line Loading @@ -674,6 +674,26 @@ static player_type getDefaultPlayerType() { 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; } player_type getPlayerType(int fd, int64_t offset, int64_t length) { char buf[20]; Loading @@ -685,7 +705,7 @@ player_type getPlayerType(int fd, int64_t offset, int64_t length) // Ogg vorbis? if (ident == 0x5367674f) // 'OggS' return VORBIS_PLAYER; return OverrideStagefrightForVorbis(VORBIS_PLAYER); #ifndef NO_OPENCORE if (ident == 0x75b22630) { Loading Loading @@ -721,6 +741,13 @@ 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) { Loading @@ -728,17 +755,18 @@ player_type getPlayerType(const char* url) int start = lenURL - len; if (start > 0) { if (!strncmp(url + start, FILE_EXTS[i].extension, len)) { return FILE_EXTS[i].playertype; if (FILE_EXTS[i].playertype == VORBIS_PLAYER && !strncasecmp(url, "http://", 7) && useStagefrightForHTTP) { return STAGEFRIGHT_PLAYER; } return OverrideStagefrightForVorbis(FILE_EXTS[i].playertype); } } } if (!strncasecmp(url, "http://", 7)) { char value[PROPERTY_VALUE_MAX]; if (!property_get("media.stagefright.enable-http", value, NULL) || (strcmp(value, "1") && strcasecmp(value, "true"))) { // For now, we're going to use PV for http-based playback // by default until we can clear up a few more issues. if (!useStagefrightForHTTP) { return PV_PLAYER; } } Loading
media/libstagefright/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ LOCAL_SRC_FILES += \ StagefrightMetadataRetriever.cpp \ TimeSource.cpp \ TimedEventQueue.cpp \ VorbisExtractor.cpp \ WAVExtractor.cpp \ string.cpp Loading
media/libstagefright/DataSource.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "include/MP3Extractor.h" #include "include/MPEG4Extractor.h" #include "include/WAVExtractor.h" #include "include/VorbisExtractor.h" #include <media/stagefright/CachingDataSource.h> #include <media/stagefright/DataSource.h> Loading Loading @@ -92,6 +93,7 @@ void DataSource::RegisterDefaultSniffers() { RegisterSniffer(SniffMPEG4); RegisterSniffer(SniffAMR); RegisterSniffer(SniffWAV); RegisterSniffer(SniffVorbis); } // static Loading
media/libstagefright/MediaDefs.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -34,5 +34,6 @@ const char *MEDIA_MIMETYPE_AUDIO_RAW = "audio/raw"; const char *MEDIA_MIMETYPE_CONTAINER_MPEG4 = "video/mpeg4"; const char *MEDIA_MIMETYPE_CONTAINER_WAV = "audio/wav"; const char *MEDIA_MIMETYPE_CONTAINER_VORBIS = "application/ogg"; } // namespace android