зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1246521: P2. Add MediaDecoder::OwnerHasError method. r=gerald
This commit is contained in:
Родитель
722e4fee21
Коммит
53c49526d6
|
@ -1042,6 +1042,13 @@ MediaDecoder::IsEndedOrShutdown() const
|
|||
return IsEnded() || mPlayState == PLAY_STATE_SHUTDOWN;
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoder::OwnerHasError() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return mShuttingDown || mOwner->HasError();
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoder::IsEnded() const
|
||||
{
|
||||
|
|
|
@ -234,6 +234,10 @@ public:
|
|||
// Call on the main thread only.
|
||||
virtual bool IsEndedOrShutdown() const;
|
||||
|
||||
// Return true if the MediaDecoderOwner's error attribute is not null.
|
||||
// If the MediaDecoder is shutting down, OwnerHasError will return true.
|
||||
bool OwnerHasError() const;
|
||||
|
||||
protected:
|
||||
// Updates the media duration. This is called while the media is being
|
||||
// played, calls before the media has reached loaded metadata are ignored.
|
||||
|
|
Загрузка…
Ссылка в новой задаче