diff options
author | xhwang <xhwang@chromium.org> | 2016-03-25 12:32:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 19:38:38 +0000 |
commit | 92d0fffc36695c099005bf05862145a89d918f28 (patch) | |
tree | 1ccb47b9880f2ccc3bf260be51e3e4db72d30a8b /media | |
parent | 0c5d30d1932954a34d417bf1f195ac1428d5aeed (diff) | |
download | chromium_src-92d0fffc36695c099005bf05862145a89d918f28.zip chromium_src-92d0fffc36695c099005bf05862145a89d918f28.tar.gz chromium_src-92d0fffc36695c099005bf05862145a89d918f28.tar.bz2 |
media: Enable Unified Media Pipeline for MSE and EME on Android
Enables Mojo Media on Android to support EME in the unified media
pipeline. This introduces MojoCdm, MojoAudioDecoder and encrytped
stream support in AndroidVideoDecodeAccelerator.
This CL also enables MSE in the unified media pipeline. The fallback
logic for MSE (IsUnifiedMediaPipelineEnabledForMse()) is removed.
Also partially reverts f92f4e5c849c028db73fbe06912685a77b978ee4 which
added "LoadType" in createMediaPlayer() to implement the fallback
logic for MSE.
BUG=455905,521731
TEST=Encrypted audio/video plays in default Chrome for Android build
with and without unified media pipeline.
Review URL: https://codereview.chromium.org/1825763002
Cr-Commit-Position: refs/heads/master@{#383331}
Diffstat (limited to 'media')
-rw-r--r-- | media/base/media.cc | 9 | ||||
-rw-r--r-- | media/base/media.h | 6 | ||||
-rw-r--r-- | media/filters/stream_parser_factory.cc | 8 | ||||
-rw-r--r-- | media/media_options.gni | 2 |
4 files changed, 5 insertions, 20 deletions
diff --git a/media/base/media.cc b/media/base/media.cc index b2e1c45..954fb19 100644 --- a/media/base/media.cc +++ b/media/base/media.cc @@ -107,15 +107,6 @@ bool IsUnifiedMediaPipelineEnabled() { base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE); } -bool IsUnifiedMediaPipelineEnabledForMse() { - // Don't check IsUnifiedMediaPipelineEnabled() here since we don't want MSE to - // be enabled via experiment yet; only when the existing implementation can't - // be used (i.e. MediaCodec unavailable). - return base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableUnifiedMediaPipeline) || - !MediaCodecUtil::IsMediaCodecAvailable(); -} - bool ArePlatformDecodersAvailable() { return IsUnifiedMediaPipelineEnabled() ? HasPlatformDecoderSupport() diff --git a/media/base/media.h b/media/base/media.h index b6cccc4..ca5a8175 100644 --- a/media/base/media.h +++ b/media/base/media.h @@ -41,12 +41,6 @@ MEDIA_EXPORT bool PlatformHasVp9Support(); // unified media pipeline is supported everywhere. http://crbug.com/580626. MEDIA_EXPORT bool IsUnifiedMediaPipelineEnabled(); -// Similar to IsUnifiedMediaPipelineEnabled() but will also return true if -// MediaCodec is not available (allowing the unified pipeline to take over for -// cases where existing pipeline has no support). As above, codecs requiring -// platform support may not be available. -MEDIA_EXPORT bool IsUnifiedMediaPipelineEnabledForMse(); - // Returns whether the platform decoders are available for use. // This includes decoders being available on the platform and accessible, such // as via the GPU process. Should only be used for actual decoders diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc index 92ccbf4..0247098 100644 --- a/media/filters/stream_parser_factory.cc +++ b/media/filters/stream_parser_factory.cc @@ -334,7 +334,7 @@ static bool VerifyCodec( // TODO(wolenetz, dalecurtis): This should instead use MimeUtil() to avoid // duplication of subtle Android behavior. http://crbug.com/587303. if (codec_info->tag == CodecInfo::HISTOGRAM_H264) { - if (media::IsUnifiedMediaPipelineEnabledForMse() && + if (media::IsUnifiedMediaPipelineEnabled() && !media::HasPlatformDecoderSupport()) { return false; } @@ -344,17 +344,17 @@ static bool VerifyCodec( } if (codec_info->tag == CodecInfo::HISTOGRAM_VP8 && !media::MediaCodecUtil::IsVp8DecoderAvailable() && - !media::IsUnifiedMediaPipelineEnabledForMse()) { + !media::IsUnifiedMediaPipelineEnabled()) { return false; } if (codec_info->tag == CodecInfo::HISTOGRAM_VP9 && !media::PlatformHasVp9Support() && - !media::IsUnifiedMediaPipelineEnabledForMse()) { + !media::IsUnifiedMediaPipelineEnabled()) { return false; } if (codec_info->tag == CodecInfo::HISTOGRAM_OPUS && !media::PlatformHasOpusSupport() && - !media::IsUnifiedMediaPipelineEnabledForMse()) { + !media::IsUnifiedMediaPipelineEnabled()) { return false; } #endif diff --git a/media/media_options.gni b/media/media_options.gni index cedcdf7..0390f21 100644 --- a/media/media_options.gni +++ b/media/media_options.gni @@ -72,7 +72,7 @@ declare_args() { # |mojo_media_services|). When enabled, selected mojo paths will be enabled in # the media pipeline and corresponding services will hosted in the selected # remote process (e.g. "utility" process, see |mojo_media_host|). - enable_mojo_media = false + enable_mojo_media = is_android # Enable the TestMojoMediaClient to be used in MojoMediaApplication. This is # for testing only and will override the default platform MojoMediaClient. |