diff options
author | Glenn Kasten <gkasten@google.com> | 2013-12-17 16:14:04 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-12-17 16:16:24 -0800 |
commit | 47f3f5a119194d4c06815453be9950ba112c8e3e (patch) | |
tree | 60f1d74de1ab21c097002b76fbedf30a4fce2608 /include/media/AudioBufferProvider.h | |
parent | bd72d22097f78f5bd668b223bc8c94e351311e31 (diff) | |
download | frameworks_av-47f3f5a119194d4c06815453be9950ba112c8e3e.zip frameworks_av-47f3f5a119194d4c06815453be9950ba112c8e3e.tar.gz frameworks_av-47f3f5a119194d4c06815453be9950ba112c8e3e.tar.bz2 |
Fix bug in test-resample's AudioBufferProvider
The contract for AudioBufferProvider::releaseBuffer() was missing.
Bug: 12194314
Change-Id: I2fcf75e7b8eaf6db34f360206d79457a04a73565
Diffstat (limited to 'include/media/AudioBufferProvider.h')
-rw-r--r-- | include/media/AudioBufferProvider.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/media/AudioBufferProvider.h b/include/media/AudioBufferProvider.h index ef392f0..7be449c 100644 --- a/include/media/AudioBufferProvider.h +++ b/include/media/AudioBufferProvider.h @@ -61,6 +61,17 @@ public: // buffer->frameCount 0 virtual status_t getNextBuffer(Buffer* buffer, int64_t pts = kInvalidPTS) = 0; + // Release (a portion of) the buffer previously obtained by getNextBuffer(). + // It is permissible to call releaseBuffer() multiple times per getNextBuffer(). + // On entry: + // buffer->frameCount number of frames to release, must be <= number of frames + // obtained but not yet released + // buffer->raw unused + // On return: + // buffer->frameCount 0; implementation MUST set to zero + // buffer->raw undefined; implementation is PERMITTED to set to any value, + // so if caller needs to continue using this buffer it must + // keep track of the pointer itself virtual void releaseBuffer(Buffer* buffer) = 0; }; |