| Index: media/cast/test/fake_gpu_video_accelerator_factories.h
|
| diff --git a/media/cast/test/fake_gpu_video_accelerator_factories.h b/media/cast/test/fake_gpu_video_accelerator_factories.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..298e1509fb370f093204db26ca96712d597134f2
|
| --- /dev/null
|
| +++ b/media/cast/test/fake_gpu_video_accelerator_factories.h
|
| @@ -0,0 +1,67 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef MEDIA_CAST_TEST_FAKE_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
|
| +#define MEDIA_CAST_TEST_FAKE_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
|
| +
|
| +#include "media/filters/gpu_video_accelerator_factories.h"
|
| +
|
| +#include "base/message_loop/message_loop.h"
|
| +#include "media/cast/test/fake_task_runner.h"
|
| +
|
| +namespace media {
|
| +namespace cast {
|
| +namespace test {
|
| +
|
| +class FakeGpuVideoAcceleratorFactories : public GpuVideoAcceleratorFactories {
|
| + public:
|
| + explicit FakeGpuVideoAcceleratorFactories(
|
| + const scoped_refptr<base::TaskRunner>& fake_task_runner);
|
| +
|
| + virtual scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator(
|
| + VideoEncodeAccelerator::Client* client) OVERRIDE;
|
| +
|
| + virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE;
|
| +
|
| + virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() OVERRIDE;
|
| +
|
| + //
|
| + // The following functions are no-op.
|
| + //
|
| + virtual uint32 CreateTextures(int32 count,
|
| + const gfx::Size& size,
|
| + std::vector<uint32>* texture_ids,
|
| + std::vector<gpu::Mailbox>* texture_mailboxes,
|
| + uint32 texture_target) { return 0; }
|
| +
|
| + virtual void DeleteTexture(uint32 texture_id) {}
|
| +
|
| + virtual void WaitSyncPoint(uint32 sync_point) {}
|
| +
|
| + virtual void ReadPixels(uint32 texture_id,
|
| + const gfx::Size& size,
|
| + const SkBitmap& pixels) OVERRIDE {};
|
| +
|
| + virtual scoped_ptr<VideoDecodeAccelerator> CreateVideoDecodeAccelerator(
|
| + VideoCodecProfile profile,
|
| + VideoDecodeAccelerator::Client* client) OVERRIDE {
|
| + return scoped_ptr<VideoDecodeAccelerator>(
|
| + static_cast<media::VideoDecodeAccelerator*>(NULL));
|
| + }
|
| +
|
| + virtual void Abort() OVERRIDE {}
|
| +
|
| + virtual bool IsAborted() OVERRIDE { return false; }
|
| +
|
| + private:
|
| + const scoped_refptr<base::TaskRunner> fake_task_runner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FakeGpuVideoAcceleratorFactories);
|
| +};
|
| +
|
| +} // namespace test
|
| +} // namespace cast
|
| +} // namespace media
|
| +
|
| +#endif // MEDIA_CAST_TEST_FAKE_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
|
|
|