diff options
author | Ronghua Wu <ronghuawu@google.com> | 2015-06-25 16:14:35 -0700 |
---|---|---|
committer | Ronghua Wu <ronghuawu@google.com> | 2015-06-26 10:09:16 -0700 |
commit | 50cf65497283aa324c5c28aa69a3895644574885 (patch) | |
tree | 0411a7db72123321ce239ca844db6e161e23737e /media | |
parent | 064b2bf712788d30928b9a8bafecd0f3308d7aa4 (diff) | |
download | frameworks_av-50cf65497283aa324c5c28aa69a3895644574885.zip frameworks_av-50cf65497283aa324c5c28aa69a3895644574885.tar.gz frameworks_av-50cf65497283aa324c5c28aa69a3895644574885.tar.bz2 |
libstagefright: only do boot time codec profiling for debugging.
and remove "max-supported-instances".
Bug: 22089269
Change-Id: Ia786105d3371926b90a559649b9495f5c1397cea
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/MediaCodecList.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp index 8993403..ab49c11 100644 --- a/media/libstagefright/MediaCodecList.cpp +++ b/media/libstagefright/MediaCodecList.cpp @@ -38,6 +38,7 @@ #include <sys/stat.h> #include <utils/threads.h> +#include <cutils/properties.h> #include <libexpat/expat.h> namespace android { @@ -56,6 +57,11 @@ static bool parseBoolean(const char *s) { } static bool isProfilingNeeded() { + int8_t value = property_get_bool("debug.stagefright.profilecodec", 0); + if (value == 0) { + return false; + } + bool profilingNeeded = true; FILE *resultsFile = fopen(kProfilingResults, "r"); if (resultsFile) { @@ -1005,8 +1011,7 @@ status_t MediaCodecList::addLimit(const char **attrs) { return limitFoundMissingAttr(name, "ranges", found); } else if (msg->contains("scale")) { return limitFoundMissingAttr(name, "scale"); - } else if ((name == "alignment" || name == "block-size" - || name == "max-supported-instances") ^ + } else if ((name == "alignment" || name == "block-size") ^ (found = msg->findString("value", &value))) { return limitFoundMissingAttr(name, "value", found); } |