Backed out changeset de401d17868d (bug 1394591)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 04 Sep 2017 00:06:51 +0200
changeset 428180 f53c53754838fdc91c328fa86a63c769282d566f
parent 428179 2312d14f17c47e78dbe987bfbc984d4b65bb7711
child 428181 9fcbd2fd6d0b0f5aa7c0fb3cadc56e5e4cdc1441
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1394591
milestone57.0a1
backs outde401d17868d6fb35b71dc77879331b530c80bd3
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset de401d17868d (bug 1394591)
dom/media/platforms/agnostic/AOMDecoder.cpp
dom/media/platforms/agnostic/VPXDecoder.cpp
dom/media/webm/WebMDemuxer.cpp
media/webrtc/signaling/src/media-conduit/WebrtcMediaDataDecoderCodec.cpp
--- a/dom/media/platforms/agnostic/AOMDecoder.cpp
+++ b/dom/media/platforms/agnostic/AOMDecoder.cpp
@@ -304,17 +304,18 @@ AOMDecoder::Drain()
   });
 }
 
 
 /* static */
 bool
 AOMDecoder::IsAV1(const nsACString& aMimeType)
 {
-  return aMimeType.EqualsLiteral("video/av1");
+  return aMimeType.EqualsLiteral("video/webm; codecs=av1")
+         || aMimeType.EqualsLiteral("video/av1");
 }
 
 /* static */
 bool
 AOMDecoder::IsSupportedCodec(const nsAString& aCodecType)
 {
   // While AV1 is under development, we describe support
   // for a specific aom commit hash so sites can check
--- a/dom/media/platforms/agnostic/VPXDecoder.cpp
+++ b/dom/media/platforms/agnostic/VPXDecoder.cpp
@@ -20,18 +20,20 @@
 
 namespace mozilla {
 
 using namespace gfx;
 using namespace layers;
 
 static VPXDecoder::Codec MimeTypeToCodec(const nsACString& aMimeType)
 {
-  if (aMimeType.EqualsLiteral("video/vp8")) {
+  if (aMimeType.EqualsLiteral("video/webm; codecs=vp8")) {
     return VPXDecoder::Codec::VP8;
+  } else if (aMimeType.EqualsLiteral("video/webm; codecs=vp9")) {
+    return VPXDecoder::Codec::VP9;
   } else if (aMimeType.EqualsLiteral("video/vp9")) {
     return VPXDecoder::Codec::VP9;
   }
   return VPXDecoder::Codec::Unknown;
 }
 
 static nsresult
 InitContext(vpx_codec_ctx_t* aCtx,
@@ -281,17 +283,19 @@ VPXDecoder::DecodeAlpha(vpx_image_t** aI
   return NS_OK;
 }
 
 /* static */
 bool
 VPXDecoder::IsVPX(const nsACString& aMimeType, uint8_t aCodecMask)
 {
   return ((aCodecMask & VPXDecoder::VP8)
-          && aMimeType.EqualsLiteral("video/vp8"))
+          && aMimeType.EqualsLiteral("video/webm; codecs=vp8"))
+         || ((aCodecMask & VPXDecoder::VP9)
+             && aMimeType.EqualsLiteral("video/webm; codecs=vp9"))
          || ((aCodecMask & VPXDecoder::VP9)
              && aMimeType.EqualsLiteral("video/vp9"));
 }
 
 /* static */
 bool
 VPXDecoder::IsVP8(const nsACString& aMimeType)
 {
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -318,23 +318,23 @@ WebMDemuxer::ReadMetadata()
       nestegg_video_params params;
       r = nestegg_track_video_params(context, track, &params);
       if (r == -1) {
         return NS_ERROR_FAILURE;
       }
       mVideoCodec = nestegg_track_codec_id(context, track);
       switch(mVideoCodec) {
         case NESTEGG_CODEC_VP8:
-          mInfo.mVideo.mMimeType = "video/vp8";
+          mInfo.mVideo.mMimeType = "video/webm; codecs=vp8";
           break;
         case NESTEGG_CODEC_VP9:
-          mInfo.mVideo.mMimeType = "video/vp9";
+          mInfo.mVideo.mMimeType = "video/webm; codecs=vp9";
           break;
         case NESTEGG_CODEC_AV1:
-          mInfo.mVideo.mMimeType = "video/av1";
+          mInfo.mVideo.mMimeType = "video/webm; codecs=av1";
           break;
         default:
           NS_WARNING("Unknown WebM video codec");
           return NS_ERROR_FAILURE;
       }
       // Picture region, taking into account cropping, before scaling
       // to the display size.
       unsigned int cropH = params.crop_right + params.crop_left;
--- a/media/webrtc/signaling/src/media-conduit/WebrtcMediaDataDecoderCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcMediaDataDecoderCodec.cpp
@@ -31,20 +31,20 @@ WebrtcMediaDataDecoder::~WebrtcMediaData
 
 int32_t
 WebrtcMediaDataDecoder::InitDecode(const webrtc::VideoCodec* aCodecSettings,
                                    int32_t aNumberOfCores)
 {
   nsCString codec;
   switch (aCodecSettings->codecType) {
     case webrtc::VideoCodecType::kVideoCodecVP8:
-      codec = "video/vp8";
+      codec = "video/webm; codecs=vp8";
       break;
     case webrtc::VideoCodecType::kVideoCodecVP9:
-      codec = "video/vp9";
+      codec = "video/webm; codecs=vp9";
       break;
     case webrtc::VideoCodecType::kVideoCodecH264:
       codec = "video/avc";
       break;
     default:
       return WEBRTC_VIDEO_CODEC_ERROR;
   }