summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-08-04 15:05:17 -0700
committerAndreas Huber <andih@google.com>2011-08-04 15:05:17 -0700
commite38a2cba16f2161a3a41521c84325cc5c24d9668 (patch)
treef685b0a22c9237e5d84717b86aaf4797446b0348 /include
parente30d6f1588a47fa4ad57a1de7bb28a7a0c58dedf (diff)
downloadframeworks_base-e38a2cba16f2161a3a41521c84325cc5c24d9668.zip
frameworks_base-e38a2cba16f2161a3a41521c84325cc5c24d9668.tar.gz
frameworks_base-e38a2cba16f2161a3a41521c84325cc5c24d9668.tar.bz2
Eliminate superfluous memcpys by wrapping an ABuffer in a MediaBuffer
Change-Id: I1313f117cd7cdfaf7d6ec25413a0b4b8ea495037 related-to-bug: 5122973
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaBuffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/stagefright/MediaBuffer.h b/include/media/stagefright/MediaBuffer.h
index c1c4f94..3d79596 100644
--- a/include/media/stagefright/MediaBuffer.h
+++ b/include/media/stagefright/MediaBuffer.h
@@ -25,6 +25,7 @@
namespace android {
+struct ABuffer;
class GraphicBuffer;
class MediaBuffer;
class MediaBufferObserver;
@@ -51,6 +52,8 @@ public:
MediaBuffer(const sp<GraphicBuffer>& graphicBuffer);
+ MediaBuffer(const sp<ABuffer> &buffer);
+
// Decrements the reference count and returns the buffer to its
// associated MediaBufferGroup if the reference count drops to 0.
void release();
@@ -100,6 +103,7 @@ private:
void *mData;
size_t mSize, mRangeOffset, mRangeLength;
sp<GraphicBuffer> mGraphicBuffer;
+ sp<ABuffer> mBuffer;
bool mOwnsData;