Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > d0e3cdee08045b3d0e6744609d743407 > files > 7

chromium-browser-stable-60.0.3112.101-1.mga5.src.rpm

--- chromium-60.0.3112.40/media/base/mime_util_internal.cc.android	2017-06-23 23:53:24.014191909 +0200
+++ chromium-60.0.3112.40/media/base/mime_util_internal.cc	2017-06-24 00:02:30.332345780 +0200
@@ -593,139 +593,6 @@
   allow_proprietary_codecs_ = false;
 }
 
-// static
-bool MimeUtil::IsCodecSupportedOnAndroid(
-    Codec codec,
-    const std::string& mime_type_lower_case,
-    bool is_encrypted,
-    const PlatformInfo& platform_info) {
-  DCHECK_NE(mime_type_lower_case, "");
-
-  // Encrypted block support is never available without platform decoders.
-  if (is_encrypted && !platform_info.has_platform_decoders)
-    return false;
-
-  // NOTE: We do not account for Media Source Extensions (MSE) within these
-  // checks since it has its own isTypeSupported() which will handle platform
-  // specific codec rejections.  See http://crbug.com/587303.
-
-  switch (codec) {
-    // ----------------------------------------------------------------------
-    // The following codecs are never supported.
-    // ----------------------------------------------------------------------
-    case INVALID_CODEC:
-    case THEORA:
-      return false;
-
-    // ----------------------------------------------------------------------
-    // The remaining codecs may be supported depending on platform abilities.
-    // ----------------------------------------------------------------------
-    case MPEG2_AAC:
-      // MPEG2_AAC cannot be used in HLS (mpegurl suffix), but this is enforced
-      // in the parsing step by excluding MPEG2_AAC from the list of
-      // valid codecs to be used with HLS mime types.
-      DCHECK(!base::EndsWith(mime_type_lower_case, "mpegurl",
-                             base::CompareCase::SENSITIVE));
-    case PCM:
-    case MP3:
-    case MPEG4_AAC:
-    case FLAC:
-    case VORBIS:
-      // These codecs are always supported; via a platform decoder (when used
-      // with MSE/EME), a software decoder (the unified pipeline), or with
-      // MediaPlayer.
-      DCHECK(!is_encrypted || platform_info.has_platform_decoders);
-      return true;
-
-    case OPUS:
-      // If clear, the unified pipeline can always decode Opus in software.
-      if (!is_encrypted)
-        return true;
-
-      // Otherwise, platform support is required.
-      if (!platform_info.supports_opus)
-        return false;
-
-      // MediaPlayer does not support Opus in ogg containers.
-      if (base::EndsWith(mime_type_lower_case, "ogg",
-                         base::CompareCase::SENSITIVE)) {
-        return false;
-      }
-
-      DCHECK(!is_encrypted || platform_info.has_platform_decoders);
-      return true;
-
-    case H264:
-      // When content is not encrypted we fall back to MediaPlayer, thus we
-      // always support H264. For EME we need MediaCodec.
-      return !is_encrypted || platform_info.has_platform_decoders;
-
-    case HEVC:
-#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
-      if (!platform_info.has_platform_decoders)
-        return false;
-
-#if defined(OS_ANDROID)
-      // HEVC/H.265 is supported in Lollipop+ (API Level 21), according to
-      // http://developer.android.com/reference/android/media/MediaFormat.html
-      return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
-#else
-      return true;
-#endif  // defined(OS_ANDROID)
-#else
-      return false;
-#endif  // BUILDFLAG(ENABLE_HEVC_DEMUXING)
-
-    case VP8:
-      // If clear, the unified pipeline can always decode VP8 in software.
-      if (!is_encrypted)
-        return true;
-
-      if (is_encrypted)
-        return platform_info.has_platform_vp8_decoder;
-
-      // MediaPlayer can always play VP8. Note: This is incorrect for MSE, but
-      // MSE does not use this code. http://crbug.com/587303.
-      return true;
-
-    case VP9: {
-      if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-              switches::kReportVp9AsAnUnsupportedMimeType)) {
-        return false;
-      }
-
-      // If clear, the unified pipeline can always decode VP9 in software.
-      if (!is_encrypted)
-        return true;
-
-      if (!platform_info.has_platform_vp9_decoder)
-        return false;
-
-      // Encrypted content is demuxed so the container is irrelevant.
-      if (is_encrypted)
-        return true;
-
-      // MediaPlayer only supports VP9 in WebM.
-      return mime_type_lower_case == "video/webm";
-    }
-
-    case DOLBY_VISION:
-      // This function is only called on Android which doesn't support Dolby
-      // Vision.
-      return false;
-
-    case AC3:
-    case EAC3:
-#if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
-      return true;
-#else
-      return false;
-#endif
-  }
-
-  return false;
-}
-
 // Make a default ParsedCodecResult. Values should indicate "unspecified"
 // where possible. Color space is an exception where we choose a default value
 // because most codec strings will not describe a color space.
@@ -990,15 +857,6 @@
       return IsNotSupported;
   }
 
-#if defined(OS_ANDROID)
-  // TODO(chcunningham): Delete this. Android platform support should be
-  // handled by (android specific) media::IsSupportedVideoConfig() above.
-  if (!IsCodecSupportedOnAndroid(codec, mime_type_lower_case, is_encrypted,
-                                 platform_info_)) {
-    return IsNotSupported;
-  }
-#endif
-
   return ambiguous_platform_support ? MayBeSupported : IsSupported;
 }