Index: content/renderer/media/rtc_video_decoder.h |
diff --git a/content/renderer/media/rtc_video_decoder.h b/content/renderer/media/rtc_video_decoder.h |
index f2c240edc1d91a35b36662f17ba9b424141159c6..9a92aaca1687653574f16164b7224ef44e086618 100644 |
--- a/content/renderer/media/rtc_video_decoder.h |
+++ b/content/renderer/media/rtc_video_decoder.h |
@@ -162,8 +162,8 @@ class CONTENT_EXPORT RTCVideoDecoder |
// Returns a shared-memory segment to the available pool. |
void PutSHM_Locked(scoped_ptr<SHMBuffer> shm_buffer); |
- // Allocates |number| shared memory of at least |min_size| bytes. |
- void CreateSHM(int number, size_t min_size); |
+ // Allocates |count| shared memory buffers of |size| bytes. |
+ void CreateSHM(size_t count, size_t size); |
// Stores the buffer metadata to |input_buffer_data_|. |
void RecordBufferData(const BufferData& buffer_data); |
@@ -181,6 +181,9 @@ class CONTENT_EXPORT RTCVideoDecoder |
// in min/max_resolution_. |
bool IsProfileSupported(media::VideoCodecProfile profile); |
+ // Clear the pending_buffers_ queue, freeing memory. |
+ void ClearPendingBuffers(); |
+ |
enum State { |
UNINITIALIZED, // The decoder has not initialized. |
INITIALIZED, // The decoder has initialized. |
@@ -238,7 +241,7 @@ class CONTENT_EXPORT RTCVideoDecoder |
webrtc::DecodedImageCallback* decode_complete_callback_; |
// Total number of allocated SHM buffers. Guarded by |lock_|. |
- int num_shm_buffers_; |
+ size_t num_shm_buffers_; |
// Shared-memory buffer pool. Since allocating SHM segments requires a |
// round-trip to the browser process, we keep allocation out of the |