blob: d4114e0f0bf985b31e29f73f9fabe61bc5ecb02e [file] [log] [blame]
Markus Handelle93fe6c2021-05-20 20:46:311/*
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
Markus Handelle93fe6c2021-05-20 20:46:3117#include "api/rtp_receiver_interface.h"
Markus Handella1b82012021-05-26 16:56:3018#include "pc/proxy.h"
Markus Handelle93fe6c2021-05-20 20:46:3119
20namespace 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.
25BEGIN_PROXY_MAP(RtpReceiver)
26PROXY_PRIMARY_THREAD_DESTRUCTOR()
27BYPASS_PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
28PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
29PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
30PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
31 streams)
32BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
33BYPASS_PROXY_CONSTMETHOD0(std::string, id)
34PROXY_SECONDARY_CONSTMETHOD0(RtpParameters, GetParameters)
35PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*)
36PROXY_SECONDARY_METHOD1(void,
37 SetJitterBufferMinimumDelay,
38 absl::optional<double>)
39PROXY_SECONDARY_CONSTMETHOD0(std::vector<RtpSource>, GetSources)
40// TODO(bugs.webrtc.org/12772): Remove.
41PROXY_SECONDARY_METHOD1(void,
42 SetFrameDecryptor,
43 rtc::scoped_refptr<FrameDecryptorInterface>)
44// TODO(bugs.webrtc.org/12772): Remove.
45PROXY_SECONDARY_CONSTMETHOD0(rtc::scoped_refptr<FrameDecryptorInterface>,
46 GetFrameDecryptor)
47PROXY_SECONDARY_METHOD1(void,
48 SetDepacketizerToDecoderFrameTransformer,
49 rtc::scoped_refptr<FrameTransformerInterface>)
Markus Handell3d46d0b2021-05-27 19:42:5750END_PROXY_MAP(RtpReceiver)
Markus Handelle93fe6c2021-05-20 20:46:3151
52} // namespace webrtc
53
54#endif // PC_RTP_RECEIVER_PROXY_H_