summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMXNodeInstance.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-02-22 04:42:25 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-22 04:42:25 +0000
commitdc6ac201032d0f6ad0c8149ae2f009ec38693025 (patch)
tree66b04298c58f76a0c9723dcd6c6dbb2ebfa6ee63 /media/libstagefright/omx/OMXNodeInstance.cpp
parent323da1015a758243c2c43017b026a01c6cf0c6f2 (diff)
parent2c9c8cba8562cc3a27532e4cd348912cc78d8d98 (diff)
downloadframeworks_av-dc6ac201032d0f6ad0c8149ae2f009ec38693025.zip
frameworks_av-dc6ac201032d0f6ad0c8149ae2f009ec38693025.tar.gz
frameworks_av-dc6ac201032d0f6ad0c8149ae2f009ec38693025.tar.bz2
Merge "support for time lapse/slow motion when using SURFACE source"
Diffstat (limited to 'media/libstagefright/omx/OMXNodeInstance.cpp')
-rw-r--r--media/libstagefright/omx/OMXNodeInstance.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index aa96389..0fb38fa 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -851,6 +851,7 @@ status_t OMXNodeInstance::setInternalOption(
case IOMX::INTERNAL_OPTION_REPEAT_PREVIOUS_FRAME_DELAY:
case IOMX::INTERNAL_OPTION_MAX_TIMESTAMP_GAP:
case IOMX::INTERNAL_OPTION_START_TIME:
+ case IOMX::INTERNAL_OPTION_TIME_LAPSE:
{
const sp<GraphicBufferSource> &bufferSource =
getGraphicBufferSource();
@@ -884,7 +885,7 @@ status_t OMXNodeInstance::setInternalOption(
int64_t maxGapUs = *(int64_t *)data;
return bufferSource->setMaxTimestampGapUs(maxGapUs);
- } else { // IOMX::INTERNAL_OPTION_START_TIME
+ } else if (type == IOMX::INTERNAL_OPTION_START_TIME) {
if (size != sizeof(int64_t)) {
return INVALID_OPERATION;
}
@@ -892,6 +893,12 @@ status_t OMXNodeInstance::setInternalOption(
int64_t skipFramesBeforeUs = *(int64_t *)data;
bufferSource->setSkipFramesBeforeUs(skipFramesBeforeUs);
+ } else { // IOMX::INTERNAL_OPTION_TIME_LAPSE
+ if (size != sizeof(int64_t) * 2) {
+ return INVALID_OPERATION;
+ }
+
+ bufferSource->setTimeLapseUs((int64_t *)data);
}
return OK;