зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1171330: P9. Remove "Diamond Problem" with MediaDecoder inheritance. r=cpearce
--HG-- extra : rebase_source : a8116bf4cdcf3910dbcbf68ba7adb36e6c9d2e04
This commit is contained in:
Родитель
63af29a4ae
Коммит
0b224435dc
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче