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

Unified Diff: media/cast/test/fake_video_encode_accelerator.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_video_encode_accelerator.h
diff --git a/media/cast/test/fake_video_encode_accelerator.h b/media/cast/test/fake_video_encode_accelerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..545f97bd64112008b428b11c6f548737a4feddab
--- /dev/null
+++ b/media/cast/test/fake_video_encode_accelerator.h
@@ -0,0 +1,52 @@
+// 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_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
+#define MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
+
+#include "media/video/video_encode_accelerator.h"
+
+#include <list>
+
+#include "media/base/bitstream_buffer.h"
+
+namespace media {
+namespace cast {
+namespace test {
+
+class FakeVideoEncodeAccelerator : public VideoEncodeAccelerator {
+ public:
+ explicit FakeVideoEncodeAccelerator(VideoEncodeAccelerator::Client* client);
+
+ virtual void Initialize(media::VideoFrame::Format input_format,
+ const gfx::Size& input_visible_size,
+ VideoCodecProfile output_profile,
+ uint32 initial_bitrate) OVERRIDE;
+
+ virtual void Encode(const scoped_refptr<VideoFrame>& frame,
+ bool force_keyframe) OVERRIDE;
+
+ virtual void UseOutputBitstreamBuffer(const BitstreamBuffer& buffer) OVERRIDE;
+
+ virtual void RequestEncodingParametersChange(uint32 bitrate,
+ uint32 framerate) OVERRIDE;
+
+ virtual void Destroy() OVERRIDE;
+
+ private:
+ virtual ~FakeVideoEncodeAccelerator();
+
+ VideoEncodeAccelerator::Client* client_;
+ bool first_;
+
+ std::list<int32> available_buffer_ids_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator);
+};
+
+} // namespace test
+} // namespace cast
+} // namespace media
+
+#endif // MEDIA_CAST_TEST_FAKE_MOCK_VIDEO_ENCODE_ACCELERATOR_H_

Powered by Google App Engine
This is Rietveld 408576698