Loading media/libstagefright/MediaExtractorFactory.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ struct ExtractorPlugin : public RefBase { Mutex MediaExtractorFactory::gPluginMutex; std::shared_ptr<std::list<sp<ExtractorPlugin>>> MediaExtractorFactory::gPlugins; bool MediaExtractorFactory::gPluginsRegistered = false; bool MediaExtractorFactory::gIgnoreVersion = false; // static CreatorFunc MediaExtractorFactory::sniff( Loading Loading @@ -193,7 +194,7 @@ void MediaExtractorFactory::RegisterExtractor(const sp<ExtractorPlugin> &plugin, for (auto it = pluginList.begin(); it != pluginList.end(); ++it) { if (memcmp(&((*it)->def.extractor_uuid), &plugin->def.extractor_uuid, 16) == 0) { // there's already an extractor with the same uuid if ((*it)->def.extractor_version < plugin->def.extractor_version) { if (gIgnoreVersion || (*it)->def.extractor_version < plugin->def.extractor_version) { // this one is newer, replace the old one ALOGW("replacing extractor '%s' version %u with version %u", plugin->def.extractor_name, Loading Loading @@ -308,6 +309,8 @@ void MediaExtractorFactory::UpdateExtractors(const char *newUpdateApkPath) { return; } gIgnoreVersion = property_get_bool("debug.extractor.ignore_version", false); std::shared_ptr<std::list<sp<ExtractorPlugin>>> newList(new std::list<sp<ExtractorPlugin>>()); RegisterExtractorsInSystem("/system/lib" Loading media/libstagefright/include/media/stagefright/MediaExtractorFactory.h +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ private: static Mutex gPluginMutex; static std::shared_ptr<std::list<sp<ExtractorPlugin>>> gPlugins; static bool gPluginsRegistered; static bool gIgnoreVersion; static void RegisterExtractorsInApk( const char *apkPath, std::list<sp<ExtractorPlugin>> &pluginList); Loading Loading
media/libstagefright/MediaExtractorFactory.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ struct ExtractorPlugin : public RefBase { Mutex MediaExtractorFactory::gPluginMutex; std::shared_ptr<std::list<sp<ExtractorPlugin>>> MediaExtractorFactory::gPlugins; bool MediaExtractorFactory::gPluginsRegistered = false; bool MediaExtractorFactory::gIgnoreVersion = false; // static CreatorFunc MediaExtractorFactory::sniff( Loading Loading @@ -193,7 +194,7 @@ void MediaExtractorFactory::RegisterExtractor(const sp<ExtractorPlugin> &plugin, for (auto it = pluginList.begin(); it != pluginList.end(); ++it) { if (memcmp(&((*it)->def.extractor_uuid), &plugin->def.extractor_uuid, 16) == 0) { // there's already an extractor with the same uuid if ((*it)->def.extractor_version < plugin->def.extractor_version) { if (gIgnoreVersion || (*it)->def.extractor_version < plugin->def.extractor_version) { // this one is newer, replace the old one ALOGW("replacing extractor '%s' version %u with version %u", plugin->def.extractor_name, Loading Loading @@ -308,6 +309,8 @@ void MediaExtractorFactory::UpdateExtractors(const char *newUpdateApkPath) { return; } gIgnoreVersion = property_get_bool("debug.extractor.ignore_version", false); std::shared_ptr<std::list<sp<ExtractorPlugin>>> newList(new std::list<sp<ExtractorPlugin>>()); RegisterExtractorsInSystem("/system/lib" Loading
media/libstagefright/include/media/stagefright/MediaExtractorFactory.h +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ private: static Mutex gPluginMutex; static std::shared_ptr<std::list<sp<ExtractorPlugin>>> gPlugins; static bool gPluginsRegistered; static bool gIgnoreVersion; static void RegisterExtractorsInApk( const char *apkPath, std::list<sp<ExtractorPlugin>> &pluginList); Loading