summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMXNodeInstance.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-02-11 13:54:59 -0800
committerChong Zhang <chz@google.com>2014-02-14 17:42:47 -0800
commit2c9c8cba8562cc3a27532e4cd348912cc78d8d98 (patch)
treedab3690baff0f03f604a41321281ce2f39167272 /media/libstagefright/omx/OMXNodeInstance.cpp
parentb63d2433350d56bda9f3477549086c90bb6d535e (diff)
downloadframeworks_av-2c9c8cba8562cc3a27532e4cd348912cc78d8d98.zip
frameworks_av-2c9c8cba8562cc3a27532e4cd348912cc78d8d98.tar.gz
frameworks_av-2c9c8cba8562cc3a27532e4cd348912cc78d8d98.tar.bz2
support for time lapse/slow motion when using SURFACE source
Bug: 13032650 Change-Id: Iecbadf9f29c8c49353416fc467fb3acdde279595
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 dba522f..f3600ba 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;