OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ |
6 #define MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ | 6 #define MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ |
7 | 7 |
8 #include "media/base/android/media_codec_bridge.h" | 8 #include "media/base/android/media_codec_bridge.h" |
| 9 #include "media/base/android/test_destruction_observable.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 | 12 |
12 namespace media { | 13 namespace media { |
13 | 14 |
14 class MockMediaCodecBridge : public MediaCodecBridge { | 15 class MockMediaCodecBridge : public MediaCodecBridge, |
| 16 public DestructionObservable { |
15 public: | 17 public: |
16 MockMediaCodecBridge(); | 18 MockMediaCodecBridge(); |
17 ~MockMediaCodecBridge() override; | 19 ~MockMediaCodecBridge() override; |
18 MOCK_METHOD0(Stop, void()); | 20 MOCK_METHOD0(Stop, void()); |
19 MOCK_METHOD0(Flush, MediaCodecStatus()); | 21 MOCK_METHOD0(Flush, MediaCodecStatus()); |
20 MOCK_METHOD1(GetOutputSize, MediaCodecStatus(gfx::Size* size)); | 22 MOCK_METHOD1(GetOutputSize, MediaCodecStatus(gfx::Size* size)); |
21 MOCK_METHOD1(GetOutputSamplingRate, MediaCodecStatus(int* sampling_rate)); | 23 MOCK_METHOD1(GetOutputSamplingRate, MediaCodecStatus(int* sampling_rate)); |
22 MOCK_METHOD1(GetOutputChannelCount, MediaCodecStatus(int* channel_count)); | 24 MOCK_METHOD1(GetOutputChannelCount, MediaCodecStatus(int* channel_count)); |
23 MOCK_METHOD4(QueueInputBuffer, | 25 MOCK_METHOD4(QueueInputBuffer, |
24 MediaCodecStatus(int index, | 26 MediaCodecStatus(int index, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 MOCK_METHOD0(GetName, std::string()); | 58 MOCK_METHOD0(GetName, std::string()); |
57 MOCK_METHOD1(SetSurface, bool(jobject surface)); | 59 MOCK_METHOD1(SetSurface, bool(jobject surface)); |
58 MOCK_METHOD2(SetVideoBitrate, void(int bps, int frame_rate)); | 60 MOCK_METHOD2(SetVideoBitrate, void(int bps, int frame_rate)); |
59 MOCK_METHOD0(RequestKeyFrameSoon, void()); | 61 MOCK_METHOD0(RequestKeyFrameSoon, void()); |
60 MOCK_METHOD0(IsAdaptivePlaybackSupported, bool()); | 62 MOCK_METHOD0(IsAdaptivePlaybackSupported, bool()); |
61 }; | 63 }; |
62 | 64 |
63 } // namespace media | 65 } // namespace media |
64 | 66 |
65 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ | 67 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ |
OLD | NEW |