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

Side by Side Diff: webrtc/modules/audio_coding/codecs/mock_audio_decoder_factory.h

Issue 1928293002: NetEq: Use a BuiltinAudioDecoderFactory to create decoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
(Empty)
1 /*
hlundin-webrtc 2016/04/29 11:52:56 We used to have the structure that the mock for pa
kwiberg-webrtc 2016/04/29 23:10:13 Laudable. Will change. But we have only one mock i
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_AUDIO_DECODER_FACTORY_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_AUDIO_DECODER_FACTORY_H_
13
14 #include <vector>
15
16 #include "testing/gmock/include/gmock/gmock.h"
17 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h"
18
19 namespace webrtc {
20
21 class MockAudioDecoderFactory : public AudioDecoderFactory {
22 public:
23 MOCK_METHOD0(GetSupportedFormats, std::vector<SdpAudioFormat>());
24 std::unique_ptr<AudioDecoder> MakeAudioDecoder(
ossu 2016/04/29 12:21:33 Why is this? Just to remove the std::unique_ptr<>
kwiberg-webrtc 2016/04/29 23:10:13 Yes. gmock is pre-C++11 and doesn't properly forwa
ossu 2016/05/02 10:59:40 Ah, I see.
25 const SdpAudioFormat& format) override {
26 std::unique_ptr<AudioDecoder> return_value;
27 MakeAudioDecoderMock(format, &return_value);
28 return return_value;
29 }
30 MOCK_METHOD2(MakeAudioDecoderMock,
31 void(const SdpAudioFormat& format,
32 std::unique_ptr<AudioDecoder>* return_value));
33 };
34
35 } // namespace webrtc
36
37 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_AUDIO_DECODER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698