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( | 73 void SetRawAudioSink(uint32_t, |
74 uint32_t, | 74 rtc::scoped_ptr<AudioSinkInterface> sink) override { |
75 const rtc::scoped_refptr<AudioSinkInterface>& sink) override { | 75 sink_ = std::move(sink); |
76 sink_ = sink; | |
77 } | 76 } |
78 | 77 |
79 private: | 78 private: |
80 rtc::scoped_refptr<AudioSinkInterface> sink_; | 79 rtc::scoped_ptr<AudioSinkInterface> sink_; |
81 }; | 80 }; |
82 | 81 |
83 // Helper class to test RtpSender/RtpReceiver. | 82 // Helper class to test RtpSender/RtpReceiver. |
84 class MockVideoProvider : public VideoProviderInterface { | 83 class MockVideoProvider : public VideoProviderInterface { |
85 public: | 84 public: |
86 virtual ~MockVideoProvider() {} | 85 virtual ~MockVideoProvider() {} |
87 MOCK_METHOD2(SetCaptureDevice, | 86 MOCK_METHOD2(SetCaptureDevice, |
88 bool(uint32_t ssrc, cricket::VideoCapturer* camera)); | 87 bool(uint32_t ssrc, cricket::VideoCapturer* camera)); |
89 MOCK_METHOD3(SetVideoPlayout, | 88 MOCK_METHOD3(SetVideoPlayout, |
90 void(uint32_t ssrc, | 89 void(uint32_t ssrc, |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 video_track_->GetSource()->GetVideoCapturer())); | 505 video_track_->GetSource()->GetVideoCapturer())); |
507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 506 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
508 sender->SetSsrc(kVideoSsrc2); | 507 sender->SetSsrc(kVideoSsrc2); |
509 | 508 |
510 // Calls expected from destructor. | 509 // Calls expected from destructor. |
511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 510 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 511 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
513 } | 512 } |
514 | 513 |
515 } // namespace webrtc | 514 } // namespace webrtc |
OLD | NEW |