summaryrefslogtreecommitdiffstats
path: root/media/libavextensions
diff options
context:
space:
mode:
authorShivaprasad Hongal <shongal@codeaurora.org>2015-09-18 15:17:14 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-29 21:27:02 -0700
commit2e02d0c9f3eb685b92551312068aa687b2c45be5 (patch)
treedb0aa423abc901f351085828cc2b8aefaec2b493 /media/libavextensions
parent340367bd65dddf420a9187ce4b5b4e6bc1ce7ed2 (diff)
downloadframeworks_av-2e02d0c9f3eb685b92551312068aa687b2c45be5.zip
frameworks_av-2e02d0c9f3eb685b92551312068aa687b2c45be5.tar.gz
frameworks_av-2e02d0c9f3eb685b92551312068aa687b2c45be5.tar.bz2
stagefright: Remove additional deep-copy of encoder buffers
MPEG4Writer makes a copy of encoded buffer to avoid holding on to the read buffer. This is not needed with MediaCodecSource, as the encoded-output buffer is already copied to a heap buffer. This saves a copy and some power. However, cloning the buffer is still needed for upstream sources that cannot afford to keep the buffers with writer up until they are released. So, pass a hint in buffer's metadata to indicate if it is OK to delay the release and not copy the buffer Change-Id: Ib59ac29ebc6ce4afd6fc272688a8260438ab1517
Diffstat (limited to 'media/libavextensions')
-rw-r--r--media/libavextensions/stagefright/AVExtensions.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libavextensions/stagefright/AVExtensions.h b/media/libavextensions/stagefright/AVExtensions.h
index 9c712e4..17ea475 100644
--- a/media/libavextensions/stagefright/AVExtensions.h
+++ b/media/libavextensions/stagefright/AVExtensions.h
@@ -161,6 +161,9 @@ struct AVUtils {
virtual bool useQCHWEncoder(const sp<AMessage> &, AString &) { return false; }
+ virtual bool canDeferRelease(const sp<MetaData> &/*meta*/) { return false; }
+ virtual void setDeferRelease(sp<MetaData> &/*meta*/) {}
+
struct HEVCMuxer {
virtual bool reassembleHEVCCSD(const AString &mime, sp<ABuffer> csd0, sp<MetaData> &meta);