summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMXNodeInstance.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2013-12-26 01:38:35 -0800
committerChong Zhang <chz@google.com>2014-02-05 15:46:26 -0800
commit72cecca17d735db6532c45f0a7e10c47ee6f065a (patch)
treed2f532b1909ea605f10e6044d2f027e7e58a8575 /media/libstagefright/omx/OMXNodeInstance.cpp
parent412d4744efae64083e4f99a664e3efaba031af48 (diff)
downloadframeworks_av-72cecca17d735db6532c45f0a7e10c47ee6f065a.zip
frameworks_av-72cecca17d735db6532c45f0a7e10c47ee6f065a.tar.gz
frameworks_av-72cecca17d735db6532c45f0a7e10c47ee6f065a.tar.bz2
Change StagefrightRecorder to use MediaCodec
Bug: 12305192 Change-Id: I72d7cb571be5bd348b58ad650f3269d24c15d350
Diffstat (limited to 'media/libstagefright/omx/OMXNodeInstance.cpp')
-rw-r--r--media/libstagefright/omx/OMXNodeInstance.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index 6c5c857..dba522f 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -850,6 +850,7 @@ status_t OMXNodeInstance::setInternalOption(
case IOMX::INTERNAL_OPTION_SUSPEND:
case IOMX::INTERNAL_OPTION_REPEAT_PREVIOUS_FRAME_DELAY:
case IOMX::INTERNAL_OPTION_MAX_TIMESTAMP_GAP:
+ case IOMX::INTERNAL_OPTION_START_TIME:
{
const sp<GraphicBufferSource> &bufferSource =
getGraphicBufferSource();
@@ -874,7 +875,8 @@ status_t OMXNodeInstance::setInternalOption(
int64_t delayUs = *(int64_t *)data;
return bufferSource->setRepeatPreviousFrameDelayUs(delayUs);
- } else {
+ } else if (type ==
+ IOMX::INTERNAL_OPTION_MAX_TIMESTAMP_GAP){
if (size != sizeof(int64_t)) {
return INVALID_OPERATION;
}
@@ -882,6 +884,14 @@ status_t OMXNodeInstance::setInternalOption(
int64_t maxGapUs = *(int64_t *)data;
return bufferSource->setMaxTimestampGapUs(maxGapUs);
+ } else { // IOMX::INTERNAL_OPTION_START_TIME
+ if (size != sizeof(int64_t)) {
+ return INVALID_OPERATION;
+ }
+
+ int64_t skipFramesBeforeUs = *(int64_t *)data;
+
+ bufferSource->setSkipFramesBeforeUs(skipFramesBeforeUs);
}
return OK;