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

Unified Diff: media/video/mock_video_encode_accelerator.h

Issue 2182183007: Handle scaling frames in RTCVideoEncoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: posciak@ comments. Created 4 years, 4 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
Index: media/video/mock_video_encode_accelerator.h
diff --git a/media/video/mock_video_encode_accelerator.h b/media/video/mock_video_encode_accelerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..89c928612b942cf405f030ce0882651b9fc40f46
--- /dev/null
+++ b/media/video/mock_video_encode_accelerator.h
@@ -0,0 +1,43 @@
+// Copyright 2016 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_VIDEO_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
+#define MEDIA_VIDEO_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
+
+#include "media/video/video_encode_accelerator.h"
+
+#include "base/macros.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace media {
+
+class MockVideoEncodeAccelerator : public VideoEncodeAccelerator {
+ public:
+ MockVideoEncodeAccelerator();
+ virtual ~MockVideoEncodeAccelerator();
+
+ MOCK_METHOD0(GetSupportedProfiles,
+ VideoEncodeAccelerator::SupportedProfiles());
+ MOCK_METHOD5(Initialize,
+ bool(VideoPixelFormat input_format,
+ const gfx::Size& input_visible_size,
+ VideoCodecProfile output_profile,
+ uint32_t initial_bitrate,
+ VideoEncodeAccelerator::Client* client));
+ MOCK_METHOD2(Encode,
+ void(const scoped_refptr<VideoFrame>& frame,
+ bool force_keyframe));
+ MOCK_METHOD1(UseOutputBitstreamBuffer, void(const BitstreamBuffer& buffer));
+ MOCK_METHOD2(RequestEncodingParametersChange,
+ void(uint32_t bitrate, uint32_t framerate));
+ MOCK_METHOD0(Destroy, void());
+
+ private:
+ void DeleteThis();
+ DISALLOW_COPY_AND_ASSIGN(MockVideoEncodeAccelerator);
+};
+
+} // namespace media
+
+#endif // MEDIA_VIDEO_MOCK_VIDEO_ENCODE_ACCELERATOR_H_
« no previous file with comments | « media/renderers/mock_gpu_video_accelerator_factories.cc ('k') | media/video/mock_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698