mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171330: P9. Remove "Diamond Problem" with MediaDecoder inheritance. r=cpearce
This commit is contained in:
parent
b1d742f6c3
commit
542fd87d53
@ -43,7 +43,7 @@ enum class MediaDecoderEventVisibility : int8_t {
|
||||
* The AbstractMediaDecoder class describes the public interface for a media decoder
|
||||
* and is used by the MediaReader classes.
|
||||
*/
|
||||
class AbstractMediaDecoder : public nsISupports
|
||||
class AbstractMediaDecoder : public nsIObserver
|
||||
{
|
||||
public:
|
||||
// Returns the monitor for other threads to synchronise access to
|
||||
@ -146,6 +146,11 @@ public:
|
||||
AbstractMediaDecoder* mDecoder;
|
||||
};
|
||||
|
||||
// Classes directly inheriting from AbstractMediaDecoder do not support
|
||||
// Observe and it should never be called directly.
|
||||
NS_IMETHOD Observe(nsISupports *aSubject, const char * aTopic, const char16_t * aData) override
|
||||
{ MOZ_CRASH("Forbidden method"); return NS_OK; }
|
||||
|
||||
#ifdef MOZ_EME
|
||||
virtual nsresult SetCDMProxy(CDMProxy* aProxy) { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
virtual CDMProxy* GetCDMProxy() { return nullptr; }
|
||||
|
@ -264,8 +264,7 @@ struct SeekTarget {
|
||||
MediaDecoderEventVisibility mEventVisibility;
|
||||
};
|
||||
|
||||
class MediaDecoder : public nsIObserver,
|
||||
public AbstractMediaDecoder
|
||||
class MediaDecoder : public AbstractMediaDecoder
|
||||
{
|
||||
public:
|
||||
struct SeekResolveValue {
|
||||
|
Loading…
Reference in New Issue
Block a user