1 /* 2 * Copyright 2021 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_RTP_RECEIVER_PROXY_H_ 12 #define PC_RTP_RECEIVER_PROXY_H_ 13 14 #include <string> 15 #include <vector> 16 17 #include "api/rtp_receiver_interface.h" 18 #include "pc/proxy.h" 19 20 namespace webrtc { 21 22 // Define proxy for RtpReceiverInterface. 23 // TODO(deadbeef): Move this to .cc file. What threads methods are called on is 24 // an implementation detail. 25 BEGIN_PROXY_MAP(RtpReceiver) 26 PROXY_PRIMARY_THREAD_DESTRUCTOR() 27 BYPASS_PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) 28 PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport) 29 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids) 30 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>, 31 streams) 32 BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type) 33 BYPASS_PROXY_CONSTMETHOD0(std::string, id) 34 PROXY_SECONDARY_CONSTMETHOD0(RtpParameters, GetParameters) 35 PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*) 36 PROXY_SECONDARY_METHOD1(void, 37 SetJitterBufferMinimumDelay, 38 absl::optional<double>) 39 PROXY_SECONDARY_CONSTMETHOD0(std::vector<RtpSource>, GetSources) 40 // TODO(bugs.webrtc.org/12772): Remove. 41 PROXY_SECONDARY_METHOD1(void, 42 SetFrameDecryptor, 43 rtc::scoped_refptr<FrameDecryptorInterface>) 44 // TODO(bugs.webrtc.org/12772): Remove. 45 PROXY_SECONDARY_CONSTMETHOD0(rtc::scoped_refptr<FrameDecryptorInterface>, 46 GetFrameDecryptor) 47 PROXY_SECONDARY_METHOD1(void, 48 SetDepacketizerToDecoderFrameTransformer, 49 rtc::scoped_refptr<FrameTransformerInterface>) 50 END_PROXY_MAP(RtpReceiver) 51 52 } // namespace webrtc 53 54 #endif // PC_RTP_RECEIVER_PROXY_H_ 55