Bug 726400 - Backed out changeset 4ad6c040729f. r=backout.

This commit is contained in:
Chris Pearce 2012-03-26 14:41:14 +13:00
parent 25e946ae06
commit 34453514e9
6 changed files with 6 additions and 31 deletions

View File

@ -277,10 +277,6 @@ public:
// false here even if CanHandleMediaType would return true.
static bool ShouldHandleMediaType(const char* aMIMEType);
#ifdef MOZ_RAW
static bool IsRawEnabled();
#endif
#ifdef MOZ_OGG
static bool IsOggEnabled();
static bool IsOggType(const nsACString& aType);

View File

@ -1712,8 +1712,7 @@ static const char* gRawCodecs[] = {
nsnull
};
bool
nsHTMLMediaElement::IsRawEnabled()
static bool IsRawEnabled()
{
return Preferences::GetBool("media.raw.enabled");
}

View File

@ -44,12 +44,7 @@
class nsOggDecoder : public nsBuiltinDecoder
{
public:
virtual nsMediaDecoder* Clone() {
if (!nsHTMLMediaElement::IsOggEnabled()) {
return nsnull;
}
return new nsOggDecoder();
}
virtual nsMediaDecoder* Clone() { return new nsOggDecoder(); }
virtual nsDecoderStateMachine* CreateStateMachine();
};

View File

@ -42,12 +42,7 @@
class nsRawDecoder : public nsBuiltinDecoder
{
public:
virtual nsMediaDecoder* Clone() {
if (!nsHTMLMediaElement::IsRawEnabled()) {
return nsnull;
}
return new nsRawDecoder();
}
virtual nsMediaDecoder* Clone() { return new nsRawDecoder(); }
virtual nsDecoderStateMachine* CreateStateMachine();
};

View File

@ -55,13 +55,8 @@
class nsWaveDecoder : public nsBuiltinDecoder
{
public:
virtual nsMediaDecoder* Clone() {
if (!nsHTMLMediaElement::IsWaveEnabled()) {
return nsnull;
}
return new nsWaveDecoder();
}
virtual nsDecoderStateMachine* CreateStateMachine();
virtual nsMediaDecoder* Clone() { return new nsWaveDecoder(); }
virtual nsDecoderStateMachine* CreateStateMachine();
};
#endif

View File

@ -44,12 +44,7 @@
class nsWebMDecoder : public nsBuiltinDecoder
{
public:
virtual nsMediaDecoder* Clone() {
if (!nsHTMLMediaElement::IsWebMEnabled()) {
return nsnull;
}
return new nsWebMDecoder();
}
virtual nsMediaDecoder* Clone() { return new nsWebMDecoder(); }
virtual nsDecoderStateMachine* CreateStateMachine();
};