diff options
Diffstat (limited to 'include/media/stagefright/SkipCutBuffer.h')
-rw-r--r-- | include/media/stagefright/SkipCutBuffer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/media/stagefright/SkipCutBuffer.h b/include/media/stagefright/SkipCutBuffer.h index 27851ca..2653b53 100644 --- a/include/media/stagefright/SkipCutBuffer.h +++ b/include/media/stagefright/SkipCutBuffer.h @@ -27,12 +27,11 @@ namespace android { * utility class to cut the start and end off a stream of data in MediaBuffers * */ -class SkipCutBuffer { +class SkipCutBuffer: public RefBase { public: // 'skip' is the number of bytes to skip from the beginning // 'cut' is the number of bytes to cut from the end 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. @@ -42,6 +41,9 @@ class SkipCutBuffer { void clear(); size_t size(); // how many bytes are currently stored in the buffer + protected: + virtual ~SkipCutBuffer(); + private: void write(const char *src, size_t num); size_t read(char *dst, size_t num); |