diff options
author | sandersd <sandersd@chromium.org> | 2016-03-14 12:39:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-14 19:40:58 +0000 |
commit | 0c2f582f1c68259ea17d2e95141fa0452ca7ceb4 (patch) | |
tree | 241c23294d3076147ebc5b519eb0af14aa6dac7d /media/mojo | |
parent | 58c2b3a90b634d71ccc8de68417789f21a59a6eb (diff) | |
download | chromium_src-0c2f582f1c68259ea17d2e95141fa0452ca7ceb4.zip chromium_src-0c2f582f1c68259ea17d2e95141fa0452ca7ceb4.tar.gz chromium_src-0c2f582f1c68259ea17d2e95141fa0452ca7ceb4.tar.bz2 |
Request a GpuVideoAcceleratorFactories when constructing decoders.
This simple change allows us to continue to create working hardware
decoders after a context lost while playback is suspended. (Which is
of particular interest because this can happen while backgrounded on
Android.)
Details: Instead of passing a GpuVideoAcceleratorFactories to the
DefaultRendererFactory, and thus always using the same one for a given
media player instance, pass a getter callback instead. Now
DefaultRendererFactory can get the latest GpuVideoAcceleratorFactories
instance each time a VideoDecoder is constructed.
BUG=580386
Review URL: https://codereview.chromium.org/1784173005
Cr-Commit-Position: refs/heads/master@{#381044}
Diffstat (limited to 'media/mojo')
-rw-r--r-- | media/mojo/services/test_mojo_media_client.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/mojo/services/test_mojo_media_client.cc b/media/mojo/services/test_mojo_media_client.cc index 994bc7e..283f248 100644 --- a/media/mojo/services/test_mojo_media_client.cc +++ b/media/mojo/services/test_mojo_media_client.cc @@ -40,8 +40,9 @@ void TestMojoMediaClient::Initialize() { scoped_ptr<RendererFactory> TestMojoMediaClient::CreateRendererFactory( const scoped_refptr<MediaLog>& media_log) { DVLOG(1) << __FUNCTION__; - return make_scoped_ptr(new DefaultRendererFactory(media_log, nullptr, nullptr, - *audio_hardware_config_)); + return make_scoped_ptr(new DefaultRendererFactory( + media_log, nullptr, DefaultRendererFactory::GetGpuFactoriesCB(), + *audio_hardware_config_)); } AudioRendererSink* TestMojoMediaClient::CreateAudioRendererSink() { |