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

Unified Diff: media/cast/test/fake_gpu_video_accelerator_factories.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/cast_sender_impl.cc ('k') | media/cast/test/fake_gpu_video_accelerator_factories.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e668614b7e572a8c1767175da3c584a63065e2ce
--- /dev/null
+++ b/media/cast/test/fake_gpu_video_accelerator_factories.h
@@ -0,0 +1,66 @@
+// 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::SingleThreadTaskRunner> GetTaskRunner() 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) OVERRIDE;
+
+ virtual void DeleteTexture(uint32 texture_id) OVERRIDE {}
+
+ virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE {}
+
+ 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;
+
+ virtual void Abort() OVERRIDE {}
+
+ virtual bool IsAborted() OVERRIDE;
+
+ private:
+ friend class base::RefCountedThreadSafe<FakeGpuVideoAcceleratorFactories>;
+ virtual ~FakeGpuVideoAcceleratorFactories();
+
+ 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_
« no previous file with comments | « media/cast/cast_sender_impl.cc ('k') | media/cast/test/fake_gpu_video_accelerator_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698