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

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: Removed dependency on content Created 7 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 side-by-side diff with in-line comments
Download patch
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_
mikhal1 2013/12/17 22:39:47 missing new line
pwestin 2013/12/19 16:03:47 Done.

Powered by Google App Engine
This is Rietveld 408576698