diff options
Diffstat (limited to 'media/libstagefright/MediaCodecList.cpp')
-rw-r--r-- | media/libstagefright/MediaCodecList.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp index 26798ae..6a6f99d 100644 --- a/media/libstagefright/MediaCodecList.cpp +++ b/media/libstagefright/MediaCodecList.cpp @@ -44,8 +44,6 @@ static Mutex sInitMutex; static MediaCodecList *gCodecList = NULL; -static const char *kProfilingResults = "/data/misc/media/media_codecs_profiling_results.xml"; - static bool parseBoolean(const char *s) { if (!strcasecmp(s, "true") || !strcasecmp(s, "yes") || !strcasecmp(s, "y")) { return true; @@ -61,7 +59,6 @@ sp<IMediaCodecList> MediaCodecList::sCodecList; // static sp<IMediaCodecList> MediaCodecList::getLocalInstance() { bool profilingNeeded = false; - KeyedVector<AString, CodecSettings> updates; Vector<sp<MediaCodecInfo>> infos; { @@ -85,13 +82,13 @@ sp<IMediaCodecList> MediaCodecList::getLocalInstance() { } if (profilingNeeded) { - profileCodecs(infos, &updates); + profileCodecs(infos); } { Mutex::Autolock autoLock(sInitMutex); - if (updates.size() > 0) { - gCodecList->updateDetailsForMultipleCodecs(updates); + if (profilingNeeded) { + gCodecList->parseTopLevelXMLFile(kProfilingResults, true /* ignore_errors */); } return sCodecList; @@ -141,19 +138,6 @@ MediaCodecList::MediaCodecList() parseTopLevelXMLFile(kProfilingResults, true/* ignore_errors */); } -void MediaCodecList::updateDetailsForMultipleCodecs( - const KeyedVector<AString, CodecSettings>& updates) { - if (updates.size() == 0) { - return; - } - - exportResultsToXML(kProfilingResults, updates); - - for (size_t i = 0; i < updates.size(); ++i) { - applyCodecSettings(updates.keyAt(i), updates.valueAt(i), &mCodecInfos); - } -} - void MediaCodecList::parseTopLevelXMLFile(const char *codecs_xml, bool ignore_errors) { // get href_base char *href_base_end = strrchr(codecs_xml, '/'); |