diff options
author | Jamie Gennis <jgennis@google.com> | 2012-06-22 15:20:48 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-22 15:20:48 -0700 |
commit | e6cb412b677966c25b424766dc6ceb2787d49caa (patch) | |
tree | 6bfbcf0b8cdfa231f5638b2e9eca58c271e48123 /include | |
parent | 5ca15ccf7336d5aa5a7b563742757fa37092eb48 (diff) | |
parent | 33e28dd3c033641f4db9d1b99c7c88d6d08c61f7 (diff) | |
download | frameworks_av-e6cb412b677966c25b424766dc6ceb2787d49caa.zip frameworks_av-e6cb412b677966c25b424766dc6ceb2787d49caa.tar.gz frameworks_av-e6cb412b677966c25b424766dc6ceb2787d49caa.tar.bz2 |
am 33e28dd3: Merge "SurfaceMediaSource: keep refs to current buffers" into jb-dev
* commit '33e28dd3c033641f4db9d1b99c7c88d6d08c61f7':
SurfaceMediaSource: keep refs to current buffers
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/SurfaceMediaSource.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/media/stagefright/SurfaceMediaSource.h b/include/media/stagefright/SurfaceMediaSource.h index e25d444..4a8e221 100644 --- a/include/media/stagefright/SurfaceMediaSource.h +++ b/include/media/stagefright/SurfaceMediaSource.h @@ -79,10 +79,6 @@ public: MediaBuffer **buffer, const ReadOptions *options = NULL); virtual sp<MetaData> getFormat(); - // Pass the metadata over to the buffer, call when you have the lock - void passMetadataBufferLocked(MediaBuffer **buffer); - bool checkBufferMatchesSlot(int slot, MediaBuffer *buffer); - // Get / Set the frame rate used for encoding. Default fps = 30 status_t setFrameRate(int32_t fps) ; int32_t getFrameRate( ) const; @@ -105,9 +101,6 @@ public: // when a new frame becomes available. void setFrameAvailableListener(const sp<FrameAvailableListener>& listener); - // getCurrentBuffer returns the buffer associated with the current image. - sp<GraphicBuffer> getCurrentBuffer() const; - // dump our state in a String void dump(String8& result) const; void dump(String8& result, const char* prefix, char* buffer, @@ -165,11 +158,12 @@ private: // reset mCurrentTexture to INVALID_BUFFER_SLOT. int mCurrentSlot; - // mCurrentBuf is the graphic buffer of the current slot to be used by - // buffer consumer. It's possible that this buffer is not associated - // with any buffer slot, so we must track it separately in order to - // properly use IGraphicBufferAlloc::freeAllGraphicBuffersExcept. - sp<GraphicBuffer> mCurrentBuf; + // mCurrentBuffers is a list of the graphic buffers that are being used by + // buffer consumer (i.e. the video encoder). It's possible that these + // buffers are not associated with any buffer slots, so we must track them + // separately. Buffers are added to this list in read, and removed from + // this list in signalBufferReturned + Vector<sp<GraphicBuffer> > mCurrentBuffers; // mCurrentTimestamp is the timestamp for the current texture. It // gets set to mLastQueuedTimestamp each time updateTexImage is called. |