xref: /aosp_15_r20/external/webrtc/pc/rtp_receiver_proxy.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker /*
2*d9f75844SAndroid Build Coastguard Worker  *  Copyright 2021 The WebRTC project authors. All Rights Reserved.
3*d9f75844SAndroid Build Coastguard Worker  *
4*d9f75844SAndroid Build Coastguard Worker  *  Use of this source code is governed by a BSD-style license
5*d9f75844SAndroid Build Coastguard Worker  *  that can be found in the LICENSE file in the root of the source
6*d9f75844SAndroid Build Coastguard Worker  *  tree. An additional intellectual property rights grant can be found
7*d9f75844SAndroid Build Coastguard Worker  *  in the file PATENTS.  All contributing project authors may
8*d9f75844SAndroid Build Coastguard Worker  *  be found in the AUTHORS file in the root of the source tree.
9*d9f75844SAndroid Build Coastguard Worker  */
10*d9f75844SAndroid Build Coastguard Worker 
11*d9f75844SAndroid Build Coastguard Worker #ifndef PC_RTP_RECEIVER_PROXY_H_
12*d9f75844SAndroid Build Coastguard Worker #define PC_RTP_RECEIVER_PROXY_H_
13*d9f75844SAndroid Build Coastguard Worker 
14*d9f75844SAndroid Build Coastguard Worker #include <string>
15*d9f75844SAndroid Build Coastguard Worker #include <vector>
16*d9f75844SAndroid Build Coastguard Worker 
17*d9f75844SAndroid Build Coastguard Worker #include "api/rtp_receiver_interface.h"
18*d9f75844SAndroid Build Coastguard Worker #include "pc/proxy.h"
19*d9f75844SAndroid Build Coastguard Worker 
20*d9f75844SAndroid Build Coastguard Worker namespace webrtc {
21*d9f75844SAndroid Build Coastguard Worker 
22*d9f75844SAndroid Build Coastguard Worker // Define proxy for RtpReceiverInterface.
23*d9f75844SAndroid Build Coastguard Worker // TODO(deadbeef): Move this to .cc file. What threads methods are called on is
24*d9f75844SAndroid Build Coastguard Worker // an implementation detail.
25*d9f75844SAndroid Build Coastguard Worker BEGIN_PROXY_MAP(RtpReceiver)
26*d9f75844SAndroid Build Coastguard Worker PROXY_PRIMARY_THREAD_DESTRUCTOR()
27*d9f75844SAndroid Build Coastguard Worker BYPASS_PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
28*d9f75844SAndroid Build Coastguard Worker PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
29*d9f75844SAndroid Build Coastguard Worker PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
30*d9f75844SAndroid Build Coastguard Worker PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
31*d9f75844SAndroid Build Coastguard Worker                    streams)
32*d9f75844SAndroid Build Coastguard Worker BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
33*d9f75844SAndroid Build Coastguard Worker BYPASS_PROXY_CONSTMETHOD0(std::string, id)
34*d9f75844SAndroid Build Coastguard Worker PROXY_SECONDARY_CONSTMETHOD0(RtpParameters, GetParameters)
35*d9f75844SAndroid Build Coastguard Worker PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*)
36*d9f75844SAndroid Build Coastguard Worker PROXY_SECONDARY_METHOD1(void,
37*d9f75844SAndroid Build Coastguard Worker                         SetJitterBufferMinimumDelay,
38*d9f75844SAndroid Build Coastguard Worker                         absl::optional<double>)
39*d9f75844SAndroid Build Coastguard Worker PROXY_SECONDARY_CONSTMETHOD0(std::vector<RtpSource>, GetSources)
40*d9f75844SAndroid Build Coastguard Worker // TODO(bugs.webrtc.org/12772): Remove.
41*d9f75844SAndroid Build Coastguard Worker PROXY_SECONDARY_METHOD1(void,
42*d9f75844SAndroid Build Coastguard Worker                         SetFrameDecryptor,
43*d9f75844SAndroid Build Coastguard Worker                         rtc::scoped_refptr<FrameDecryptorInterface>)
44*d9f75844SAndroid Build Coastguard Worker // TODO(bugs.webrtc.org/12772): Remove.
45*d9f75844SAndroid Build Coastguard Worker PROXY_SECONDARY_CONSTMETHOD0(rtc::scoped_refptr<FrameDecryptorInterface>,
46*d9f75844SAndroid Build Coastguard Worker                              GetFrameDecryptor)
47*d9f75844SAndroid Build Coastguard Worker PROXY_SECONDARY_METHOD1(void,
48*d9f75844SAndroid Build Coastguard Worker                         SetDepacketizerToDecoderFrameTransformer,
49*d9f75844SAndroid Build Coastguard Worker                         rtc::scoped_refptr<FrameTransformerInterface>)
50*d9f75844SAndroid Build Coastguard Worker END_PROXY_MAP(RtpReceiver)
51*d9f75844SAndroid Build Coastguard Worker 
52*d9f75844SAndroid Build Coastguard Worker }  // namespace webrtc
53*d9f75844SAndroid Build Coastguard Worker 
54*d9f75844SAndroid Build Coastguard Worker #endif  // PC_RTP_RECEIVER_PROXY_H_
55