You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright 2016 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef API_TEST_MOCK_RTPRECEIVER_H_
  11. #define API_TEST_MOCK_RTPRECEIVER_H_
  12. #include <string>
  13. #include <vector>
  14. #include "api/rtp_receiver_interface.h"
  15. #include "test/gmock.h"
  16. namespace webrtc {
  17. class MockRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> {
  18. public:
  19. MOCK_METHOD1(SetTrack, void(MediaStreamTrackInterface*));
  20. MOCK_CONST_METHOD0(track, rtc::scoped_refptr<MediaStreamTrackInterface>());
  21. MOCK_CONST_METHOD0(streams,
  22. std::vector<rtc::scoped_refptr<MediaStreamInterface>>());
  23. MOCK_CONST_METHOD0(media_type, cricket::MediaType());
  24. MOCK_CONST_METHOD0(id, std::string());
  25. MOCK_CONST_METHOD0(GetParameters, RtpParameters());
  26. MOCK_METHOD1(SetParameters, bool(const RtpParameters&));
  27. MOCK_METHOD1(SetObserver, void(RtpReceiverObserverInterface*));
  28. MOCK_METHOD1(SetJitterBufferMinimumDelay, void(absl::optional<double>));
  29. MOCK_CONST_METHOD0(GetSources, std::vector<RtpSource>());
  30. };
  31. } // namespace webrtc
  32. #endif // API_TEST_MOCK_RTPRECEIVER_H_