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

Side by Side Diff: test/mock_voice_engine.h

Issue 3016543002: Remove VoENetwork (Closed)
Patch Set: rebase Created 3 years, 2 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 | « no previous file | voice_engine/BUILD.gn » ('j') | voice_engine/channel.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 MOCK_METHOD0(Terminate, int()); 106 MOCK_METHOD0(Terminate, int());
107 MOCK_METHOD0(CreateChannel, int()); 107 MOCK_METHOD0(CreateChannel, int());
108 MOCK_METHOD1(CreateChannel, int(const ChannelConfig& config)); 108 MOCK_METHOD1(CreateChannel, int(const ChannelConfig& config));
109 MOCK_METHOD1(DeleteChannel, int(int channel)); 109 MOCK_METHOD1(DeleteChannel, int(int channel));
110 MOCK_METHOD1(StartPlayout, int(int channel)); 110 MOCK_METHOD1(StartPlayout, int(int channel));
111 MOCK_METHOD1(StopPlayout, int(int channel)); 111 MOCK_METHOD1(StopPlayout, int(int channel));
112 MOCK_METHOD1(StartSend, int(int channel)); 112 MOCK_METHOD1(StartSend, int(int channel));
113 MOCK_METHOD1(StopSend, int(int channel)); 113 MOCK_METHOD1(StopSend, int(int channel));
114 MOCK_METHOD0(audio_transport, AudioTransport*()); 114 MOCK_METHOD0(audio_transport, AudioTransport*());
115 115
116 // VoENetwork
117 MOCK_METHOD2(RegisterExternalTransport,
118 int(int channel, Transport& transport));
119 MOCK_METHOD1(DeRegisterExternalTransport, int(int channel));
120 MOCK_METHOD3(ReceivedRTPPacket,
121 int(int channel, const void* data, size_t length));
122 MOCK_METHOD4(ReceivedRTPPacket,
123 int(int channel,
124 const void* data,
125 size_t length,
126 const PacketTime& packet_time));
127 MOCK_METHOD3(ReceivedRTCPPacket,
128 int(int channel, const void* data, size_t length));
129
130 private: 116 private:
131 // TODO(ossu): I'm not particularly happy about keeping the decoder factory 117 // TODO(ossu): I'm not particularly happy about keeping the decoder factory
132 // here, but due to how gmock is implemented, I cannot just keep it in the 118 // here, but due to how gmock is implemented, I cannot just keep it in the
133 // functor implementing the default version of ChannelProxyFactory, above. 119 // functor implementing the default version of ChannelProxyFactory, above.
134 // GMock creates an unfortunate copy of the functor, which would cause us to 120 // GMock creates an unfortunate copy of the functor, which would cause us to
135 // return a dangling reference. Fortunately, this should go away once 121 // return a dangling reference. Fortunately, this should go away once
136 // voe::Channel does. 122 // voe::Channel does.
137 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 123 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
138 124
139 std::map<int, std::unique_ptr<MockRtpRtcp>> mock_rtp_rtcps_; 125 std::map<int, std::unique_ptr<MockRtpRtcp>> mock_rtp_rtcps_;
140 126
141 MockAudioDeviceModule mock_audio_device_; 127 MockAudioDeviceModule mock_audio_device_;
142 MockAudioTransport mock_audio_transport_; 128 MockAudioTransport mock_audio_transport_;
143 }; 129 };
144 } // namespace test 130 } // namespace test
145 } // namespace webrtc 131 } // namespace webrtc
146 132
147 #endif // AUDIO_MOCK_VOICE_ENGINE_H_ 133 #endif // AUDIO_MOCK_VOICE_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | voice_engine/BUILD.gn » ('j') | voice_engine/channel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698