mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1392919. P2 - remove MediaResource::IsSuspendedByCache(). r=gerald
MozReview-Commit-ID: E1lkfLARMhS --HG-- extra : rebase_source : 354adbb22db9bdacec74a824bf04bfce0775faad
This commit is contained in:
parent
c960cfcc65
commit
da66e5c214
@ -68,7 +68,6 @@ private:
|
||||
return std::max(aOffset, int64_t(mLength));
|
||||
}
|
||||
bool IsDataCachedToEndOfResource(int64_t aOffset) override { return true; }
|
||||
bool IsSuspendedByCache() override { return false; }
|
||||
bool IsSuspended() override { return false; }
|
||||
nsresult ReadFromCache(char* aBuffer,
|
||||
int64_t aOffset,
|
||||
|
@ -1163,7 +1163,6 @@ public:
|
||||
return std::max(aOffset, mSize);
|
||||
}
|
||||
bool IsDataCachedToEndOfResource(int64_t aOffset) override { return true; }
|
||||
bool IsSuspendedByCache() override { return true; }
|
||||
bool IsSuspended() override { return true; }
|
||||
bool IsTransportSeekable() override { return true; }
|
||||
|
||||
|
@ -202,14 +202,6 @@ public:
|
||||
// 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 this stream is suspended by the cache because the
|
||||
// cache is full. If true then the decoder should try to start consuming
|
||||
// data, otherwise we may not be able to make progress.
|
||||
// MediaDecoder::NotifySuspendedStatusChanged is called when this
|
||||
// changes.
|
||||
// For resources using the media cache, this returns true only when all
|
||||
// streams for the same resource are all suspended.
|
||||
virtual bool IsSuspendedByCache() = 0;
|
||||
// Returns true if this stream has been suspended.
|
||||
virtual bool IsSuspended() = 0;
|
||||
// Reads only data which is cached in the media cache. If you try to read
|
||||
@ -499,7 +491,6 @@ public:
|
||||
int64_t GetNextCachedData(int64_t aOffset) override;
|
||||
int64_t GetCachedDataEnd(int64_t aOffset) override;
|
||||
bool IsDataCachedToEndOfResource(int64_t aOffset) override;
|
||||
bool IsSuspendedByCache() override;
|
||||
bool IsSuspended() override;
|
||||
bool IsTransportSeekable() override;
|
||||
|
||||
@ -542,6 +533,7 @@ public:
|
||||
nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override;
|
||||
|
||||
protected:
|
||||
bool IsSuspendedByCache();
|
||||
// These are called on the main thread by Listener.
|
||||
nsresult OnStartRequest(nsIRequest* aRequest);
|
||||
nsresult OnStopRequest(nsIRequest* aRequest, nsresult aStatus);
|
||||
|
@ -34,7 +34,6 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool IsSuspendedByCache() override { return false; }
|
||||
bool IsSuspended() override { return false; }
|
||||
nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
|
||||
uint32_t aCount) override
|
||||
|
@ -57,7 +57,6 @@ public:
|
||||
int64_t GetNextCachedData(int64_t aOffset) override { UNIMPLEMENTED(); return -1; }
|
||||
int64_t GetCachedDataEnd(int64_t aOffset) override { UNIMPLEMENTED(); return -1; }
|
||||
bool IsDataCachedToEndOfResource(int64_t aOffset) override { UNIMPLEMENTED(); return false; }
|
||||
bool IsSuspendedByCache() override { UNIMPLEMENTED(); return false; }
|
||||
bool IsSuspended() override { UNIMPLEMENTED(); return false; }
|
||||
nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override { UNIMPLEMENTED(); return NS_ERROR_FAILURE; }
|
||||
|
||||
|
@ -41,7 +41,6 @@ public:
|
||||
int64_t GetNextCachedData(int64_t aOffset) override { UNIMPLEMENTED(); return -1; }
|
||||
int64_t GetCachedDataEnd(int64_t aOffset) override { UNIMPLEMENTED(); return -1; }
|
||||
bool IsDataCachedToEndOfResource(int64_t aOffset) override { UNIMPLEMENTED(); return false; }
|
||||
bool IsSuspendedByCache() override { UNIMPLEMENTED(); return false; }
|
||||
bool IsSuspended() override { UNIMPLEMENTED(); return false; }
|
||||
nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override { UNIMPLEMENTED(); return NS_ERROR_FAILURE; }
|
||||
|
||||
|
@ -69,11 +69,6 @@ public:
|
||||
return GetLength();
|
||||
}
|
||||
bool IsDataCachedToEndOfResource(int64_t aOffset) override { return false; }
|
||||
bool IsSuspendedByCache() override
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
return false;
|
||||
}
|
||||
bool IsSuspended() override
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
|
Loading…
Reference in New Issue
Block a user