summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rwxr-xr-xmedia/libstagefright/Android.mk4
-rwxr-xr-xmedia/libstagefright/CameraSource.cpp4
-rw-r--r--media/libstagefright/OMXCodec.cpp20
3 files changed, 27 insertions, 1 deletions
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index b394d90..193291e 100755
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -3,6 +3,10 @@ include $(CLEAR_VARS)
include frameworks/av/media/libstagefright/codecs/common/Config.mk
+ifeq ($(BOARD_HTC_3D_SUPPORT),true)
+ LOCAL_CFLAGS += -DHTC_3D_SUPPORT
+endif
+
LOCAL_SRC_FILES:= \
ACodec.cpp \
AACExtractor.cpp \
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index b8b9152..9f63ec0 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -347,11 +347,13 @@ status_t CameraSource::configureCamera(
ALOGV("Supported frame rates: %s", supportedFrameRates);
char buf[4];
snprintf(buf, 4, "%d", frameRate);
+#ifndef HTC_3D_SUPPORT // HTC uses invalid frame rates intentionally on the 3D camera
if (strstr(supportedFrameRates, buf) == NULL) {
ALOGE("Requested frame rate (%d) is not supported: %s",
frameRate, supportedFrameRates);
return BAD_VALUE;
}
+#endif
// The frame rate is supported, set the camera to the requested value.
params->setPreviewFrameRate(frameRate);
@@ -449,11 +451,13 @@ status_t CameraSource::checkFrameRate(
// Check the actual video frame rate against the target/requested
// video frame rate.
+#ifndef HTC_3D_SUPPORT // HTC uses invalid frame rates intentionally on the 3D camera
if (frameRate != -1 && (frameRateActual - frameRate) != 0) {
ALOGE("Failed to set preview frame rate to %d fps. The actual "
"frame rate is %d", frameRate, frameRateActual);
return UNKNOWN_ERROR;
}
+#endif
// Good now.
mVideoFrameRate = frameRateActual;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 26989c1..b8b3ec4 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -306,6 +306,24 @@ void OMXCodec::findMatchingCodecs(
uint32_t OMXCodec::getComponentQuirks(
const MediaCodecList *list, size_t index) {
uint32_t quirks = 0;
+
+ if (list->codecHasQuirk(
+ index, "needs-flush-before-disable")) {
+ quirks |= kNeedsFlushBeforeDisable;
+ }
+ if (list->codecHasQuirk(
+ index, "requires-flush-complete-emulation")) {
+ quirks |= kRequiresFlushCompleteEmulation;
+ }
+ if (list->codecHasQuirk(
+ index, "supports-multiple-frames-per-input-buffer")) {
+ quirks |= kSupportsMultipleFramesPerInputBuffer;
+ }
+ if (list->codecHasQuirk(
+ index, "requires-larger-encoder-output-buffer")) {
+ quirks |= kRequiresLargerEncoderOutputBuffer;
+ }
+
if (list->codecHasQuirk(
index, "requires-allocate-on-input-ports")) {
quirks |= kRequiresAllocateBufferOnInputPorts;
@@ -325,7 +343,7 @@ uint32_t OMXCodec::getComponentQuirks(
#ifdef QCOM_HARDWARE
if (list->codecHasQuirk(
index, "requires-loaded-to-idle-after-allocation")) {
- quirks |= kRequiresLoadedToIdleAfterAllocation;
+ quirks |= kRequiresLoadedToIdleAfterAllocation;
}
if (list->codecHasQuirk(
index, "requires-global-flush")) {