mock_rtp_receiver_internal.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 PC_TEST_MOCK_RTP_RECEIVER_INTERNAL_H_
  11. #define PC_TEST_MOCK_RTP_RECEIVER_INTERNAL_H_
  12. #include <string>
  13. #include <vector>
  14. #include "absl/types/optional.h"
  15. #include "pc/rtp_receiver.h"
  16. #include "test/gmock.h"
  17. namespace webrtc {
  18. // The definition of MockRtpReceiver is copied in to avoid multiple inheritance.
  19. class MockRtpReceiverInternal : public RtpReceiverInternal {
  20. public:
  21. // RtpReceiverInterface methods.
  22. MOCK_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
  23. track,
  24. (),
  25. (const, override));
  26. MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
  27. dtls_transport,
  28. (),
  29. (const, override));
  30. MOCK_METHOD(std::vector<std::string>, stream_ids, (), (const, override));
  31. MOCK_METHOD(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
  32. streams,
  33. (),
  34. (const, override));
  35. MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
  36. MOCK_METHOD(std::string, id, (), (const, override));
  37. MOCK_METHOD(RtpParameters, GetParameters, (), (const, override));
  38. MOCK_METHOD(void, SetObserver, (RtpReceiverObserverInterface*), (override));
  39. MOCK_METHOD(void,
  40. SetJitterBufferMinimumDelay,
  41. (absl::optional<double>),
  42. (override));
  43. MOCK_METHOD(std::vector<RtpSource>, GetSources, (), (const, override));
  44. MOCK_METHOD(void,
  45. SetFrameDecryptor,
  46. (rtc::scoped_refptr<FrameDecryptorInterface>),
  47. (override));
  48. MOCK_METHOD(rtc::scoped_refptr<FrameDecryptorInterface>,
  49. GetFrameDecryptor,
  50. (),
  51. (const, override));
  52. // RtpReceiverInternal methods.
  53. MOCK_METHOD(void, Stop, (), (override));
  54. MOCK_METHOD(void, StopAndEndTrack, (), (override));
  55. MOCK_METHOD(void, SetMediaChannel, (cricket::MediaChannel*), (override));
  56. MOCK_METHOD(void, SetupMediaChannel, (uint32_t), (override));
  57. MOCK_METHOD(void, SetupUnsignaledMediaChannel, (), (override));
  58. MOCK_METHOD(uint32_t, ssrc, (), (const, override));
  59. MOCK_METHOD(void, NotifyFirstPacketReceived, (), (override));
  60. MOCK_METHOD(void, set_stream_ids, (std::vector<std::string>), (override));
  61. MOCK_METHOD(void,
  62. set_transport,
  63. (rtc::scoped_refptr<DtlsTransportInterface>),
  64. (override));
  65. MOCK_METHOD(void,
  66. SetStreams,
  67. (const std::vector<rtc::scoped_refptr<MediaStreamInterface>>&),
  68. (override));
  69. MOCK_METHOD(int, AttachmentId, (), (const, override));
  70. };
  71. } // namespace webrtc
  72. #endif // PC_TEST_MOCK_RTP_RECEIVER_INTERNAL_H_