OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 MOCK_METHOD2(SetAudioPlayout, | 63 MOCK_METHOD2(SetAudioPlayout, |
64 void(uint32_t ssrc, | 64 void(uint32_t ssrc, |
65 bool enable)); | 65 bool enable)); |
66 MOCK_METHOD4(SetAudioSend, | 66 MOCK_METHOD4(SetAudioSend, |
67 void(uint32_t ssrc, | 67 void(uint32_t ssrc, |
68 bool enable, | 68 bool enable, |
69 const cricket::AudioOptions& options, | 69 const cricket::AudioOptions& options, |
70 cricket::AudioRenderer* renderer)); | 70 cricket::AudioRenderer* renderer)); |
71 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); | 71 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); |
72 | 72 |
73 void SetRawAudioSink(uint32_t, | 73 void SetRawAudioSink( |
74 rtc::scoped_ptr<AudioSinkInterface> sink) override { | 74 uint32_t, |
75 sink_ = std::move(sink); | 75 const rtc::scoped_refptr<AudioSinkInterface>& sink) override { |
| 76 sink_ = sink; |
76 } | 77 } |
77 | 78 |
78 private: | 79 private: |
79 rtc::scoped_ptr<AudioSinkInterface> sink_; | 80 rtc::scoped_refptr<AudioSinkInterface> sink_; |
80 }; | 81 }; |
81 | 82 |
82 // Helper class to test RtpSender/RtpReceiver. | 83 // Helper class to test RtpSender/RtpReceiver. |
83 class MockVideoProvider : public VideoProviderInterface { | 84 class MockVideoProvider : public VideoProviderInterface { |
84 public: | 85 public: |
85 virtual ~MockVideoProvider() {} | 86 virtual ~MockVideoProvider() {} |
86 MOCK_METHOD2(SetCaptureDevice, | 87 MOCK_METHOD2(SetCaptureDevice, |
87 bool(uint32_t ssrc, cricket::VideoCapturer* camera)); | 88 bool(uint32_t ssrc, cricket::VideoCapturer* camera)); |
88 MOCK_METHOD3(SetVideoPlayout, | 89 MOCK_METHOD3(SetVideoPlayout, |
89 void(uint32_t ssrc, | 90 void(uint32_t ssrc, |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 video_track_->GetSource()->GetVideoCapturer())); | 506 video_track_->GetSource()->GetVideoCapturer())); |
506 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
507 sender->SetSsrc(kVideoSsrc2); | 508 sender->SetSsrc(kVideoSsrc2); |
508 | 509 |
509 // Calls expected from destructor. | 510 // Calls expected from destructor. |
510 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
511 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
512 } | 513 } |
513 | 514 |
514 } // namespace webrtc | 515 } // namespace webrtc |
OLD | NEW |