LeviLamina
Loading...
Searching...
No Matches
webrtc.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/absl/AnyInvocable.h"
7#include "mc/external/cricket/MediaType.h"
8#include "mc/external/rtc/AdapterType.h"
9#include "mc/external/webrtc/AV1Profile.h"
10#include "mc/external/webrtc/IceCandidateType.h"
11#include "mc/external/webrtc/PeerConnectionInterface.h"
12#include "mc/external/webrtc/Priority.h"
13#include "mc/external/webrtc/RTCErrorType.h"
14#include "mc/external/webrtc/RtpReceiverProxyWithInternal.h"
15#include "mc/external/webrtc/RtpSenderProxyWithInternal.h"
16#include "mc/external/webrtc/RtpTransceiverDirection.h"
17#include "mc/external/webrtc/RtpTransceiverProxyWithInternal.h"
18#include "mc/external/webrtc/ScalabilityMode.h"
19#include "mc/external/webrtc/SdpType.h"
20#include "mc/external/webrtc/VP9Profile.h"
21#include "mc/external/webrtc/VideoCodecType.h"
22#include "mc/external/webrtc/scoped_refptr.h"
23
24// auto generated forward declare list
25// clang-format off
26namespace cricket { class Candidate; }
27namespace cricket { class ContentInfo; }
28namespace cricket { class FeedbackParam; }
29namespace cricket { class FeedbackParams; }
30namespace cricket { class MediaContentDescription; }
31namespace cricket { class SessionDescription; }
32namespace cricket { struct Codec; }
33namespace cricket { struct RelayServerConfig; }
34namespace cricket { struct RidDescription; }
35namespace cricket { struct StreamParams; }
36namespace rtc { class CopyOnWriteBuffer; }
37namespace rtc { class IPAddress; }
38namespace rtc { class RTCCertificate; }
39namespace rtc { class SocketAddress; }
40namespace rtc { class StringBuilder; }
41namespace webrtc { class DataRate; }
42namespace webrtc { class DataSize; }
43namespace webrtc { class FieldTrialParameterInterface; }
44namespace webrtc { class FieldTrialsView; }
45namespace webrtc { class IceCandidateInterface; }
46namespace webrtc { class JsepIceCandidate; }
47namespace webrtc { class JsepSessionDescription; }
48namespace webrtc { class MediaStreamTrackInterface; }
49namespace webrtc { class PendingTaskSafetyFlag; }
50namespace webrtc { class RTCError; }
51namespace webrtc { class RTCStats; }
52namespace webrtc { class RTCStatsReport; }
53namespace webrtc { class RtpHeaderExtensionMap; }
54namespace webrtc { class RtpReceiverInterface; }
55namespace webrtc { class RtpReceiverInternal; }
56namespace webrtc { class RtpSenderInterface; }
57namespace webrtc { class RtpSenderInternal; }
58namespace webrtc { class RtpTransceiver; }
59namespace webrtc { class SessionDescriptionInterface; }
60namespace webrtc { class TaskQueueFactory; }
61namespace webrtc { class TimeDelta; }
62namespace webrtc { class Timestamp; }
63namespace webrtc { class TransceiverList; }
64namespace webrtc { class VideoFrameBuffer; }
65namespace webrtc { struct DataChannelInit; }
66namespace webrtc { struct H264ProfileLevelId; }
67namespace webrtc { struct RTPVideoHeader; }
68namespace webrtc { struct RtcpFeedback; }
69namespace webrtc { struct RtpCapabilities; }
70namespace webrtc { struct RtpCodecCapability; }
71namespace webrtc { struct RtpExtension; }
72namespace webrtc { struct RtpExtensionSize; }
73namespace webrtc { struct RtpParameters; }
74namespace webrtc { struct SdpParseError; }
75namespace webrtc { struct SsrcInfo; }
76// clang-format on
77
78namespace webrtc {
79// inner types
80enum : int {
81 // bitfield representation
82 KMaxEncoderBuffers = 1 << 3,
83};
84
85enum : int {
86 KMaxPreferredPixelFormats = 5,
87};
88
89enum : int {
90 KMaxSimulcastStreams = 3,
91};
92
93enum : int {
94 KMaxSpatialLayers = 5,
95};
96
97enum : int {
98 // bitfield representation
99 KMaxTemporalStreams = 1 << 2,
100};
101
102enum : int {
103 KRtpCsrcSize = 15,
104};
105
106// functions
107// NOLINTBEGIN
108MCNAPI bool
109AV1IsSameProfile(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&);
110
111MCNAPI char const* AdapterTypeToStatsType(::rtc::AdapterType);
112
113MCNAPI void AddAudioAttribute(::std::string const&, ::std::string_view, ::cricket::MediaContentDescription*);
114
115MCNAPI void AddFeedbackParameter(::cricket::FeedbackParam const&, ::cricket::Codec*);
116
117MCNAPI void AddFeedbackParameters(::cricket::FeedbackParams const&, ::cricket::Codec*);
118
119MCNAPI void AddFmtpLine(::cricket::Codec const&, ::std::string*);
120
121MCNAPI void AddOrReplaceCodec(::cricket::MediaContentDescription*, ::cricket::Codec const&);
122
123MCNAPI void AddPacketizationLine(::cricket::Codec const&, ::std::string*);
124
125MCNAPI void AddParameters(::std::map<::std::string, ::std::string> const&, ::cricket::Codec*);
126
127MCNAPI void AddRtcpFbLines(::cricket::Codec const&, ::std::string*);
128
129MCNAPI void AlignedFree(void*);
130
131MCNAPI void* AlignedMalloc(uint64, uint64);
132
133MCNAPI char const* CodecTypeToPayloadString(::webrtc::VideoCodecType);
134
135MCNAPI ::webrtc::TimeDelta CompactNtpRttToTimeDelta(uint);
136
137MCNAPI ::std::unique_ptr<::webrtc::TaskQueueFactory> CreateDefaultTaskQueueFactory(::webrtc::FieldTrialsView const*);
138
139MCNAPI ::webrtc::IceCandidateInterface*
140CreateIceCandidate(::std::string const&, int, ::std::string const&, ::webrtc::SdpParseError*);
141
142MCNAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
143CreateSessionDescription(::webrtc::SdpType, ::std::string const&);
144
145MCNAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
146CreateSessionDescription(::webrtc::SdpType, ::std::string const&, ::webrtc::SdpParseError*);
147
148MCNAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface> CreateSessionDescription(
149 ::webrtc::SdpType,
150 ::std::string const&,
151 ::std::string const&,
152 ::std::unique_ptr<::cricket::SessionDescription>
153);
154
155MCNAPI ::std::unique_ptr<::webrtc::TaskQueueFactory> CreateTaskQueueStdlibFactory();
156
157MCNAPI void CreateTrackWithNoSsrcs(
158 ::std::vector<::std::string> const&,
159 ::std::string_view,
160 ::std::vector<::cricket::RidDescription> const&,
161 ::std::vector<::cricket::StreamParams>*
162);
163
164MCNAPI void CreateTracksFromSsrcInfos(
165 ::std::vector<::webrtc::SsrcInfo> const&,
166 ::std::vector<::std::string> const&,
167 ::std::string_view,
168 ::std::vector<::cricket::StreamParams>*,
169 int
170);
171
172MCNAPI ::cricket::Codec GetCodecWithPayloadType(::cricket::MediaType, ::std::vector<::cricket::Codec> const&, int);
173
174MCNAPI bool GetDtmfCode(char, int*);
175
176MCNAPI ::std::string GetLegacyCandidateTypeName(::cricket::Candidate const&);
177
178MCNAPI void GetMediaStreamIds(::cricket::ContentInfo const*, ::std::set<::std::string>*);
179
180MCNAPI bool GetMinValue(::std::vector<int> const&, int*);
181
182MCNAPI bool GetParameter(::std::string const&, ::std::map<::std::string, ::std::string> const&, int*);
183
184MCNAPI uint64 GetRightAlign(uint64, uint64);
185
186MCNAPI ::std::vector<::std::string const*> GetStatsReferencedIds(::webrtc::RTCStats const&);
187
188MCNAPI void H264GenerateProfileLevelIdForAnswer(
189 ::std::map<::std::string, ::std::string> const&,
190 ::std::map<::std::string, ::std::string> const&,
191 ::std::map<::std::string, ::std::string>*
192);
193
194MCNAPI bool
195H264IsSameProfile(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&);
196
197MCNAPI ::std::optional<::std::string> H264ProfileLevelIdToString(::webrtc::H264ProfileLevelId const&);
198
199MCNAPI bool HasDuplicateMsidLines(::cricket::SessionDescription*);
200
201MCNAPI char const* IceCandidateTypeToStatsType(::cricket::Candidate const&);
202
203MCNAPI ::std::string_view IceCandidateTypeToString(::webrtc::IceCandidateType);
204
205MCNAPI ::webrtc::RTCError
206InvokeSetParametersCallback(::absl::AnyInvocable<void(::webrtc::RTCError) &&>&, ::webrtc::RTCError);
207
208MCNAPI bool IsFmtpParam(::std::string_view);
209
210MCNAPI bool IsLegalRsidName(::std::string_view);
211
212MCNAPI bool IsMandatoryHeaderExtension(::std::string const&);
213
214MCNAPI bool IsNewerSequenceNumber(ushort, ushort);
215
216MCNAPI bool IsOpenMessage(::rtc::CopyOnWriteBuffer const&);
217
218MCNAPI bool IsRtcpPacket(::rtc::ArrayView<uchar const>);
219
220MCNAPI bool IsRtpPacket(::rtc::ArrayView<uchar const>);
221
222MCNAPI bool IsTokenChar(char);
223
224MCNAPI int Leb128Size(uint64);
225
226MCNAPI void MaybeCreateStaticPayloadAudioCodecs(::std::vector<int> const&, ::cricket::MediaContentDescription*);
227
228MCNAPI bool ParseCandidate(::std::string_view, ::cricket::Candidate*, ::webrtc::SdpParseError*, bool);
229
230MCNAPI bool ParseConnectionData(::std::string_view, ::rtc::SocketAddress*, ::webrtc::SdpParseError*);
231
232MCNAPI bool ParseDataChannelOpenAckMessage(::rtc::CopyOnWriteBuffer const&);
233
234MCNAPI bool ParseDataChannelOpenMessage(::rtc::CopyOnWriteBuffer const&, ::std::string*, ::webrtc::DataChannelInit*);
235
236MCNAPI void ParseFieldTrial(::std::initializer_list<::webrtc::FieldTrialParameterInterface*>, ::std::string_view);
237
238MCNAPI ::std::optional<::webrtc::H264ProfileLevelId> ParseH264ProfileLevelId(char const*);
239
240MCNAPI ::webrtc::RTCError ParseIceServersOrError(
241 ::std::vector<::webrtc::PeerConnectionInterface::IceServer> const&,
242 ::std::set<::rtc::SocketAddress>*,
243 ::std::vector<::cricket::RelayServerConfig>*
244);
245
246MCNAPI ushort ParseRtpSequenceNumber(::rtc::ArrayView<uchar const>);
247
248MCNAPI uint ParseRtpSsrc(::rtc::ArrayView<uchar const>);
249
250MCNAPI bool ParseSctpMaxMessageSize(::std::string_view, int*, ::webrtc::SdpParseError*);
251
252MCNAPI bool ParseSctpPort(::std::string_view, int*, ::webrtc::SdpParseError*);
253
254MCNAPI ::std::optional<::webrtc::AV1Profile> ParseSdpForAV1Profile(::std::map<::std::string, ::std::string> const&);
255
256MCNAPI ::std::optional<::webrtc::H264ProfileLevelId>
257ParseSdpForH264ProfileLevelId(::std::map<::std::string, ::std::string> const&);
258
259MCNAPI ::std::optional<::webrtc::VP9Profile> ParseSdpForVP9Profile(::std::map<::std::string, ::std::string> const&);
260
261MCNAPI ::webrtc::VideoCodecType PayloadStringToCodecType(::std::string const&);
262
263MCNAPI ::std::optional<::cricket::Codec> PopWildcardCodec(::std::vector<::cricket::Codec>*);
264
265MCNAPI int ResolveHostname(::std::string_view, int, ::std::vector<::rtc::IPAddress>&);
266
267MCNAPI ::std::vector<uchar> RtpDescriptorAuthentication(::webrtc::RTPVideoHeader const&);
268
269MCNAPI int
271
272MCNAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionFromSendRecv(bool, bool);
273
274MCNAPI bool RtpTransceiverDirectionHasRecv(::webrtc::RtpTransceiverDirection);
275
276MCNAPI bool RtpTransceiverDirectionHasSend(::webrtc::RtpTransceiverDirection);
277
278MCNAPI ::webrtc::RtpTransceiverDirection
279 RtpTransceiverDirectionIntersection(::webrtc::RtpTransceiverDirection, ::webrtc::RtpTransceiverDirection);
280
281MCNAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionReversed(::webrtc::RtpTransceiverDirection);
282
283MCNAPI char const* RtpTransceiverDirectionToString(::webrtc::RtpTransceiverDirection);
284
285MCNAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionWithRecvSet(::webrtc::RtpTransceiverDirection, bool);
286
287MCNAPI ::absl::AnyInvocable<void() &&>
289
290MCNAPI ::std::string_view ScalabilityModeToString(::webrtc::ScalabilityMode);
291
292MCNAPI bool SdpDeserialize(::std::string_view, ::webrtc::JsepSessionDescription*, ::webrtc::SdpParseError*);
293
294MCNAPI bool SdpDeserializeCandidate(::std::string_view, ::webrtc::JsepIceCandidate*, ::webrtc::SdpParseError*);
295
296MCNAPI ::std::string SdpSerialize(::webrtc::JsepSessionDescription const&);
297
298MCNAPI ::std::string SdpSerializeCandidate(::cricket::Candidate const&);
299
300MCNAPI ::std::string SdpSerializeCandidate(::webrtc::IceCandidateInterface const&);
301
302MCNAPI ::std::optional<::webrtc::SdpType> SdpTypeFromString(::std::string const&);
303
304MCNAPI char const* SdpTypeToString(::webrtc::SdpType);
305
306MCNAPI ::std::optional<::webrtc::AV1Profile> StringToAV1Profile(::std::string_view);
307
308MCNAPI ::std::optional<::webrtc::VP9Profile> StringToVP9Profile(::std::string const&);
309
310MCNAPI ::webrtc::scoped_refptr<::webrtc::RTCStatsReport>
311TakeReferencedStats(::webrtc::scoped_refptr<::webrtc::RTCStatsReport>, ::std::vector<::std::string> const&);
312
313MCNAPI ::std::optional<::webrtc::RtcpFeedback> ToRtcpFeedback(::cricket::FeedbackParam const&);
314
315MCNAPI ::webrtc::RtpCapabilities
316ToRtpCapabilities(::std::vector<::cricket::Codec> const&, ::std::vector<::webrtc::RtpExtension> const&);
317
318MCNAPI ::webrtc::RtpCodecCapability ToRtpCodecCapability(::cricket::Codec const&);
319
320MCNAPI ::std::string_view ToString(::webrtc::RTCErrorType);
321
322MCNAPI ::std::string ToString(::webrtc::DataRate);
323
324MCNAPI ::std::string ToString(::webrtc::TimeDelta);
325
326MCNAPI ::std::string ToString(::webrtc::DataSize);
327
328MCNAPI ::std::string ToString(::webrtc::Timestamp);
329
330MCNAPI bool UnimplementedRtpParameterHasValue(::webrtc::RtpParameters const&);
331
332MCNAPI void UpdateCodec(::cricket::MediaContentDescription*, int, ::std::map<::std::string, ::std::string> const&);
333
334MCNAPI void UpdateCodec(::cricket::MediaContentDescription*, int, ::cricket::FeedbackParam const&);
335
336MCNAPI void UpdateCodec(int, ::std::string_view, ::cricket::MediaContentDescription*);
337
338MCNAPI void UpdateCodec(int, ::std::string_view, int, int, uint64, ::cricket::MediaContentDescription*);
339
340MCNAPI void UpdateFromWildcardCodecs(::cricket::MediaContentDescription*);
341
342MCNAPI void
343UpdateRtpHeaderExtensionPreferencesFromSdpMunging(::cricket::SessionDescription const*, ::webrtc::TransceiverList*);
344
345MCNAPI void UpdateVideoCodecPacketization(::cricket::MediaContentDescription*, int, ::std::string_view);
346
347MCNAPI bool
348VP9IsSameProfile(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&);
349
350MCNAPI bool ValidAlignment(uint64);
351
352MCNAPI void WriteDataChannelOpenAckMessage(::rtc::CopyOnWriteBuffer*);
353
354MCNAPI bool WriteDataChannelOpenMessage(
355 ::std::string const&,
356 ::std::string const&,
357 ::std::optional<::webrtc::Priority>,
358 bool,
359 ::std::optional<int>,
360 ::std::optional<int>,
362);
363
364MCNAPI void WriteFmtpHeader(int, ::rtc::StringBuilder*);
365
366MCNAPI void WriteFmtpParameter(::std::string_view, ::std::string_view, ::rtc::StringBuilder*);
367
368MCNAPI bool WriteFmtpParameters(::std::map<::std::string, ::std::string> const&, ::rtc::StringBuilder*);
369
370MCNAPI int WriteLeb128(uint64, uchar*);
371
372MCNAPI void WritePacketizationHeader(int, ::rtc::StringBuilder*);
373
374MCNAPI void WriteRtcpFbHeader(int, ::rtc::StringBuilder*);
375
376MCNAPI bool operator!=(::webrtc::scoped_refptr<::webrtc::VideoFrameBuffer> const&, nullptr_t);
377
378MCNAPI bool operator!=(::webrtc::scoped_refptr<::rtc::RTCCertificate> const&, nullptr_t);
379
380MCNAPI bool operator!=(::webrtc::scoped_refptr<::webrtc::PendingTaskSafetyFlag> const&, nullptr_t);
381
382MCNAPI bool operator<(
385);
386
387MCNAPI bool operator==(
390);
391
392MCNAPI bool operator==(
395);
396
397MCNAPI bool operator==(
400);
401
402MCNAPI bool operator==(
405);
406
407MCNAPI bool operator==(
410);
411
412MCNAPI bool operator==(
415);
416
417MCNAPI bool operator==(::webrtc::scoped_refptr<::webrtc::VideoFrameBuffer> const&, nullptr_t);
418
419MCNAPI bool operator==(::webrtc::scoped_refptr<::rtc::RTCCertificate> const&, nullptr_t);
420
421MCNAPI bool operator==(
424);
425
426MCNAPI bool operator==(::webrtc::scoped_refptr<::webrtc::PendingTaskSafetyFlag> const&, nullptr_t);
427
428MCNAPI bool operator==(
431);
432// NOLINTEND
433
434// static variables
435// NOLINTBEGIN
436MCNAPI ::std::add_lvalue_reference_t<char const[]> kBweTypeHistogram();
437
438MCNAPI ::webrtc::DataRate const& kCongestionControllerMinBitrate();
439
440MCNAPI double const& kDefaultBitratePriority();
441
442MCNAPI ::std::add_lvalue_reference_t<char const[]> kVP9FmtpProfileId();
443// NOLINTEND
444
445} // namespace webrtc
Definition AnyInvocable.h:8
Definition Candidate.h:15
Definition ContentInfo.h:12
Definition FeedbackParam.h:7
Definition FeedbackParams.h:12
Definition MediaContentDescription.h:23
Definition SessionDescription.h:18
Definition _HeaderOutputPredefine.h:258
Definition CopyOnWriteBuffer.h:11
Definition SocketAddress.h:12
Definition StringBuilder.h:7
Definition DataRate.h:10
Definition DataSize.h:10
Definition FieldTrialsView.h:7
Definition IceCandidateInterface.h:12
Definition JsepIceCandidate.h:13
Definition JsepSessionDescription.h:17
Definition MediaStreamTrackInterface.h:11
Definition RTCError.h:10
Definition RTCStats.h:12
Definition RtpHeaderExtensionMap.h:15
Definition RtpReceiverInterface.h:24
Definition RtpReceiverProxyWithInternal.h:8
Definition RtpSenderInterface.h:26
Definition RtpSenderProxyWithInternal.h:8
Definition RtpTransceiverProxyWithInternal.h:8
Definition TimeDelta.h:10
Definition Timestamp.h:10
Definition TransceiverList.h:18
Definition scoped_refptr.h:8
Definition Codec.h:14
Definition DataChannelInit.h:7
Definition H264ProfileLevelId.h:7
Definition RTPVideoHeader.h:12
Definition RtpParameters.h:7
Definition SdpParseError.h:7