| 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 // TODO(nisse): Valid overrides commented out, because the gmock | 46 ~MockAudioProvider() override {} |
| 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 */ {} | |
| 51 | 47 |
| 52 MOCK_METHOD2(SetAudioPlayout, | 48 MOCK_METHOD2(SetAudioPlayout, |
| 53 void(uint32_t ssrc, | 49 void(uint32_t ssrc, |
| 54 bool enable)); | 50 bool enable)); |
| 55 MOCK_METHOD4(SetAudioSend, | 51 MOCK_METHOD4(SetAudioSend, |
| 56 void(uint32_t ssrc, | 52 void(uint32_t ssrc, |
| 57 bool enable, | 53 bool enable, |
| 58 const cricket::AudioOptions& options, | 54 const cricket::AudioOptions& options, |
| 59 cricket::AudioSource* source)); | 55 cricket::AudioSource* source)); |
| 60 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); | 56 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); |
| 61 MOCK_CONST_METHOD1(GetAudioRtpParameters, RtpParameters(uint32_t ssrc)); | 57 MOCK_CONST_METHOD1(GetAudioRtpParameters, RtpParameters(uint32_t ssrc)); |
| 62 MOCK_METHOD2(SetAudioRtpParameters, | 58 MOCK_METHOD2(SetAudioRtpParameters, |
| 63 bool(uint32_t ssrc, const RtpParameters&)); | 59 bool(uint32_t ssrc, const RtpParameters&)); |
| 64 | 60 |
| 65 void SetRawAudioSink( | 61 void SetRawAudioSink(uint32_t, |
| 66 uint32_t, std::unique_ptr<AudioSinkInterface> sink) /* override */ { | 62 std::unique_ptr<AudioSinkInterface> sink) override { |
| 67 sink_ = std::move(sink); | 63 sink_ = std::move(sink); |
| 68 } | 64 } |
| 69 | 65 |
| 70 private: | 66 private: |
| 71 std::unique_ptr<AudioSinkInterface> sink_; | 67 std::unique_ptr<AudioSinkInterface> sink_; |
| 72 }; | 68 }; |
| 73 | 69 |
| 74 // Helper class to test RtpSender/RtpReceiver. | 70 // Helper class to test RtpSender/RtpReceiver. |
| 75 class MockVideoProvider : public VideoProviderInterface { | 71 class MockVideoProvider : public VideoProviderInterface { |
| 76 public: | 72 public: |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 .WillOnce(Return(RtpParameters())); | 498 .WillOnce(Return(RtpParameters())); |
| 503 EXPECT_CALL(video_provider_, SetVideoRtpParameters(kVideoSsrc, _)) | 499 EXPECT_CALL(video_provider_, SetVideoRtpParameters(kVideoSsrc, _)) |
| 504 .WillOnce(Return(true)); | 500 .WillOnce(Return(true)); |
| 505 RtpParameters params = video_rtp_sender_->GetParameters(); | 501 RtpParameters params = video_rtp_sender_->GetParameters(); |
| 506 EXPECT_TRUE(video_rtp_sender_->SetParameters(params)); | 502 EXPECT_TRUE(video_rtp_sender_->SetParameters(params)); |
| 507 | 503 |
| 508 DestroyVideoRtpSender(); | 504 DestroyVideoRtpSender(); |
| 509 } | 505 } |
| 510 | 506 |
| 511 } // namespace webrtc | 507 } // namespace webrtc |
| OLD | NEW |