зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1206977: P6. Make PlatformDecoderModule::SupportsMimeType pure virtual. r=cpearce
This commit is contained in:
Родитель
ff58eec402
Коммит
c463ef6fd5
|
@ -64,12 +64,4 @@ PlatformDecoderModule::Create()
|
|||
return m.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
PlatformDecoderModule::SupportsMimeType(const nsACString& aMimeType)
|
||||
{
|
||||
return aMimeType.EqualsLiteral("audio/mp4a-latm") ||
|
||||
aMimeType.EqualsLiteral("video/mp4") ||
|
||||
aMimeType.EqualsLiteral("video/avc");
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
}
|
||||
|
||||
// Indicates if the PlatformDecoderModule supports decoding of aMimeType.
|
||||
virtual bool SupportsMimeType(const nsACString& aMimeType);
|
||||
virtual bool SupportsMimeType(const nsACString& aMimeType) = 0;
|
||||
|
||||
enum ConversionRequired {
|
||||
kNeedNone,
|
||||
|
|
|
@ -42,6 +42,15 @@ public:
|
|||
ConversionRequired
|
||||
DecoderNeedsConversion(const TrackInfo& aConfig) const override;
|
||||
|
||||
bool
|
||||
SupportsMimeType(const nsACString& aMimeType) override
|
||||
{
|
||||
// TODO Properly.
|
||||
return aMimeType.EqualsLiteral("audio/mp4a-latm") ||
|
||||
aMimeType.EqualsLiteral("video/mp4") ||
|
||||
aMimeType.EqualsLiteral("video/avc");
|
||||
}
|
||||
|
||||
private:
|
||||
nsRefPtr<CDMProxy> mProxy;
|
||||
// Will be null if CDM has decoding capability.
|
||||
|
|
|
@ -33,6 +33,14 @@ public:
|
|||
|
||||
ConversionRequired
|
||||
DecoderNeedsConversion(const TrackInfo& aConfig) const override;
|
||||
|
||||
bool
|
||||
SupportsMimeType(const nsACString& aMimeType) override
|
||||
{
|
||||
// TODO properly.
|
||||
return aMimeType.EqualsLiteral("audio/mp4a-latm") ||
|
||||
aMimeType.EqualsLiteral("video/avc");
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -110,7 +110,9 @@ bool
|
|||
AppleDecoderModule::SupportsMimeType(const nsACString& aMimeType)
|
||||
{
|
||||
return aMimeType.EqualsLiteral("audio/mpeg") ||
|
||||
PlatformDecoderModule::SupportsMimeType(aMimeType);
|
||||
aMimeType.EqualsLiteral("audio/mp4a-latm") ||
|
||||
aMimeType.EqualsLiteral("video/mp4") ||
|
||||
aMimeType.EqualsLiteral("video/avc");
|
||||
}
|
||||
|
||||
PlatformDecoderModule::ConversionRequired
|
||||
|
|
Загрузка…
Ссылка в новой задаче