Chromium Code Reviews| Index: media/blink/multibuffer.h |
| diff --git a/media/blink/multibuffer.h b/media/blink/multibuffer.h |
| index 29359b337e1f201132509080cf509f048e28347c..922594ce7f68c23344a62017ca269b546a59d36a 100644 |
| --- a/media/blink/multibuffer.h |
| +++ b/media/blink/multibuffer.h |
| @@ -114,6 +114,10 @@ class MEDIA_BLINK_EXPORT MultiBuffer { |
| // availble to read. |
| virtual bool Available() const = 0; |
| + // Returns how many bytes are available, note that Available() may still |
| + // return false even if AvailableBytes() returns true. |
|
liberato (no reviews please)
2016/05/13 17:45:54
s/true./greater than zero, if less than a full blo
hubbe
2016/05/13 17:51:36
Done.
|
| + virtual int64_t AvailableBytes() const = 0; |
| + |
| // Returns the next block. Only valid if Available() |
| // returns true. Last block might be of a smaller size |
| // and after the last block we will get an end-of-stream |
| @@ -249,6 +253,11 @@ class MEDIA_BLINK_EXPORT MultiBuffer { |
| // Increment max cache size by |size| (counted in blocks). |
| void IncrementMaxSize(int32_t size); |
| + // Returns how many bytes have been received by the data providers at position |
| + // |block|, which have not yet been submitted to the multibuffer cache. |
| + // The returned number should be less than the size of one block. |
| + int64_t UncommittedBytesAt(const BlockId& block); |
| + |
| // Caller takes ownership of 'provider', cache will |
| // not call it anymore. |
| std::unique_ptr<DataProvider> RemoveProvider(DataProvider* provider); |