Backed out changeset 46519785800d (bug 847809) for B2G bustage.

This commit is contained in:
Ryan VanderMeulen 2013-03-21 10:41:07 -04:00
parent 6440fd9eef
commit d278f7a463
3 changed files with 1 additions and 22 deletions

View File

@ -7,7 +7,6 @@
#include "DecoderTraits.h"
#include "MediaDecoder.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsIPrincipal.h"
#ifdef MOZ_MEDIA_PLUGINS
#include "MediaPluginHost.h"
@ -196,10 +195,9 @@ IsGStreamerSupportedType(const nsACString& aMimeType)
#endif
#ifdef MOZ_WIDGET_GONK
static const char* const gOmxTypes[7] = {
static const char* const gOmxTypes[6] = {
"audio/mpeg",
"audio/mp4",
"audio/amr",
"video/mp4",
"video/3gpp",
"video/quicktime",
@ -401,21 +399,6 @@ DecoderTraits::CreateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
#endif
#ifdef MOZ_WIDGET_GONK
if (IsOmxSupportedType(aType)) {
// AMR audio is enabled for MMS, but we are discouraging Web and App
// developers from using AMR, thus we only allow AMR to be played on WebApps.
if (aType.EqualsASCII("audio/amr") || aType.EqualsASCII("video/3gpp")) {
nsHTMLMediaElement* element = aOwner->GetMediaElement();
if (!element) {
return nullptr;
}
nsIPrincipal* principal = element->NodePrincipal();
if (!principal) {
return nullptr;
}
if (principal->GetAppStatus() < nsIPrincipal::APP_STATUS_PRIVILEGED) {
return nullptr;
}
}
decoder = new MediaOmxDecoder();
}
#endif

View File

@ -78,7 +78,6 @@
#define AUDIO_WEBM "audio/webm"
#define AUDIO_MP3 "audio/mpeg"
#define AUDIO_MP4 "audio/mp4"
#define AUDIO_AMR "audio/amr"
#define BINARY_OCTET_STREAM "binary/octet-stream"

View File

@ -480,9 +480,6 @@ static nsExtraMimeTypeEntry extraMimeEntries [] =
{ APPLICATION_OGG, "ogg", "Ogg Video"},
{ AUDIO_OGG, "oga", "Ogg Audio" },
{ AUDIO_OGG, "opus", "Opus Audio" },
#ifdef MOZ_WIDGET_GONK
{ AUDIO_AMR, "amr", "Adaptive Multi-Rate Audio" },
#endif
{ VIDEO_WEBM, "webm", "Web Media Video" },
{ AUDIO_WEBM, "webm", "Web Media Audio" },
#ifdef MOZ_DASH