OLD | NEW |
---|---|
(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 #ifndef MEDIA_CAST_TEST_FAKE_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | |
6 #define MEDIA_CAST_TEST_FAKE_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | |
7 | |
8 #include "media/filters/gpu_video_accelerator_factories.h" | |
9 | |
10 #include "base/message_loop/message_loop.h" | |
11 #include "media/cast/test/fake_task_runner.h" | |
12 | |
13 namespace media { | |
14 namespace cast { | |
15 namespace test { | |
16 | |
17 class FakeGpuVideoAcceleratorFactories : public GpuVideoAcceleratorFactories { | |
18 public: | |
19 explicit FakeGpuVideoAcceleratorFactories( | |
20 const scoped_refptr<base::TaskRunner>& fake_task_runner); | |
21 | |
22 virtual scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator( | |
23 VideoEncodeAccelerator::Client* client) OVERRIDE; | |
24 | |
25 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE; | |
26 | |
27 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() OVERRIDE; | |
28 | |
29 // | |
30 // The following functions are no-op. | |
31 // | |
32 virtual uint32 CreateTextures(int32 count, | |
33 const gfx::Size& size, | |
34 std::vector<uint32>* texture_ids, | |
35 std::vector<gpu::Mailbox>* texture_mailboxes, | |
36 uint32 texture_target) { return 0; } | |
37 | |
38 virtual void DeleteTexture(uint32 texture_id) {} | |
39 | |
40 virtual void WaitSyncPoint(uint32 sync_point) {} | |
41 | |
42 virtual void ReadPixels(uint32 texture_id, | |
43 const gfx::Size& size, | |
44 const SkBitmap& pixels) OVERRIDE {}; | |
45 | |
46 virtual scoped_ptr<VideoDecodeAccelerator> CreateVideoDecodeAccelerator( | |
47 VideoCodecProfile profile, | |
48 VideoDecodeAccelerator::Client* client) OVERRIDE { | |
49 return scoped_ptr<VideoDecodeAccelerator>( | |
50 static_cast<media::VideoDecodeAccelerator*>(NULL)); | |
51 } | |
52 | |
53 virtual void Abort() OVERRIDE {} | |
54 | |
55 virtual bool IsAborted() OVERRIDE { return false; } | |
56 | |
57 private: | |
58 const scoped_refptr<base::TaskRunner> fake_task_runner_; | |
59 | |
60 DISALLOW_COPY_AND_ASSIGN(FakeGpuVideoAcceleratorFactories); | |
61 }; | |
62 | |
63 } // namespace test | |
64 } // namespace cast | |
65 } // namespace media | |
66 | |
67 #endif // MEDIA_CAST_TEST_FAKE_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | |
mikhal1
2013/12/17 22:39:47
missing new line
pwestin
2013/12/19 16:03:47
Done.
| |
OLD | NEW |