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

Side by Side Diff: media/base/android/mock_media_codec_bridge.h

Issue 2697643003: media: Clean up MediaCodecBridge and remove subclasses (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « media/base/android/media_codec_util.cc ('k') | media/base/android/mock_media_codec_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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; 17 ~MockMediaCodecBridge() override;
18
19 MOCK_METHOD0(Start, bool());
20 MOCK_METHOD0(Stop, void()); 18 MOCK_METHOD0(Stop, void());
21 MOCK_METHOD0(Flush, MediaCodecStatus()); 19 MOCK_METHOD0(Flush, MediaCodecStatus());
22 MOCK_METHOD1(GetOutputSize, MediaCodecStatus(gfx::Size* size)); 20 MOCK_METHOD1(GetOutputSize, MediaCodecStatus(gfx::Size* size));
23 MOCK_METHOD1(GetOutputSamplingRate, MediaCodecStatus(int* sampling_rate)); 21 MOCK_METHOD1(GetOutputSamplingRate, MediaCodecStatus(int* sampling_rate));
24 MOCK_METHOD1(GetOutputChannelCount, MediaCodecStatus(int* channel_count)); 22 MOCK_METHOD1(GetOutputChannelCount, MediaCodecStatus(int* channel_count));
25 MOCK_METHOD4(QueueInputBuffer, 23 MOCK_METHOD4(QueueInputBuffer,
26 MediaCodecStatus(int index, 24 MediaCodecStatus(int index,
27 const uint8_t* data, 25 const uint8_t* data,
28 size_t data_size, 26 size_t data_size,
29 base::TimeDelta presentation_time)); 27 base::TimeDelta presentation_time));
(...skipping 19 matching lines...) Expand all
49 bool* key_frame)); 47 bool* key_frame));
50 MOCK_METHOD2(ReleaseOutputBuffer, void(int index, bool render)); 48 MOCK_METHOD2(ReleaseOutputBuffer, void(int index, bool render));
51 MOCK_METHOD3(GetInputBuffer, 49 MOCK_METHOD3(GetInputBuffer,
52 MediaCodecStatus(int input_buffer_index, 50 MediaCodecStatus(int input_buffer_index,
53 uint8_t** data, 51 uint8_t** data,
54 size_t* capacity)); 52 size_t* capacity));
55 MOCK_METHOD4( 53 MOCK_METHOD4(
56 CopyFromOutputBuffer, 54 CopyFromOutputBuffer,
57 MediaCodecStatus(int index, size_t offset, void* dst, size_t num)); 55 MediaCodecStatus(int index, size_t offset, void* dst, size_t num));
58 MOCK_METHOD0(GetName, std::string()); 56 MOCK_METHOD0(GetName, std::string());
57 MOCK_METHOD1(SetSurface, bool(jobject surface));
58 MOCK_METHOD2(SetVideoBitrate, void(int bps, int frame_rate));
59 MOCK_METHOD0(RequestKeyFrameSoon, void());
60 MOCK_METHOD0(IsAdaptivePlaybackSupported, bool());
59 }; 61 };
60 62
61 } // namespace media 63 } // namespace media
62 64
63 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_ 65 #endif // MEDIA_BASE_ANDROID_MOCK_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/media_codec_util.cc ('k') | media/base/android/mock_media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698