summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMXNodeInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/omx/OMXNodeInstance.cpp')
-rw-r--r--media/libstagefright/omx/OMXNodeInstance.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index 8d100f1..ef683a0 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -809,6 +809,7 @@ status_t OMXNodeInstance::setInternalOption(
size_t size) {
switch (type) {
case IOMX::INTERNAL_OPTION_SUSPEND:
+ case IOMX::INTERNAL_OPTION_REPEAT_PREVIOUS_FRAME_DELAY:
{
const sp<GraphicBufferSource> &bufferSource =
getGraphicBufferSource();
@@ -817,12 +818,22 @@ status_t OMXNodeInstance::setInternalOption(
return ERROR_UNSUPPORTED;
}
- if (size != sizeof(bool)) {
- return INVALID_OPERATION;
- }
+ if (type == IOMX::INTERNAL_OPTION_SUSPEND) {
+ if (size != sizeof(bool)) {
+ return INVALID_OPERATION;
+ }
+
+ bool suspend = *(bool *)data;
+ bufferSource->suspend(suspend);
+ } else {
+ if (size != sizeof(int64_t)) {
+ return INVALID_OPERATION;
+ }
+
+ int64_t delayUs = *(int64_t *)data;
- bool suspend = *(bool *)data;
- bufferSource->suspend(suspend);
+ return bufferSource->setRepeatPreviousFrameDelayUs(delayUs);
+ }
return OK;
}