mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 221ca54f4df0 (bug 1092096) for m2 test failures
This commit is contained in:
parent
ffe79c28eb
commit
1ac9040f4a
@ -63,10 +63,21 @@ static const unsigned int MAX_SOURCE_BUFFERS = 16;
|
||||
namespace mozilla {
|
||||
|
||||
static const char* const gMediaSourceTypes[6] = {
|
||||
// XXX: Disabled other temporarily on desktop to allow WebM testing. For now,
|
||||
// set the developer-only media.mediasource.ignore_codecs pref to true to test
|
||||
// other codecs, and expect things to be broken.
|
||||
//
|
||||
// Disabled WebM in favour of MP4 on Firefox OS.
|
||||
#ifdef MOZ_GONK_MEDIACODEC
|
||||
"video/mp4",
|
||||
"audio/mp4",
|
||||
#else
|
||||
"video/webm",
|
||||
"audio/webm",
|
||||
#endif
|
||||
#if 0
|
||||
"audio/mpeg",
|
||||
#endif
|
||||
nullptr
|
||||
};
|
||||
|
||||
@ -76,6 +87,10 @@ IsTypeSupported(const nsAString& aType)
|
||||
if (aType.IsEmpty()) {
|
||||
return NS_ERROR_DOM_INVALID_ACCESS_ERR;
|
||||
}
|
||||
if (Preferences::GetBool("media.mediasource.ignore_codecs", false)) {
|
||||
return NS_OK;
|
||||
}
|
||||
// TODO: Further restrict this to formats in the spec.
|
||||
nsContentTypeParser parser(aType);
|
||||
nsAutoString mimeType;
|
||||
nsresult rv = parser.GetType(mimeType);
|
||||
@ -85,16 +100,6 @@ IsTypeSupported(const nsAString& aType)
|
||||
bool found = false;
|
||||
for (uint32_t i = 0; gMediaSourceTypes[i]; ++i) {
|
||||
if (mimeType.EqualsASCII(gMediaSourceTypes[i])) {
|
||||
if ((mimeType.EqualsASCII("video/mp4") ||
|
||||
mimeType.EqualsASCII("audio/mp4")) &&
|
||||
!Preferences::GetBool("media.mediasource.mp4.enabled", false)) {
|
||||
break;
|
||||
}
|
||||
if ((mimeType.EqualsASCII("video/webm") ||
|
||||
mimeType.EqualsASCII("audio/webm")) &&
|
||||
!Preferences::GetBool("media.mediasource.webm.enabled", false)) {
|
||||
break;
|
||||
}
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
@ -413,14 +413,6 @@ pref("media.mediasource.enabled", false);
|
||||
pref("media.mediasource.enabled", true);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
pref("media.mediasource.mp4.enabled", false);
|
||||
pref("media.mediasource.webm.enabled", false);
|
||||
#else
|
||||
pref("media.mediasource.mp4.enabled", false);
|
||||
pref("media.mediasource.webm.enabled", true);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
pref("media.webspeech.recognition.enable", false);
|
||||
pref("media.webspeech.synth.enabled", false);
|
||||
|
Loading…
Reference in New Issue
Block a user