summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-11-23 17:19:36 -0800
committerSteve Kondik <steve@cyngn.com>2015-11-24 04:02:48 -0800
commit540dcbb3026cfa2d5832574e0061f19137f362cd (patch)
tree1102ceb43bb3eee3441a6de9e55f932499db62a4
parent4f8fc5a1534d452a072eab2e1eebd4ffa744ac4a (diff)
downloadframeworks_av-540dcbb3026cfa2d5832574e0061f19137f362cd.zip
frameworks_av-540dcbb3026cfa2d5832574e0061f19137f362cd.tar.gz
frameworks_av-540dcbb3026cfa2d5832574e0061f19137f362cd.tar.bz2
media: Require property to be set to use QC AV enhancements
* Because of the wild divergence between branches and the fragility of this interface, we will disable it by default even if the library is in place. After thorough testing for a device it can then be enabled. At this point, these enhancements bring little value except on the very latest hardware. Change-Id: I99147a466bfbb020d05ffbb6c2773414f2439755
-rw-r--r--media/libavextensions/common/ExtensionsLoader.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/media/libavextensions/common/ExtensionsLoader.hpp b/media/libavextensions/common/ExtensionsLoader.hpp
index e03979c..48bcf3b 100644
--- a/media/libavextensions/common/ExtensionsLoader.hpp
+++ b/media/libavextensions/common/ExtensionsLoader.hpp
@@ -28,6 +28,7 @@
*/
#include <dlfcn.h>
#include <common/AVExtensionsCommon.h>
+#include <cutils/properties.h>
namespace android {
@@ -52,9 +53,12 @@ T *ExtensionsLoader<T>::createInstance(const char *createFunctionName) {
// create extended object if extensions-lib is available and
// AV_ENHANCEMENTS is enabled
#if ENABLE_AV_ENHANCEMENTS
- createFunction_t createFunc = loadCreateFunction(createFunctionName);
- if (createFunc) {
- return reinterpret_cast<T *>((*createFunc)());
+ bool enabled = property_get_bool("media.avenhancements.enabled", false);
+ if (enabled) {
+ createFunction_t createFunc = loadCreateFunction(createFunctionName);
+ if (createFunc) {
+ return reinterpret_cast<T *>((*createFunc)());
+ }
}
#endif
// Else, create the default object