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

Side by Side Diff: media/cast/test/fake_gpu_video_accelerator_factories.cc

Issue 116623002: Cast: Adding support for GPU accelerated encode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge nits Created 6 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2013 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/cast/test/fake_gpu_video_accelerator_factories.h"
6
7 #include "base/logging.h"
8 #include "media/cast/test/fake_video_encode_accelerator.h"
9
10 namespace media {
11 namespace cast {
12 namespace test {
13
14 FakeGpuVideoAcceleratorFactories::FakeGpuVideoAcceleratorFactories(
15 const scoped_refptr<base::TaskRunner>& fake_task_runner)
16 : fake_task_runner_(fake_task_runner) {
17 }
18
19 FakeGpuVideoAcceleratorFactories::~FakeGpuVideoAcceleratorFactories() {
20 }
21
22 scoped_ptr<VideoEncodeAccelerator>
23 FakeGpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator(
24 VideoEncodeAccelerator::Client* client) {
25 return scoped_ptr<VideoEncodeAccelerator>(
26 new FakeVideoEncodeAccelerator(client));
27 }
28
29 base::SharedMemory* FakeGpuVideoAcceleratorFactories::CreateSharedMemory(
30 size_t size) {
31 base::SharedMemory* shm = new base::SharedMemory();
32 if (!shm->CreateAndMapAnonymous(size)) {
33 NOTREACHED();
34 }
35 return shm;
36 }
37
38 scoped_refptr<base::SingleThreadTaskRunner>
39 FakeGpuVideoAcceleratorFactories::GetTaskRunner() {
40 return scoped_refptr<base::SingleThreadTaskRunner>(
41 static_cast<base::SingleThreadTaskRunner*>(fake_task_runner_.get()));
42 }
43
44 uint32 FakeGpuVideoAcceleratorFactories::CreateTextures(
45 int32 count,
46 const gfx::Size& size,
47 std::vector<uint32>* texture_ids,
48 std::vector<gpu::Mailbox>* texture_mailboxes,
49 uint32 texture_target) {
50 return 0;
51 }
52
53 scoped_ptr<VideoDecodeAccelerator>
54 FakeGpuVideoAcceleratorFactories::CreateVideoDecodeAccelerator(
55 VideoCodecProfile profile,
56 VideoDecodeAccelerator::Client* client) {
57 return scoped_ptr<VideoDecodeAccelerator>(
58 static_cast<media::VideoDecodeAccelerator*>(NULL));
59 }
60
61 bool FakeGpuVideoAcceleratorFactories::IsAborted() {
62 return false;
63 }
64
65 } // namespace test
66 } // namespace cast
67 } // namespace media
68
OLDNEW
« no previous file with comments | « media/cast/test/fake_gpu_video_accelerator_factories.h ('k') | media/cast/test/fake_video_encode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698