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