diff options
author | Ronghua Wu <ronghuawu@google.com> | 2015-04-21 11:52:58 -0700 |
---|---|---|
committer | Ronghua Wu <ronghuawu@google.com> | 2015-05-05 14:45:29 -0700 |
commit | 65c8fbcf91f0f0b5f60a45d2777c36d396c4ba16 (patch) | |
tree | b22419f78ab6f243b7ab7027482e5c5fda9db09f /media/libstagefright/MediaCodecList.cpp | |
parent | 5e95559255d1abd62c78b308731ebe3991186e94 (diff) | |
download | frameworks_av-65c8fbcf91f0f0b5f60a45d2777c36d396c4ba16.zip frameworks_av-65c8fbcf91f0f0b5f60a45d2777c36d396c4ba16.tar.gz frameworks_av-65c8fbcf91f0f0b5f60a45d2777c36d396c4ba16.tar.bz2 |
libstagefright: export profiling results directly to xml.
Bug: 19620911
Change-Id: Icdeb1c30816d6de120ea0acd0880b3a9614bea8f
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, '/'); |