summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-04-30 18:15:52 -0700
committerChong Zhang <chz@google.com>2015-05-01 19:06:38 -0700
commitd291c222357303b9611cab89d0c3b047584ef377 (patch)
tree953551d93d5a215cefb14470387ff7494c9b60e5 /media/libstagefright/include
parent64da6f045b1a1d1b8f01391b6e37287f77f85d1e (diff)
downloadframeworks_av-d291c222357303b9611cab89d0c3b047584ef377.zip
frameworks_av-d291c222357303b9611cab89d0c3b047584ef377.tar.gz
frameworks_av-d291c222357303b9611cab89d0c3b047584ef377.tar.bz2
MediaCodec: implement persistent input surface APIs
Bug: 19127604 Bug: 19489395 Change-Id: Idaf1cc9008016f66903e93907a676f54e342e1a3
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r--media/libstagefright/include/OMX.h8
-rw-r--r--media/libstagefright/include/OMXNodeInstance.h9
2 files changed, 17 insertions, 0 deletions
diff --git a/media/libstagefright/include/OMX.h b/media/libstagefright/include/OMX.h
index b5487fa..b1ee628 100644
--- a/media/libstagefright/include/OMX.h
+++ b/media/libstagefright/include/OMX.h
@@ -95,6 +95,14 @@ public:
node_id node, OMX_U32 port_index,
sp<IGraphicBufferProducer> *bufferProducer);
+ virtual status_t createPersistentInputSurface(
+ sp<IGraphicBufferProducer> *bufferProducer,
+ sp<IGraphicBufferConsumer> *bufferConsumer);
+
+ virtual status_t usePersistentInputSurface(
+ node_id node, OMX_U32 port_index,
+ const sp<IGraphicBufferConsumer> &bufferConsumer);
+
virtual status_t signalEndOfInputStream(node_id node);
virtual status_t allocateBuffer(
diff --git a/media/libstagefright/include/OMXNodeInstance.h b/media/libstagefright/include/OMXNodeInstance.h
index d87b408..f31af7b 100644
--- a/media/libstagefright/include/OMXNodeInstance.h
+++ b/media/libstagefright/include/OMXNodeInstance.h
@@ -81,6 +81,13 @@ struct OMXNodeInstance {
status_t createInputSurface(
OMX_U32 portIndex, sp<IGraphicBufferProducer> *bufferProducer);
+ static status_t createPersistentInputSurface(
+ sp<IGraphicBufferProducer> *bufferProducer,
+ sp<IGraphicBufferConsumer> *bufferConsumer);
+
+ status_t usePersistentInputSurface(
+ OMX_U32 portIndex, const sp<IGraphicBufferConsumer> &bufferConsumer);
+
status_t signalEndOfInputStream();
status_t allocateBuffer(
@@ -202,6 +209,8 @@ private:
OMX_BUFFERHEADERTYPE *header,
OMX_U32 flags, OMX_TICKS timestamp, intptr_t debugAddr);
+ status_t createGraphicBufferSource(
+ OMX_U32 portIndex, sp<IGraphicBufferConsumer> consumer = NULL);
sp<GraphicBufferSource> getGraphicBufferSource();
void setGraphicBufferSource(const sp<GraphicBufferSource>& bufferSource);