LeviLamina
Loading...
Searching...
No Matches
BaseChannel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/webrtc/ChannelInterface.h"
7#include "mc/external/webrtc/MediaChannelNetworkInterface.h"
8#include "mc/external/webrtc/RtpPacketSinkInterface.h"
9#include "mc/external/webrtc/SdpType.h"
10#include "mc/external/webrtc/Socket.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace webrtc { class CopyOnWriteBuffer; }
15namespace webrtc { class MediaContentDescription; }
16namespace webrtc { class MediaReceiveChannelInterface; }
17namespace webrtc { class MediaSendChannelInterface; }
18namespace webrtc { class RtpPacketReceived; }
19namespace webrtc { class RtpTransportInternal; }
20namespace webrtc { class TaskQueueBase; }
21namespace webrtc { class Thread; }
22namespace webrtc { class UniqueRandomIdGenerator; }
23namespace webrtc { class VideoMediaReceiveChannelInterface; }
24namespace webrtc { class VideoMediaSendChannelInterface; }
25namespace webrtc { class VoiceMediaReceiveChannelInterface; }
26namespace webrtc { class VoiceMediaSendChannelInterface; }
27namespace webrtc { struct AsyncSocketPacketOptions; }
28namespace webrtc { struct CryptoOptions; }
29namespace webrtc { struct RtpExtension; }
30namespace webrtc { struct StreamParams; }
31// clang-format on
32
33namespace webrtc {
34
35class BaseChannel : public ::webrtc::ChannelInterface,
38public:
39 // member variables
40 // NOLINTBEGIN
68 // NOLINTEND
69
70public:
71 // prevent constructor by default
72 BaseChannel& operator=(BaseChannel const&);
73 BaseChannel(BaseChannel const&);
74 BaseChannel();
75
76public:
77 // virtual functions
78 // NOLINTBEGIN
79 virtual ~BaseChannel() /*override*/;
80
81 virtual ::std::string const& mid() const /*override*/;
82
83 virtual ::std::string_view transport_name() const /*override*/;
84
85 virtual bool SetRtpTransport(::webrtc::RtpTransportInternal* rtp_transport) /*override*/;
86
87 virtual bool SetLocalContent(
89 ::webrtc::SdpType type,
90 ::std::string& error_desc
91 ) /*override*/;
92
93 virtual bool SetRemoteContent(
95 ::webrtc::SdpType type,
96 ::std::string& error_desc
97 ) /*override*/;
98
99 virtual bool SetPayloadTypeDemuxingEnabled(bool enabled) /*override*/;
100
101 virtual void Enable(bool enable) /*override*/;
102
103 virtual ::std::vector<::webrtc::StreamParams> const& local_streams() const /*override*/;
104
105 virtual ::std::vector<::webrtc::StreamParams> const& remote_streams() const /*override*/;
106
107 virtual void SetFirstPacketReceivedCallback(::std::function<void()> callback) /*override*/;
108
109 virtual void SetFirstPacketSentCallback(::std::function<void()> callback) /*override*/;
110
111 virtual int SetOption(
112 ::webrtc::MediaChannelNetworkInterface::SocketType type,
113 ::webrtc::Socket::Option opt,
114 int value
115 ) /*override*/;
116
117 virtual void OnRtpPacket(::webrtc::RtpPacketReceived const& parsed_packet) /*override*/;
118
119 virtual ::webrtc::VideoMediaSendChannelInterface* video_media_send_channel() /*override*/;
120
121 virtual ::webrtc::VoiceMediaSendChannelInterface* voice_media_send_channel() /*override*/;
122
123 virtual ::webrtc::VideoMediaReceiveChannelInterface* video_media_receive_channel() /*override*/;
124
125 virtual ::webrtc::VoiceMediaReceiveChannelInterface* voice_media_receive_channel() /*override*/;
126
127 virtual bool
128 SendPacket(::webrtc::CopyOnWriteBuffer* packet, ::webrtc::AsyncSocketPacketOptions const& options) /*override*/;
129
130 virtual bool
131 SendRtcp(::webrtc::CopyOnWriteBuffer* packet, ::webrtc::AsyncSocketPacketOptions const& options) /*override*/;
132
133 virtual void UpdateMediaSendRecvState_w() = 0;
134
135 virtual bool SetLocalContent_w(
137 ::webrtc::SdpType type,
138 ::std::string& error_desc
139 ) = 0;
140
141 virtual bool SetRemoteContent_w(
143 ::webrtc::SdpType type,
144 ::std::string& error_desc
145 ) = 0;
146 // NOLINTEND
147
148public:
149 // member functions
150 // NOLINTBEGIN
152 ::webrtc::TaskQueueBase* worker_thread,
153 ::webrtc::Thread* network_thread,
154 ::webrtc::TaskQueueBase* signaling_thread,
155 ::std::unique_ptr<::webrtc::MediaSendChannelInterface> send_media_channel_impl,
156 ::std::unique_ptr<::webrtc::MediaReceiveChannelInterface> receive_media_channel_impl,
157 ::std::string_view mid,
158 bool srtp_required,
159 ::webrtc::CryptoOptions crypto_options,
161 );
162
163 MCNAPI void ChannelNotWritable_n();
164
165 MCNAPI void ChannelWritable_n();
166
168
169 MCNAPI void DisableMedia_w();
170
171 MCNAPI bool MaybeAddHandledPayloadType(int payload_type);
172
174 bool update_demuxer,
175 ::std::optional<::std::vector<::webrtc::RtpExtension>> extensions,
176 ::std::string& error_desc
177 );
178
180
181 MCNAPI bool
183
184 MCNAPI ::std::string ToString() const;
185
187 ::std::vector<::webrtc::StreamParams> const& streams,
188 ::webrtc::SdpType type,
189 ::std::string& error_desc
190 );
191
194 ::webrtc::SdpType type,
195 ::std::string& error_desc
196 );
197
198 MCNAPI bool srtp_active() const;
199 // NOLINTEND
200
201public:
202 // constructor thunks
203 // NOLINTBEGIN
204 MCNAPI void* $ctor(
205 ::webrtc::TaskQueueBase* worker_thread,
206 ::webrtc::Thread* network_thread,
207 ::webrtc::TaskQueueBase* signaling_thread,
208 ::std::unique_ptr<::webrtc::MediaSendChannelInterface> send_media_channel_impl,
209 ::std::unique_ptr<::webrtc::MediaReceiveChannelInterface> receive_media_channel_impl,
210 ::std::string_view mid,
211 bool srtp_required,
212 ::webrtc::CryptoOptions crypto_options,
214 );
215 // NOLINTEND
216
217public:
218 // destructor thunk
219 // NOLINTBEGIN
220 MCNAPI void $dtor();
221 // NOLINTEND
222
223public:
224 // virtual function thunks
225 // NOLINTBEGIN
226 MCNAPI ::std::string const& $mid() const;
227
228 MCNAPI ::std::string_view $transport_name() const;
229
231
232 MCNAPI bool $SetLocalContent(
234 ::webrtc::SdpType type,
235 ::std::string& error_desc
236 );
237
238 MCNAPI bool $SetRemoteContent(
240 ::webrtc::SdpType type,
241 ::std::string& error_desc
242 );
243
244 MCNAPI bool $SetPayloadTypeDemuxingEnabled(bool enabled);
245
246 MCNAPI void $Enable(bool enable);
247
248 MCNAPI ::std::vector<::webrtc::StreamParams> const& $local_streams() const;
249
250 MCNAPI ::std::vector<::webrtc::StreamParams> const& $remote_streams() const;
251
252 MCNAPI void $SetFirstPacketReceivedCallback(::std::function<void()> callback);
253
254 MCNAPI void $SetFirstPacketSentCallback(::std::function<void()> callback);
255
256 MCNAPI int
257 $SetOption(::webrtc::MediaChannelNetworkInterface::SocketType type, ::webrtc::Socket::Option opt, int value);
258
259 MCNAPI void $OnRtpPacket(::webrtc::RtpPacketReceived const& parsed_packet);
260
261 MCNAPI ::webrtc::VideoMediaSendChannelInterface* $video_media_send_channel();
262
263 MCNAPI ::webrtc::VoiceMediaSendChannelInterface* $voice_media_send_channel();
264
265 MCNAPI ::webrtc::VideoMediaReceiveChannelInterface* $video_media_receive_channel();
266
267 MCNAPI ::webrtc::VoiceMediaReceiveChannelInterface* $voice_media_receive_channel();
268
270
272
273
274 // NOLINTEND
275
276public:
277 // vftables
278 // NOLINTBEGIN
279 MCNAPI static void** $vftableForRtpPacketSinkInterface();
280
282
283 MCNAPI static void** $vftableForChannelInterface();
284 // NOLINTEND
285};
286
287} // namespace webrtc
MCAPI bool $SetRemoteContent(::webrtc::MediaContentDescription const *content, ::webrtc::SdpType type, ::std::string &error_desc)
MCAPI bool ConnectToRtpTransport_n()
MCAPI ::std::vector<::webrtc::StreamParams > const & $local_streams() const
MCAPI void $Enable(bool enable)
MCAPI bool $SendRtcp(::webrtc::CopyOnWriteBuffer *packet, ::webrtc::AsyncSocketPacketOptions const &options)
MCAPI bool $SendPacket(::webrtc::CopyOnWriteBuffer *packet, ::webrtc::AsyncSocketPacketOptions const &options)
MCAPI bool srtp_active() const
MCAPI void $OnRtpPacket(::webrtc::RtpPacketReceived const &parsed_packet)
MCAPI int $SetOption(::webrtc::MediaChannelNetworkInterface::SocketType type, ::webrtc::Socket::Option opt, int value)
MCAPI void DisableMedia_w()
MCAPI::webrtc::VoiceMediaReceiveChannelInterface * $voice_media_receive_channel()
MCAPI bool $SetRtpTransport(::webrtc::RtpTransportInternal *rtp_transport)
static MCAPI void ** $vftableForMediaChannelNetworkInterface()
static MCAPI void ** $vftableForRtpPacketSinkInterface()
MCAPI BaseChannel(::webrtc::TaskQueueBase *worker_thread, ::webrtc::Thread *network_thread, ::webrtc::TaskQueueBase *signaling_thread, ::std::unique_ptr<::webrtc::MediaSendChannelInterface > send_media_channel_impl, ::std::unique_ptr<::webrtc::MediaReceiveChannelInterface > receive_media_channel_impl, ::std::string_view mid, bool srtp_required, ::webrtc::CryptoOptions crypto_options, ::webrtc::UniqueRandomIdGenerator *ssrc_generator)
MCAPI bool $SetLocalContent(::webrtc::MediaContentDescription const *content, ::webrtc::SdpType type, ::std::string &error_desc)
MCAPI bool UpdateRemoteStreams_w(::webrtc::MediaContentDescription const *content, ::webrtc::SdpType type, ::std::string &error_desc)
MCAPI::webrtc::VoiceMediaSendChannelInterface * $voice_media_send_channel()
MCAPI::std::string const & $mid() const
MCAPI bool MaybeAddHandledPayloadType(int payload_type)
MCAPI::std::string_view $transport_name() const
MCAPI::webrtc::VideoMediaReceiveChannelInterface * $video_media_receive_channel()
MCAPI bool MaybeUpdateDemuxerAndRtpExtensions_w(bool update_demuxer, ::std::optional<::std::vector<::webrtc::RtpExtension > > extensions, ::std::string &error_desc)
MCAPI::std::string ToString() const
MCAPI void ChannelNotWritable_n()
MCAPI void $dtor()
MCAPI bool SendPacket(bool rtcp, ::webrtc::CopyOnWriteBuffer *packet, ::webrtc::AsyncSocketPacketOptions const &options)
MCAPI ::std::vector<::webrtc::StreamParams > const & $remote_streams() const
MCAPI void * $ctor(::webrtc::TaskQueueBase *worker_thread, ::webrtc::Thread *network_thread, ::webrtc::TaskQueueBase *signaling_thread, ::std::unique_ptr<::webrtc::MediaSendChannelInterface > send_media_channel_impl, ::std::unique_ptr<::webrtc::MediaReceiveChannelInterface > receive_media_channel_impl, ::std::string_view mid, bool srtp_required, ::webrtc::CryptoOptions crypto_options, ::webrtc::UniqueRandomIdGenerator *ssrc_generator)
MCAPI bool RegisterRtpDemuxerSink_w()
MCAPI void $SetFirstPacketReceivedCallback(::std::function< void()> callback)
MCAPI::webrtc::VideoMediaSendChannelInterface * $video_media_send_channel()
MCAPI void $SetFirstPacketSentCallback(::std::function< void()> callback)
MCAPI void ChannelWritable_n()
MCAPI bool UpdateLocalStreams_w(::std::vector<::webrtc::StreamParams > const &streams, ::webrtc::SdpType type, ::std::string &error_desc)
static MCAPI void ** $vftableForChannelInterface()
MCAPI bool $SetPayloadTypeDemuxingEnabled(bool enabled)
Definition ChannelInterface.h:26
Definition CopyOnWriteBuffer.h:11
Definition MediaChannelNetworkInterface.h:16
Definition MediaContentDescription.h:20
Definition MediaReceiveChannelInterface.h:22
Definition MediaSendChannelInterface.h:28
Definition RtpPacketReceived.h:16
Definition RtpPacketSinkInterface.h:12
Definition RtpTransportInternal.h:21
Definition TaskQueueBase.h:16
Definition Thread.h:20
Definition UniqueRandomIdGenerator.h:7
Definition VideoMediaReceiveChannelInterface.h:23
Definition VideoMediaSendChannelInterface.h:21
Definition VoiceMediaReceiveChannelInterface.h:20
Definition VoiceMediaSendChannelInterface.h:18
Definition Alias.h:14
Definition AsyncSocketPacketOptions.h:10
Definition CryptoOptions.h:12
Definition RtpExtension.h:7
Definition StreamParams.h:12