| 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 "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 class MockMediaCodecBridge : public MediaCodecBridge { | 14 class MockMediaCodecBridge : public MediaCodecBridge { |
| 15 public: | 15 public: |
| 16 MockMediaCodecBridge(); | 16 MockMediaCodecBridge(); |
| 17 ~MockMediaCodecBridge() override; | |
| 18 | |
| 19 MOCK_METHOD0(Start, bool()); | |
| 20 MOCK_METHOD0(Stop, void()); | 17 MOCK_METHOD0(Stop, void()); |
| 21 MOCK_METHOD0(Flush, MediaCodecStatus()); | 18 MOCK_METHOD0(Flush, MediaCodecStatus()); |
| 22 MOCK_METHOD1(GetOutputSize, MediaCodecStatus(gfx::Size* size)); | 19 MOCK_METHOD1(GetOutputSize, MediaCodecStatus(gfx::Size* size)); |
| 23 MOCK_METHOD1(GetOutputSamplingRate, MediaCodecStatus(int* sampling_rate)); | 20 MOCK_METHOD1(GetOutputSamplingRate, MediaCodecStatus(int* sampling_rate)); |
| 24 MOCK_METHOD1(GetOutputChannelCount, MediaCodecStatus(int* channel_count)); | 21 MOCK_METHOD1(GetOutputChannelCount, MediaCodecStatus(int* channel_count)); |
| 25 MOCK_METHOD4(QueueInputBuffer, | 22 MOCK_METHOD4(QueueInputBuffer, |
| 26 MediaCodecStatus(int index, | 23 MediaCodecStatus(int index, |
| 27 const uint8_t* data, | 24 const uint8_t* data, |
| 28 size_t data_size, | 25 size_t data_size, |
| 29 base::TimeDelta presentation_time)); | 26 base::TimeDelta presentation_time)); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 49 bool* key_frame)); | 46 bool* key_frame)); |
| 50 MOCK_METHOD2(ReleaseOutputBuffer, void(int index, bool render)); | 47 MOCK_METHOD2(ReleaseOutputBuffer, void(int index, bool render)); |
| 51 MOCK_METHOD3(GetInputBuffer, | 48 MOCK_METHOD3(GetInputBuffer, |
| 52 MediaCodecStatus(int input_buffer_index, | 49 MediaCodecStatus(int input_buffer_index, |
| 53 uint8_t** data, | 50 uint8_t** data, |
| 54 size_t* capacity)); | 51 size_t* capacity)); |
| 55 MOCK_METHOD4( | 52 MOCK_METHOD4( |
| 56 CopyFromOutputBuffer, | 53 CopyFromOutputBuffer, |
| 57 MediaCodecStatus(int index, size_t offset, void* dst, size_t num)); | 54 MediaCodecStatus(int index, size_t offset, void* dst, size_t num)); |
| 58 MOCK_METHOD0(GetName, std::string()); | 55 MOCK_METHOD0(GetName, std::string()); |
| 56 MOCK_METHOD1(SetSurface, bool(jobject surface)); |
| 57 MOCK_METHOD2(SetVideoBitrate, void(int bps, int frame_rate)); |
| 58 MOCK_METHOD0(RequestKeyFrameSoon, void()); |
| 59 MOCK_METHOD0(IsAdaptivePlaybackSupported, bool()); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace media | 62 } // namespace media |
| 62 | 63 |
| 63 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ | 64 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ |
| OLD | NEW |