Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: media/mojo/services/mojo_decoder_factory.cc

Issue 1899363002: Finish plumbing MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows needs some more headers, apaprently. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/mojo/services/mojo_decoder_factory.h ('k') | media/mojo/services/mojo_media_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/mojo/services/mojo_decoder_factory.h" 5 #include "media/mojo/services/mojo_decoder_factory.h"
6 6
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "media/mojo/interfaces/audio_decoder.mojom.h" 8 #include "media/mojo/interfaces/audio_decoder.mojom.h"
9 #include "media/mojo/services/mojo_audio_decoder.h" 9 #include "media/mojo/services/mojo_audio_decoder.h"
10 #include "media/mojo/services/mojo_video_decoder.h" 10 #include "media/mojo/services/mojo_video_decoder.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void MojoDecoderFactory::CreateAudioDecoders( 23 void MojoDecoderFactory::CreateAudioDecoders(
24 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 24 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
25 ScopedVector<AudioDecoder>* audio_decoders) { 25 ScopedVector<AudioDecoder>* audio_decoders) {
26 #if defined(ENABLE_MOJO_AUDIO_DECODER) 26 #if defined(ENABLE_MOJO_AUDIO_DECODER)
27 mojom::AudioDecoderPtr audio_decoder_ptr; 27 mojom::AudioDecoderPtr audio_decoder_ptr;
28 shell::GetInterface<mojom::AudioDecoder>(interface_provider_, 28 shell::GetInterface<mojom::AudioDecoder>(interface_provider_,
29 &audio_decoder_ptr); 29 &audio_decoder_ptr);
30 30
31 audio_decoders->push_back( 31 audio_decoders->push_back(
32 new media::MojoAudioDecoder(task_runner, std::move(audio_decoder_ptr))); 32 new MojoAudioDecoder(task_runner, std::move(audio_decoder_ptr)));
33 #endif 33 #endif
34 } 34 }
35 35
36 void MojoDecoderFactory::CreateVideoDecoders( 36 void MojoDecoderFactory::CreateVideoDecoders(
37 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 37 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
38 GpuVideoAcceleratorFactories* gpu_factories,
38 ScopedVector<VideoDecoder>* video_decoders) { 39 ScopedVector<VideoDecoder>* video_decoders) {
39 #if defined(ENABLE_MOJO_VIDEO_DECODER) 40 #if defined(ENABLE_MOJO_VIDEO_DECODER)
40 // TODO(sandersd): Connect to mojo video decoder service and pass it here. 41 mojom::VideoDecoderPtr remote_decoder;
41 video_decoders->push_back(new media::MojoVideoDecoder()); 42 shell::GetInterface<mojom::VideoDecoder>(interface_provider_,
43 &remote_decoder);
44 video_decoders->push_back(new MojoVideoDecoder(task_runner, gpu_factories,
45 std::move(remote_decoder)));
42 #endif 46 #endif
43 } 47 }
44 48
45 } // namespace media 49 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_decoder_factory.h ('k') | media/mojo/services/mojo_media_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698