Loading include/media/MediaExtractorPluginApi.h +14 −3 Original line number Diff line number Diff line Loading @@ -135,8 +135,16 @@ struct ExtractorDef { const char *extractor_name; union { SnifferFunc v2; } sniff; struct { SnifferFunc sniff; } v2; struct { SnifferFunc sniff; // a NULL terminated list of container mime types and/or file extensions // that this extractor supports const char **supported_types; } v3; } u; }; // the C++ based API which first shipped in P and is no longer supported Loading @@ -145,7 +153,10 @@ const uint32_t EXTRACTORDEF_VERSION_LEGACY = 1; // the first C/NDK based API const uint32_t EXTRACTORDEF_VERSION_NDK_V1 = 2; const uint32_t EXTRACTORDEF_VERSION = EXTRACTORDEF_VERSION_NDK_V1; // the second C/NDK based API const uint32_t EXTRACTORDEF_VERSION_NDK_V2 = 3; const uint32_t EXTRACTORDEF_VERSION = EXTRACTORDEF_VERSION_NDK_V2; // each plugin library exports one function of this type typedef ExtractorDef (*GetExtractorDef)(); Loading media/extractors/aac/AACExtractor.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -377,6 +377,10 @@ static CreatorFunc Sniff( return NULL; } static const char *extensions[] = { "aac", NULL }; extern "C" { // This is the only symbol that needs to be exported Loading @@ -387,7 +391,7 @@ ExtractorDef GETEXTRACTORDEF() { UUID("4fd80eae-03d2-4d72-9eb9-48fa6bb54613"), 1, // version "AAC Extractor", { .v2 = Sniff } { .v3 = {Sniff, extensions} }, }; } Loading media/extractors/amr/AMRExtractor.cpp +25 −16 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ media_status_t AMRExtractor::getMetaData(AMediaFormat *meta) { if (mInitCheck == OK) { AMediaFormat_setString(meta, AMEDIAFORMAT_KEY_MIME, mIsWide ? "audio/amr-wb" : "audio/amr"); AMEDIAFORMAT_KEY_MIME, mIsWide ? MEDIA_MIMETYPE_AUDIO_AMR_WB : "audio/amr"); } return AMEDIA_OK; Loading Loading @@ -358,6 +358,12 @@ media_status_t AMRSource::read( //////////////////////////////////////////////////////////////////////////////// static const char *extensions[] = { "amr", "awb", NULL }; extern "C" { // This is the only symbol that needs to be exported __attribute__ ((visibility ("default"))) Loading @@ -368,7 +374,8 @@ ExtractorDef GETEXTRACTORDEF() { 1, "AMR Extractor", { .v2 = []( .v3 = { []( CDataSource *source, float *confidence, void **, Loading @@ -381,8 +388,10 @@ ExtractorDef GETEXTRACTORDEF() { return wrap(new AMRExtractor(new DataSourceHelper(source)));}; } return NULL; } } }, extensions }, }, }; } Loading media/extractors/flac/FLACExtractor.cpp +18 −10 Original line number Diff line number Diff line Loading @@ -822,6 +822,11 @@ bool SniffFLAC(DataSourceHelper *source, float *confidence) return true; } static const char *extensions[] = { "flac", "fl", NULL }; extern "C" { // This is the only symbol that needs to be exported Loading @@ -833,7 +838,8 @@ ExtractorDef GETEXTRACTORDEF() { 1, "FLAC Extractor", { .v2 = []( .v3 = { []( CDataSource *source, float *confidence, void **, Loading @@ -846,8 +852,10 @@ ExtractorDef GETEXTRACTORDEF() { return wrap(new FLACExtractor(new DataSourceHelper(source)));}; } return NULL; }, extensions } } }, }; } Loading media/extractors/midi/MidiExtractor.cpp +24 −9 Original line number Diff line number Diff line Loading @@ -326,6 +326,18 @@ bool SniffMidi(CDataSource *source, float *confidence) } static const char *extensions[] = { "imy", "mid", "midi", "mxmf", "ota", "rtttl", "rtx", "smf", "xmf", NULL }; extern "C" { // This is the only symbol that needs to be exported Loading @@ -337,7 +349,8 @@ ExtractorDef GETEXTRACTORDEF() { 1, "MIDI Extractor", { .v2 = []( .v3 = { []( CDataSource *source, float *confidence, void **, Loading @@ -349,8 +362,10 @@ ExtractorDef GETEXTRACTORDEF() { return wrap(new MidiExtractor(source));}; } return NULL; }, extensions } } }, }; } Loading Loading
include/media/MediaExtractorPluginApi.h +14 −3 Original line number Diff line number Diff line Loading @@ -135,8 +135,16 @@ struct ExtractorDef { const char *extractor_name; union { SnifferFunc v2; } sniff; struct { SnifferFunc sniff; } v2; struct { SnifferFunc sniff; // a NULL terminated list of container mime types and/or file extensions // that this extractor supports const char **supported_types; } v3; } u; }; // the C++ based API which first shipped in P and is no longer supported Loading @@ -145,7 +153,10 @@ const uint32_t EXTRACTORDEF_VERSION_LEGACY = 1; // the first C/NDK based API const uint32_t EXTRACTORDEF_VERSION_NDK_V1 = 2; const uint32_t EXTRACTORDEF_VERSION = EXTRACTORDEF_VERSION_NDK_V1; // the second C/NDK based API const uint32_t EXTRACTORDEF_VERSION_NDK_V2 = 3; const uint32_t EXTRACTORDEF_VERSION = EXTRACTORDEF_VERSION_NDK_V2; // each plugin library exports one function of this type typedef ExtractorDef (*GetExtractorDef)(); Loading
media/extractors/aac/AACExtractor.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -377,6 +377,10 @@ static CreatorFunc Sniff( return NULL; } static const char *extensions[] = { "aac", NULL }; extern "C" { // This is the only symbol that needs to be exported Loading @@ -387,7 +391,7 @@ ExtractorDef GETEXTRACTORDEF() { UUID("4fd80eae-03d2-4d72-9eb9-48fa6bb54613"), 1, // version "AAC Extractor", { .v2 = Sniff } { .v3 = {Sniff, extensions} }, }; } Loading
media/extractors/amr/AMRExtractor.cpp +25 −16 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ media_status_t AMRExtractor::getMetaData(AMediaFormat *meta) { if (mInitCheck == OK) { AMediaFormat_setString(meta, AMEDIAFORMAT_KEY_MIME, mIsWide ? "audio/amr-wb" : "audio/amr"); AMEDIAFORMAT_KEY_MIME, mIsWide ? MEDIA_MIMETYPE_AUDIO_AMR_WB : "audio/amr"); } return AMEDIA_OK; Loading Loading @@ -358,6 +358,12 @@ media_status_t AMRSource::read( //////////////////////////////////////////////////////////////////////////////// static const char *extensions[] = { "amr", "awb", NULL }; extern "C" { // This is the only symbol that needs to be exported __attribute__ ((visibility ("default"))) Loading @@ -368,7 +374,8 @@ ExtractorDef GETEXTRACTORDEF() { 1, "AMR Extractor", { .v2 = []( .v3 = { []( CDataSource *source, float *confidence, void **, Loading @@ -381,8 +388,10 @@ ExtractorDef GETEXTRACTORDEF() { return wrap(new AMRExtractor(new DataSourceHelper(source)));}; } return NULL; } } }, extensions }, }, }; } Loading
media/extractors/flac/FLACExtractor.cpp +18 −10 Original line number Diff line number Diff line Loading @@ -822,6 +822,11 @@ bool SniffFLAC(DataSourceHelper *source, float *confidence) return true; } static const char *extensions[] = { "flac", "fl", NULL }; extern "C" { // This is the only symbol that needs to be exported Loading @@ -833,7 +838,8 @@ ExtractorDef GETEXTRACTORDEF() { 1, "FLAC Extractor", { .v2 = []( .v3 = { []( CDataSource *source, float *confidence, void **, Loading @@ -846,8 +852,10 @@ ExtractorDef GETEXTRACTORDEF() { return wrap(new FLACExtractor(new DataSourceHelper(source)));}; } return NULL; }, extensions } } }, }; } Loading
media/extractors/midi/MidiExtractor.cpp +24 −9 Original line number Diff line number Diff line Loading @@ -326,6 +326,18 @@ bool SniffMidi(CDataSource *source, float *confidence) } static const char *extensions[] = { "imy", "mid", "midi", "mxmf", "ota", "rtttl", "rtx", "smf", "xmf", NULL }; extern "C" { // This is the only symbol that needs to be exported Loading @@ -337,7 +349,8 @@ ExtractorDef GETEXTRACTORDEF() { 1, "MIDI Extractor", { .v2 = []( .v3 = { []( CDataSource *source, float *confidence, void **, Loading @@ -349,8 +362,10 @@ ExtractorDef GETEXTRACTORDEF() { return wrap(new MidiExtractor(source));}; } return NULL; }, extensions } } }, }; } Loading