diff options
author | Ronghua Wu <ronghuawu@google.com> | 2015-05-08 00:45:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-08 00:45:16 +0000 |
commit | 2a834fc09e1b22e7f70250c55ae2f462f5f60987 (patch) | |
tree | 4b1627f8c579b42a4aa2396f3f094764d2faf5b8 /media/libstagefright/MediaCodecList.cpp | |
parent | 6ff06612638a13faa85c6219d42a9c4b645003d9 (diff) | |
parent | 65c8fbcf91f0f0b5f60a45d2777c36d396c4ba16 (diff) | |
download | frameworks_av-2a834fc09e1b22e7f70250c55ae2f462f5f60987.zip frameworks_av-2a834fc09e1b22e7f70250c55ae2f462f5f60987.tar.gz frameworks_av-2a834fc09e1b22e7f70250c55ae2f462f5f60987.tar.bz2 |
Merge "libstagefright: export profiling results directly to xml." into mnc-dev
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 f12a913..e212fb8 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; { @@ -89,13 +86,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; @@ -145,19 +142,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, '/'); |