summaryrefslogtreecommitdiffstats
path: root/media/mojo
diff options
context:
space:
mode:
authorsandersd <sandersd@chromium.org>2016-03-14 12:39:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-14 19:40:58 +0000
commit0c2f582f1c68259ea17d2e95141fa0452ca7ceb4 (patch)
tree241c23294d3076147ebc5b519eb0af14aa6dac7d /media/mojo
parent58c2b3a90b634d71ccc8de68417789f21a59a6eb (diff)
downloadchromium_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.cc5
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() {