mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1246521: P2. Add MediaDecoder::OwnerHasError method. r=gerald
This commit is contained in:
parent
fd8593e42a
commit
89eccdbabf
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user