mock_rtpreceiver.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
  20. track,
  21. (),
  22. (const override));
  23. MOCK_METHOD(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
  24. streams,
  25. (),
  26. (const override));
  27. MOCK_METHOD(cricket::MediaType, media_type, (), (const override));
  28. MOCK_METHOD(std::string, id, (), (const override));
  29. MOCK_METHOD(RtpParameters, GetParameters, (), (const override));
  30. MOCK_METHOD(void, SetObserver, (RtpReceiverObserverInterface*), (override));
  31. MOCK_METHOD(void,
  32. SetJitterBufferMinimumDelay,
  33. (absl::optional<double>),
  34. (override));
  35. MOCK_METHOD(std::vector<RtpSource>, GetSources, (), (const override));
  36. };
  37. } // namespace webrtc
  38. #endif // API_TEST_MOCK_RTPRECEIVER_H_