OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 25 matching lines...) Expand all Loading... |
36 static const uint32_t kVideoSsrc = 98; | 36 static const uint32_t kVideoSsrc = 98; |
37 static const uint32_t kVideoSsrc2 = 100; | 37 static const uint32_t kVideoSsrc2 = 100; |
38 static const uint32_t kAudioSsrc = 99; | 38 static const uint32_t kAudioSsrc = 99; |
39 static const uint32_t kAudioSsrc2 = 101; | 39 static const uint32_t kAudioSsrc2 = 101; |
40 | 40 |
41 namespace webrtc { | 41 namespace webrtc { |
42 | 42 |
43 // Helper class to test RtpSender/RtpReceiver. | 43 // Helper class to test RtpSender/RtpReceiver. |
44 class MockAudioProvider : public AudioProviderInterface { | 44 class MockAudioProvider : public AudioProviderInterface { |
45 public: | 45 public: |
46 ~MockAudioProvider() override {} | 46 // TODO(nisse): Valid overrides commented out, because the gmock |
| 47 // methods don't use any override declarations, and we want to avoid |
| 48 // warnings from -Winconsistent-missing-override. See |
| 49 // http://crbug.com/428099. |
| 50 ~MockAudioProvider() /* override */ {} |
47 | 51 |
48 MOCK_METHOD2(SetAudioPlayout, | 52 MOCK_METHOD2(SetAudioPlayout, |
49 void(uint32_t ssrc, | 53 void(uint32_t ssrc, |
50 bool enable)); | 54 bool enable)); |
51 MOCK_METHOD4(SetAudioSend, | 55 MOCK_METHOD4(SetAudioSend, |
52 void(uint32_t ssrc, | 56 void(uint32_t ssrc, |
53 bool enable, | 57 bool enable, |
54 const cricket::AudioOptions& options, | 58 const cricket::AudioOptions& options, |
55 cricket::AudioSource* source)); | 59 cricket::AudioSource* source)); |
56 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); | 60 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); |
57 MOCK_CONST_METHOD1(GetAudioRtpParameters, RtpParameters(uint32_t ssrc)); | 61 MOCK_CONST_METHOD1(GetAudioRtpParameters, RtpParameters(uint32_t ssrc)); |
58 MOCK_METHOD2(SetAudioRtpParameters, | 62 MOCK_METHOD2(SetAudioRtpParameters, |
59 bool(uint32_t ssrc, const RtpParameters&)); | 63 bool(uint32_t ssrc, const RtpParameters&)); |
60 | 64 |
61 void SetRawAudioSink(uint32_t, | 65 void SetRawAudioSink( |
62 std::unique_ptr<AudioSinkInterface> sink) override { | 66 uint32_t, std::unique_ptr<AudioSinkInterface> sink) /* override */ { |
63 sink_ = std::move(sink); | 67 sink_ = std::move(sink); |
64 } | 68 } |
65 | 69 |
66 private: | 70 private: |
67 std::unique_ptr<AudioSinkInterface> sink_; | 71 std::unique_ptr<AudioSinkInterface> sink_; |
68 }; | 72 }; |
69 | 73 |
70 // Helper class to test RtpSender/RtpReceiver. | 74 // Helper class to test RtpSender/RtpReceiver. |
71 class MockVideoProvider : public VideoProviderInterface { | 75 class MockVideoProvider : public VideoProviderInterface { |
72 public: | 76 public: |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 .WillOnce(Return(RtpParameters())); | 502 .WillOnce(Return(RtpParameters())); |
499 EXPECT_CALL(video_provider_, SetVideoRtpParameters(kVideoSsrc, _)) | 503 EXPECT_CALL(video_provider_, SetVideoRtpParameters(kVideoSsrc, _)) |
500 .WillOnce(Return(true)); | 504 .WillOnce(Return(true)); |
501 RtpParameters params = video_rtp_sender_->GetParameters(); | 505 RtpParameters params = video_rtp_sender_->GetParameters(); |
502 EXPECT_TRUE(video_rtp_sender_->SetParameters(params)); | 506 EXPECT_TRUE(video_rtp_sender_->SetParameters(params)); |
503 | 507 |
504 DestroyVideoRtpSender(); | 508 DestroyVideoRtpSender(); |
505 } | 509 } |
506 | 510 |
507 } // namespace webrtc | 511 } // namespace webrtc |
OLD | NEW |