Loading media/libmediaplayerservice/nuplayer/Android.mk +6 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,12 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/av/media/libmediaplayerservice \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Werror -Wall -DENABLE_STAGEFRIGHT_EXPERIMENTS LOCAL_CFLAGS += -Werror -Wall # enable experiments only in userdebug and eng builds ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) LOCAL_CFLAGS += -DENABLE_STAGEFRIGHT_EXPERIMENTS endif LOCAL_CLANG := true Loading media/libstagefright/Android.mk +6 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,12 @@ LOCAL_SHARED_LIBRARIES += \ libdl \ libRScpp \ LOCAL_CFLAGS += -Wno-multichar -Werror -Wno-error=deprecated-declarations -Wall \ -DENABLE_STAGEFRIGHT_EXPERIMENTS LOCAL_CFLAGS += -Wno-multichar -Werror -Wno-error=deprecated-declarations -Wall # enable experiments only in userdebug and eng builds ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) LOCAL_CFLAGS += -DENABLE_STAGEFRIGHT_EXPERIMENTS endif LOCAL_CLANG := true Loading media/libstagefright/foundation/ADebug.cpp +21 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ #include <AStringUtils.h> #include <AUtils.h> #define UNUSED(x) ((void)(x)) namespace android { //static Loading Loading @@ -130,7 +132,24 @@ bool ADebug::getExperimentFlag( long level = GetLevelFromProperty(name, "debug.stagefright.experiments", undefined); if (level != undefined) { ALOGI("experiment '%s': %s from property", name, level ? "ENABLED" : "disabled"); return level != 0; return allow && (level != 0); } #ifndef ENABLE_STAGEFRIGHT_AUTO_EXPERIMENTS UNUSED(modulo); UNUSED(limit); UNUSED(plus); UNUSED(timeDivisor); return false; #else // Disable automatic experiments in "non-experimental" builds (that is, _all_ builds // as there is no "experimental" build). // TODO: change build type to enable automatic experiments in the future for some builds char value[PROPERTY_VALUE_MAX]; if (property_get("ro.build.type", value, NULL)) { if (strcmp(value, "experimental")) { return false; } } static volatile int32_t haveSerial = 0; Loading Loading @@ -164,6 +183,7 @@ bool ADebug::getExperimentFlag( bool enable = allow && (counter % modulo < limit); ALOGI("experiment '%s': %s", name, enable ? "ENABLED" : "disabled"); return enable; #endif } } // namespace android Loading Loading
media/libmediaplayerservice/nuplayer/Android.mk +6 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,12 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/av/media/libmediaplayerservice \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Werror -Wall -DENABLE_STAGEFRIGHT_EXPERIMENTS LOCAL_CFLAGS += -Werror -Wall # enable experiments only in userdebug and eng builds ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) LOCAL_CFLAGS += -DENABLE_STAGEFRIGHT_EXPERIMENTS endif LOCAL_CLANG := true Loading
media/libstagefright/Android.mk +6 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,12 @@ LOCAL_SHARED_LIBRARIES += \ libdl \ libRScpp \ LOCAL_CFLAGS += -Wno-multichar -Werror -Wno-error=deprecated-declarations -Wall \ -DENABLE_STAGEFRIGHT_EXPERIMENTS LOCAL_CFLAGS += -Wno-multichar -Werror -Wno-error=deprecated-declarations -Wall # enable experiments only in userdebug and eng builds ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) LOCAL_CFLAGS += -DENABLE_STAGEFRIGHT_EXPERIMENTS endif LOCAL_CLANG := true Loading
media/libstagefright/foundation/ADebug.cpp +21 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ #include <AStringUtils.h> #include <AUtils.h> #define UNUSED(x) ((void)(x)) namespace android { //static Loading Loading @@ -130,7 +132,24 @@ bool ADebug::getExperimentFlag( long level = GetLevelFromProperty(name, "debug.stagefright.experiments", undefined); if (level != undefined) { ALOGI("experiment '%s': %s from property", name, level ? "ENABLED" : "disabled"); return level != 0; return allow && (level != 0); } #ifndef ENABLE_STAGEFRIGHT_AUTO_EXPERIMENTS UNUSED(modulo); UNUSED(limit); UNUSED(plus); UNUSED(timeDivisor); return false; #else // Disable automatic experiments in "non-experimental" builds (that is, _all_ builds // as there is no "experimental" build). // TODO: change build type to enable automatic experiments in the future for some builds char value[PROPERTY_VALUE_MAX]; if (property_get("ro.build.type", value, NULL)) { if (strcmp(value, "experimental")) { return false; } } static volatile int32_t haveSerial = 0; Loading Loading @@ -164,6 +183,7 @@ bool ADebug::getExperimentFlag( bool enable = allow && (counter % modulo < limit); ALOGI("experiment '%s': %s", name, enable ? "ENABLED" : "disabled"); return enable; #endif } } // namespace android Loading