Chromium Code Reviews| Index: media/blink/multibuffer.h |
| diff --git a/media/blink/multibuffer.h b/media/blink/multibuffer.h |
| index 29359b337e1f201132509080cf509f048e28347c..20a71fa3bbb4c2065f29f9bd7f70c8641ce7b966 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. |
| + 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,8 @@ class MEDIA_BLINK_EXPORT MultiBuffer { |
| // Increment max cache size by |size| (counted in blocks). |
| void IncrementMaxSize(int32_t size); |
| + int64_t UncommittedBytesAt(const BlockId& block); |
|
wolenetz
2016/05/12 23:41:17
nit: document this public method please.
hubbe
2016/05/13 00:05:14
Done.
|
| + |
| // Caller takes ownership of 'provider', cache will |
| // not call it anymore. |
| std::unique_ptr<DataProvider> RemoveProvider(DataProvider* provider); |