Bug 1368837 - Document that MediaResource::GetCachedDataEnd should return aOffset when out of cache - r?cpearce
MozReview-Commit-ID: JKeuEAjIRxr
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -285,18 +285,18 @@ public:
// server may give us a resource of a different length to what it had
// reported previously --- or it may just lie in its Content-Length
// header and give us more or less data than it reported. We will adjust
// the result of GetLength to reflect the data that's actually arriving.
virtual int64_t GetLength() = 0;
// Returns the offset of the first byte of cached data at or after aOffset,
// or -1 if there is no such cached data.
virtual int64_t GetNextCachedData(int64_t aOffset) = 0;
- // Returns the end of the bytes starting at the given offset
- // which are in cache.
+ // Returns the end of the bytes starting at the given offset which are in
+ // cache. Returns aOffset itself if there are zero bytes available there.
virtual int64_t GetCachedDataEnd(int64_t aOffset) = 0;
// Returns true if all the data from aOffset to the end of the stream
// is in cache. If the end of the stream is not known, we return false.
virtual bool IsDataCachedToEndOfResource(int64_t aOffset) = 0;
// Returns true if we are expecting any more data to arrive
// sometime in the not-too-distant future, either from the network or from
// an appendBuffer call on a MediaSource element.
virtual bool IsExpectingMoreData()