| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "media/mojo/services/utility_mojo_media_client.h" |
| 6 |
| 7 #include "base/threading/thread_task_runner_handle.h" |
| 8 #include "media/base/media.h" |
| 9 #include "media/base/video_decoder.h" |
| 10 #include "media/mojo/common/mojo_shared_buffer_video_frame.h" |
| 11 #include "media/mojo/common/mojo_video_frame_provider.h" |
| 12 |
| 13 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS) |
| 14 #include "media/filters/ffmpeg_video_decoder.h" |
| 15 #endif |
| 16 |
| 17 namespace media { |
| 18 |
| 19 UtilityMojoMediaClient::UtilityMojoMediaClient() {} |
| 20 |
| 21 UtilityMojoMediaClient::~UtilityMojoMediaClient() {} |
| 22 |
| 23 void UtilityMojoMediaClient::Initialize(service_manager::Connector* connector) { |
| 24 InitializeMediaLibrary(); |
| 25 } |
| 26 |
| 27 std::unique_ptr<VideoDecoder> UtilityMojoMediaClient::CreateVideoDecoder( |
| 28 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 29 mojom::CommandBufferIdPtr command_buffer_id) { |
| 30 std::unique_ptr<VideoDecoder> decoder; |
| 31 |
| 32 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS) |
| 33 std::unique_ptr<MojoVideoFrameProvider> video_frame_provider( |
| 34 new MojoVideoFrameProvider()); |
| 35 decoder.reset(new FFmpegVideoDecoder(std::move(video_frame_provider))); |
| 36 #endif |
| 37 |
| 38 return decoder; |
| 39 } |
| 40 |
| 41 } // namespace media |
| OLD | NEW |