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