summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libmediaplayerservice/nuplayer/Android.mk7
-rw-r--r--media/libstagefright/ACodec.cpp5
-rw-r--r--media/libstagefright/Android.mk8
-rw-r--r--media/libstagefright/codecs/avcdec/SoftAVCDec.cpp1
-rw-r--r--media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp1
-rw-r--r--media/libstagefright/codecs/hevcdec/SoftHEVC.cpp1
-rw-r--r--media/libstagefright/codecs/mpeg2dec/SoftMPEG2.cpp1
-rw-r--r--media/libstagefright/foundation/ADebug.cpp22
8 files changed, 38 insertions, 8 deletions
diff --git a/media/libmediaplayerservice/nuplayer/Android.mk b/media/libmediaplayerservice/nuplayer/Android.mk
index cc6f743..cd20837 100644
--- a/media/libmediaplayerservice/nuplayer/Android.mk
+++ b/media/libmediaplayerservice/nuplayer/Android.mk
@@ -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
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index e904c49..3e65686 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -6503,6 +6503,11 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent(
mCodec->mSentFormat = false;
+ if (mCodec->mTunneled) {
+ sp<AMessage> dummy = new AMessage(kWhatOutputBufferDrained, mCodec);
+ mCodec->sendFormatChange(dummy);
+ }
+
ALOGV("[%s] Output port now reenabled.", mCodec->mComponentName.c_str());
if (mCodec->mExecutingState->active()) {
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index b86c749..2529aa7 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -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
diff --git a/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp b/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp
index 8e7a277..e083315 100644
--- a/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp
+++ b/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp
@@ -21,7 +21,6 @@
#include "ih264_typedefs.h"
#include "iv.h"
#include "ivd.h"
-#include "ithread.h"
#include "ih264d.h"
#include "SoftAVCDec.h"
diff --git a/media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp b/media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp
index 9ee3518..26568ab 100644
--- a/media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp
+++ b/media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp
@@ -229,7 +229,6 @@ OMX_ERRORTYPE SoftAVC::setDimensions() {
s_dimensions_ip.e_sub_cmd = IVE_CMD_CTL_SET_DIMENSIONS;
s_dimensions_ip.u4_ht = mHeight;
s_dimensions_ip.u4_wd = mWidth;
- s_dimensions_ip.u4_strd = mStride;
s_dimensions_ip.u4_timestamp_high = -1;
s_dimensions_ip.u4_timestamp_low = -1;
diff --git a/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp b/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp
index 1db350f..4b2ec1c 100644
--- a/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp
+++ b/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp
@@ -21,7 +21,6 @@
#include "ihevc_typedefs.h"
#include "iv.h"
#include "ivd.h"
-#include "ithread.h"
#include "ihevcd_cxa.h"
#include "SoftHEVC.h"
diff --git a/media/libstagefright/codecs/mpeg2dec/SoftMPEG2.cpp b/media/libstagefright/codecs/mpeg2dec/SoftMPEG2.cpp
index 78b3ab4..32e5da7 100644
--- a/media/libstagefright/codecs/mpeg2dec/SoftMPEG2.cpp
+++ b/media/libstagefright/codecs/mpeg2dec/SoftMPEG2.cpp
@@ -21,7 +21,6 @@
#include "iv_datatypedef.h"
#include "iv.h"
#include "ivd.h"
-#include "ithread.h"
#include "impeg2d.h"
#include "SoftMPEG2.h"
diff --git a/media/libstagefright/foundation/ADebug.cpp b/media/libstagefright/foundation/ADebug.cpp
index 24fa561..2c5f544 100644
--- a/media/libstagefright/foundation/ADebug.cpp
+++ b/media/libstagefright/foundation/ADebug.cpp
@@ -29,6 +29,8 @@
#include <AStringUtils.h>
#include <AUtils.h>
+#define UNUSED(x) ((void)(x))
+
namespace android {
//static
@@ -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;
@@ -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