Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 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_SENDER_PROXY_H_ |
| 12 | #define PC_RTP_SENDER_PROXY_H_ |
| 13 | |
Jonas Oreland | 6545516 | 2022-06-08 09:25:46 | [diff] [blame] | 14 | #include <memory> |
Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 15 | #include <string> |
| 16 | #include <vector> |
| 17 | |
Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 18 | #include "api/rtp_sender_interface.h" |
Markus Handell | a1b8201 | 2021-05-26 16:56:30 | [diff] [blame] | 19 | #include "pc/proxy.h" |
Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 20 | |
| 21 | namespace webrtc { |
| 22 | |
| 23 | // Define proxy for RtpSenderInterface. |
| 24 | // TODO(deadbeef): Move this to .cc file. What threads methods are called on is |
| 25 | // an implementation detail. |
| 26 | BEGIN_PRIMARY_PROXY_MAP(RtpSender) |
| 27 | PROXY_PRIMARY_THREAD_DESTRUCTOR() |
| 28 | PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) |
| 29 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
| 30 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport) |
| 31 | PROXY_CONSTMETHOD0(uint32_t, ssrc) |
| 32 | BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type) |
| 33 | BYPASS_PROXY_CONSTMETHOD0(std::string, id) |
| 34 | PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids) |
| 35 | PROXY_CONSTMETHOD0(std::vector<RtpEncodingParameters>, init_send_encodings) |
| 36 | PROXY_CONSTMETHOD0(RtpParameters, GetParameters) |
| 37 | PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&) |
Florent Castelli | acabb36 | 2022-10-18 15:05:16 | [diff] [blame] | 38 | PROXY_METHOD2(void, |
| 39 | SetParametersAsync, |
| 40 | const RtpParameters&, |
| 41 | SetParametersCallback) |
Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 42 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender) |
| 43 | PROXY_METHOD1(void, |
| 44 | SetFrameEncryptor, |
| 45 | rtc::scoped_refptr<FrameEncryptorInterface>) |
| 46 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<FrameEncryptorInterface>, |
| 47 | GetFrameEncryptor) |
| 48 | PROXY_METHOD1(void, SetStreams, const std::vector<std::string>&) |
| 49 | PROXY_METHOD1(void, |
Harald Alvestrand | b0e7057 | 2024-04-23 14:04:18 | [diff] [blame] | 50 | SetFrameTransformer, |
Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 51 | rtc::scoped_refptr<FrameTransformerInterface>) |
Jonas Oreland | 6545516 | 2022-06-08 09:25:46 | [diff] [blame] | 52 | PROXY_METHOD1(void, |
| 53 | SetEncoderSelector, |
| 54 | std::unique_ptr<VideoEncoderFactory::EncoderSelectorInterface>) |
Markus Handell | 3d46d0b | 2021-05-27 19:42:57 | [diff] [blame] | 55 | END_PROXY_MAP(RtpSender) |
Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 56 | |
| 57 | } // namespace webrtc |
| 58 | |
| 59 | #endif // PC_RTP_SENDER_PROXY_H_ |