summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2012-03-28 16:38:37 -0700
committerMarco Nelissen <marcone@google.com>2012-03-29 09:28:47 -0700
commitcb5b766bb0a3ed992998a5bd66de0ee1d2223b81 (patch)
treee4d3d93e823d0c5c691549d9966f7660de1373df /include
parent559bf2836f5da25b75bfb229fec0d20d540ee426 (diff)
downloadframeworks_av-cb5b766bb0a3ed992998a5bd66de0ee1d2223b81.zip
frameworks_av-cb5b766bb0a3ed992998a5bd66de0ee1d2223b81.tar.gz
frameworks_av-cb5b766bb0a3ed992998a5bd66de0ee1d2223b81.tar.bz2
Add ABuffer support to SkipCutBuffer
Add support for ABuffer to SkipCutBuffer, and make it (re)allocate an appropriately sized buffer when needed, rather then relying on the caller to tell it ahead of time how big the buffers are going to be. Change-Id: I8b5c9ba5dd2fc13ef8870b7d4fe93a1bfdc7a626
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/SkipCutBuffer.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/media/stagefright/SkipCutBuffer.h b/include/media/stagefright/SkipCutBuffer.h
index 5c7cd47..27851ca 100644
--- a/include/media/stagefright/SkipCutBuffer.h
+++ b/include/media/stagefright/SkipCutBuffer.h
@@ -19,6 +19,7 @@
#define SKIP_CUT_BUFFER_H_
#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/foundation/ABuffer.h>
namespace android {
@@ -30,14 +31,14 @@ class SkipCutBuffer {
public:
// 'skip' is the number of bytes to skip from the beginning
// 'cut' is the number of bytes to cut from the end
- // 'output_size' is the size in bytes of the MediaBuffers that will be used
- SkipCutBuffer(int32_t skip, int32_t cut, int32_t output_size);
+ SkipCutBuffer(int32_t skip, int32_t cut);
virtual ~SkipCutBuffer();
// Submit one MediaBuffer for skipping and cutting. This may consume all or
// some of the data in the buffer, or it may add data to it.
// After this, the caller should continue processing the buffer as usual.
void submit(MediaBuffer *buffer);
+ void submit(const sp<ABuffer>& buffer); // same as above, but with an ABuffer
void clear();
size_t size(); // how many bytes are currently stored in the buffer