From 7cd58537932ef6f481f68be0b9c597a89cebdfec Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 19 Feb 2013 07:28:30 -0800 Subject: Implement Surface input to MediaCodec. Also, renamed a CHECK_INTERFACE macro that was clashing with the Binder version. Bug 7991062 Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0 --- media/libstagefright/omx/OMX.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'media/libstagefright/omx/OMX.cpp') diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 29bc733..3987ead 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -345,6 +345,17 @@ status_t OMX::useGraphicBuffer( port_index, graphicBuffer, buffer); } +status_t OMX::createInputSurface( + node_id node, OMX_U32 port_index, + sp *bufferProducer) { + return findInstance(node)->createInputSurface( + port_index, bufferProducer); +} + +status_t OMX::signalEndOfInputStream(node_id node) { + return findInstance(node)->signalEndOfInputStream(); +} + status_t OMX::allocateBuffer( node_id node, OMX_U32 port_index, size_t size, buffer_id *buffer, void **buffer_data) { @@ -393,6 +404,9 @@ OMX_ERRORTYPE OMX::OnEvent( OMX_IN OMX_PTR pEventData) { ALOGV("OnEvent(%d, %ld, %ld)", eEvent, nData1, nData2); + // Forward to OMXNodeInstance. + findInstance(node)->onEvent(eEvent, nData1, nData2); + omx_message msg; msg.type = omx_message::EVENT; msg.node = node; -- cgit v1.1 From e40cda70eec141fa05cbcca1de420fdb22b98be6 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Wed, 17 Jul 2013 13:55:26 -0700 Subject: 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 --- media/libstagefright/omx/OMX.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'media/libstagefright/omx/OMX.cpp') diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 3987ead..4b1dbe6 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -396,6 +396,15 @@ status_t OMX::getExtensionIndex( parameter_name, index); } +status_t OMX::setInternalOption( + node_id node, + OMX_U32 port_index, + InternalOptionType type, + const void *data, + size_t size) { + return findInstance(node)->setInternalOption(port_index, type, data, size); +} + OMX_ERRORTYPE OMX::OnEvent( node_id node, OMX_IN OMX_EVENTTYPE eEvent, -- cgit v1.1 From d0715867861c216e88a4a7523b6da8a3cb128724 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Mon, 22 Jul 2013 12:57:43 -0700 Subject: IOMX: add updateGraphicBufferInMeta method for metadata mode This is used to set the handle in the metadata buffer that is valid in the mediaserver process, as well as to keep a reference for the graphic buffers in BufferMeta. Change-Id: I46bb68d8bed894f357eeeb25368360d11b276634 Signed-off-by: Lajos Molnar --- media/libstagefright/omx/OMX.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'media/libstagefright/omx/OMX.cpp') diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 4b1dbe6..aaa9f89 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -345,6 +345,13 @@ status_t OMX::useGraphicBuffer( port_index, graphicBuffer, buffer); } +status_t OMX::updateGraphicBufferInMeta( + node_id node, OMX_U32 port_index, + const sp &graphicBuffer, buffer_id buffer) { + return findInstance(node)->updateGraphicBufferInMeta( + port_index, graphicBuffer, buffer); +} + status_t OMX::createInputSurface( node_id node, OMX_U32 port_index, sp *bufferProducer) { -- cgit v1.1 From 56ce726019f700a95ce5b45beebceadae4836e30 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Thu, 2 May 2013 16:30:48 -0700 Subject: IOMX: Add prepareForAdaptivePlayback method prepareForAdaptivePlayback is the fallback mechanism to support seamless resolution change for devices that do not support dynamic output buffers. It is up to the codecs to handle this appropriately, but codecs that do not handle dynamic output buffers would request enough buffers up to the requested size in this method to avoid port reconfiguration on resolution changes. Change-Id: I58d4aa8ef1359ea3472735bbe9140c3132039b3d Signed-off-by: Lajos Molnar Bug: 10192531 Related-to-bug: 7093648 --- media/libstagefright/omx/OMX.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'media/libstagefright/omx/OMX.cpp') diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index aaa9f89..84a0e10 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -331,6 +331,13 @@ status_t OMX::storeMetaDataInBuffers( return findInstance(node)->storeMetaDataInBuffers(port_index, enable); } +status_t OMX::prepareForAdaptivePlayback( + node_id node, OMX_U32 portIndex, OMX_BOOL enable, + OMX_U32 maxFrameWidth, OMX_U32 maxFrameHeight) { + return findInstance(node)->prepareForAdaptivePlayback( + portIndex, enable, maxFrameWidth, maxFrameHeight); +} + status_t OMX::useBuffer( node_id node, OMX_U32 port_index, const sp ¶ms, buffer_id *buffer) { -- cgit v1.1