diff options
Diffstat (limited to 'media/libstagefright/StagefrightMediaScanner.cpp')
-rw-r--r-- | media/libstagefright/StagefrightMediaScanner.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp index ab17b04..2829638 100644 --- a/media/libstagefright/StagefrightMediaScanner.cpp +++ b/media/libstagefright/StagefrightMediaScanner.cpp @@ -26,10 +26,6 @@ // Sonivox includes #include <libsonivox/eas.h> -// Ogg Vorbis includes -#include <Tremolo/ivorbiscodec.h> -#include <Tremolo/ivorbisfile.h> - namespace android { StagefrightMediaScanner::StagefrightMediaScanner() @@ -103,48 +99,6 @@ static status_t HandleMIDI( return OK; } -static status_t HandleOGG( - const char *filename, MediaScannerClient *client) { - int duration; - - FILE *file = fopen(filename,"r"); - if (!file) - return UNKNOWN_ERROR; - - OggVorbis_File vf; - if (ov_open(file, &vf, NULL, 0) < 0) { - return UNKNOWN_ERROR; - } - - char **ptr=ov_comment(&vf,-1)->user_comments; - while(*ptr){ - char *val = strstr(*ptr, "="); - if (val) { - int keylen = val++ - *ptr; - char key[keylen + 1]; - strncpy(key, *ptr, keylen); - key[keylen] = 0; - if (!client->addStringTag(key, val)) goto failure; - } - ++ptr; - } - - // Duration - duration = ov_time_total(&vf, -1); - if (duration > 0) { - char buffer[20]; - sprintf(buffer, "%d", duration); - if (!client->addStringTag("duration", buffer)) goto failure; - } - - ov_clear(&vf); // this also closes the FILE - return OK; - -failure: - ov_clear(&vf); // this also closes the FILE - return UNKNOWN_ERROR; -} - status_t StagefrightMediaScanner::processFile( const char *path, const char *mimeType, MediaScannerClient &client) { @@ -176,10 +130,6 @@ status_t StagefrightMediaScanner::processFile( return HandleMIDI(path, &client); } - if (!strcasecmp(extension, ".ogg")) { - return HandleOGG(path, &client); - } - if (mRetriever->setDataSource(path) == OK && mRetriever->setMode( METADATA_MODE_METADATA_RETRIEVAL_ONLY) == OK) { |