summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-07-17 13:55:26 -0700
committerAndreas Huber <andih@google.com>2013-07-17 15:27:31 -0700
commite40cda70eec141fa05cbcca1de420fdb22b98be6 (patch)
tree44ba825722026f73ceb0c27e5e58c47ab9e884fa /media/libstagefright/ACodec.cpp
parent5478f3c44b9d6670261733953a71a8290fa70ae8 (diff)
downloadframeworks_av-e40cda70eec141fa05cbcca1de420fdb22b98be6.zip
frameworks_av-e40cda70eec141fa05cbcca1de420fdb22b98be6.tar.gz
frameworks_av-e40cda70eec141fa05cbcca1de420fdb22b98be6.tar.bz2
Support "suspension" of a video encoder in "surface-input" mode.
i.e. feed no more input frames to the encoder while suspended. Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 6bc7718..8d1020e 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -4106,6 +4106,19 @@ status_t ACodec::setParameters(const sp<AMessage> &params) {
}
}
+ int32_t dropInputFrames;
+ if (params->findInt32("drop-input-frames", &dropInputFrames)) {
+ bool suspend = dropInputFrames != 0;
+
+ CHECK_EQ((status_t)OK,
+ mOMX->setInternalOption(
+ mNode,
+ kPortIndexInput,
+ IOMX::INTERNAL_OPTION_SUSPEND,
+ &suspend,
+ sizeof(suspend)));
+ }
+
return OK;
}