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

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

Issue 2115603002: Use FFmpegVideoDecoder from a UtilityProcess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build error on win Created 4 years 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
OLDNEW
(Empty)
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
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
12 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
13 #include "media/filters/ffmpeg_video_decoder.h"
14 #endif
15
16 namespace media {
17
18 UtilityMojoMediaClient::UtilityMojoMediaClient() {}
19
20 UtilityMojoMediaClient::~UtilityMojoMediaClient() {}
21
22 void UtilityMojoMediaClient::Initialize() {
23 InitializeMediaLibrary();
24 }
25
26 std::unique_ptr<VideoDecoder> UtilityMojoMediaClient::CreateVideoDecoder(
27 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
28 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
29 std::unique_ptr<FFmpegVideoDecoder> decoder(new FFmpegVideoDecoder());
30 std::unique_ptr<VideoFramePoolDelegate> delegate(
31 new MojoVideoFramePoolDelegate());
32 decoder->SetVideoFramePoolDelegate(std::move(delegate));
33 return std::move(decoder);
34 #else
35 return nullptr;
36 #endif
37 }
38
39 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698