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
108MCAPI bool
109AV1IsSameProfile(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&);
110
111MCAPI char const* AdapterTypeToStatsType(::rtc::AdapterType);
112
113MCAPI void AddAudioAttribute(::std::string const&, ::std::string_view, ::cricket::MediaContentDescription*);
114
115MCAPI void AddFeedbackParameter(::cricket::FeedbackParam const&, ::cricket::Codec*);
116
117MCAPI void AddFeedbackParameters(::cricket::FeedbackParams const&, ::cricket::Codec*);
118
119MCAPI void AddFmtpLine(::cricket::Codec const&, ::std::string*);
120
121MCAPI void AddOrReplaceCodec(::cricket::MediaContentDescription*, ::cricket::Codec const&);
122
123MCAPI void AddPacketizationLine(::cricket::Codec const&, ::std::string*);
124
125MCAPI void AddParameters(::std::map<::std::string, ::std::string> const&, ::cricket::Codec*);
126
127MCAPI void AddRtcpFbLines(::cricket::Codec const&, ::std::string*);
128
129MCAPI void AlignedFree(void*);
130
131MCAPI void* AlignedMalloc(uint64, uint64);
132
133MCAPI char const* CodecTypeToPayloadString(::webrtc::VideoCodecType);
134
135MCAPI ::webrtc::TimeDelta CompactNtpRttToTimeDelta(uint);
136
137MCAPI ::std::unique_ptr<::webrtc::TaskQueueFactory> CreateDefaultTaskQueueFactory(::webrtc::FieldTrialsView const*);
138
139MCAPI ::webrtc::IceCandidateInterface*
140CreateIceCandidate(::std::string const&, int, ::std::string const&, ::webrtc::SdpParseError*);
141
142MCAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
143CreateSessionDescription(::webrtc::SdpType, ::std::string const&);
144
145MCAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
146CreateSessionDescription(::webrtc::SdpType, ::std::string const&, ::webrtc::SdpParseError*);
147
148MCAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
149CreateSessionDescription(::webrtc::SdpType, ::std::string const&, ::std::string const&, ::std::unique_ptr<::cricket::SessionDescription>);
150
151MCAPI ::std::unique_ptr<::webrtc::TaskQueueFactory> CreateTaskQueueStdlibFactory();
152
153MCAPI void
154CreateTrackWithNoSsrcs(::std::vector<::std::string> const&, ::std::string_view, ::std::vector<::cricket::RidDescription> const&, ::std::vector<::cricket::StreamParams>*);
155
156MCAPI void CreateTracksFromSsrcInfos(
157 ::std::vector<::webrtc::SsrcInfo> const&,
158 ::std::vector<::std::string> const&,
159 ::std::string_view,
160 ::std::vector<::cricket::StreamParams>*,
161 int
162);
163
164MCAPI ::cricket::Codec GetCodecWithPayloadType(::cricket::MediaType, ::std::vector<::cricket::Codec> const&, int);
165
166MCAPI bool GetDtmfCode(char, int*);
167
168MCAPI ::std::string GetLegacyCandidateTypeName(::cricket::Candidate const&);
169
170MCAPI void GetMediaStreamIds(::cricket::ContentInfo const*, ::std::set<::std::string>*);
171
172MCAPI bool GetMinValue(::std::vector<int> const&, int*);
173
174MCAPI bool GetParameter(::std::string const&, ::std::map<::std::string, ::std::string> const&, int*);
175
176MCAPI uint64 GetRightAlign(uint64, uint64);
177
178MCAPI ::std::vector<::std::string const*> GetStatsReferencedIds(::webrtc::RTCStats const&);
179
180MCAPI void
181H264GenerateProfileLevelIdForAnswer(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string>*);
182
183MCAPI bool
184H264IsSameProfile(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&);
185
186MCAPI ::std::optional<::std::string> H264ProfileLevelIdToString(::webrtc::H264ProfileLevelId const&);
187
188MCAPI bool HasDuplicateMsidLines(::cricket::SessionDescription*);
189
190MCAPI char const* IceCandidateTypeToStatsType(::cricket::Candidate const&);
191
192MCAPI ::std::string_view IceCandidateTypeToString(::webrtc::IceCandidateType);
193
194MCAPI ::webrtc::RTCError
195InvokeSetParametersCallback(::absl::AnyInvocable<void(::webrtc::RTCError) &&>&, ::webrtc::RTCError);
196
197MCAPI bool IsFmtpParam(::std::string_view);
198
199MCAPI bool IsLegalRsidName(::std::string_view);
200
201MCAPI bool IsMandatoryHeaderExtension(::std::string const&);
202
203MCAPI bool IsNewerSequenceNumber(ushort, ushort);
204
205MCAPI bool IsOpenMessage(::rtc::CopyOnWriteBuffer const&);
206
207MCAPI bool IsRtcpPacket(::rtc::ArrayView<uchar const>);
208
209MCAPI bool IsRtpPacket(::rtc::ArrayView<uchar const>);
210
211MCAPI bool IsTokenChar(char);
212
213MCAPI int Leb128Size(uint64);
214
215MCAPI void MaybeCreateStaticPayloadAudioCodecs(::std::vector<int> const&, ::cricket::MediaContentDescription*);
216
217MCAPI bool ParseCandidate(::std::string_view, ::cricket::Candidate*, ::webrtc::SdpParseError*, bool);
218
219MCAPI bool ParseConnectionData(::std::string_view, ::rtc::SocketAddress*, ::webrtc::SdpParseError*);
220
221MCAPI bool ParseDataChannelOpenAckMessage(::rtc::CopyOnWriteBuffer const&);
222
223MCAPI bool ParseDataChannelOpenMessage(::rtc::CopyOnWriteBuffer const&, ::std::string*, ::webrtc::DataChannelInit*);
224
225MCAPI void ParseFieldTrial(::std::initializer_list<::webrtc::FieldTrialParameterInterface*>, ::std::string_view);
226
227MCAPI ::std::optional<::webrtc::H264ProfileLevelId> ParseH264ProfileLevelId(char const*);
228
229MCAPI ::webrtc::RTCError
230ParseIceServersOrError(::std::vector<::webrtc::PeerConnectionInterface::IceServer> const&, ::std::set<::rtc::SocketAddress>*, ::std::vector<::cricket::RelayServerConfig>*);
231
232MCAPI ushort ParseRtpSequenceNumber(::rtc::ArrayView<uchar const>);
233
234MCAPI uint ParseRtpSsrc(::rtc::ArrayView<uchar const>);
235
236MCAPI bool ParseSctpMaxMessageSize(::std::string_view, int*, ::webrtc::SdpParseError*);
237
238MCAPI bool ParseSctpPort(::std::string_view, int*, ::webrtc::SdpParseError*);
239
240MCAPI ::std::optional<::webrtc::AV1Profile> ParseSdpForAV1Profile(::std::map<::std::string, ::std::string> const&);
241
242MCAPI ::std::optional<::webrtc::H264ProfileLevelId>
243ParseSdpForH264ProfileLevelId(::std::map<::std::string, ::std::string> const&);
244
245MCAPI ::std::optional<::webrtc::VP9Profile> ParseSdpForVP9Profile(::std::map<::std::string, ::std::string> const&);
246
247MCAPI ::webrtc::VideoCodecType PayloadStringToCodecType(::std::string const&);
248
249MCAPI ::std::optional<::cricket::Codec> PopWildcardCodec(::std::vector<::cricket::Codec>*);
250
251MCAPI int ResolveHostname(::std::string_view, int, ::std::vector<::rtc::IPAddress>&);
252
253MCAPI ::std::vector<uchar> RtpDescriptorAuthentication(::webrtc::RTPVideoHeader const&);
254
255MCAPI int
257
258MCAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionFromSendRecv(bool, bool);
259
260MCAPI bool RtpTransceiverDirectionHasRecv(::webrtc::RtpTransceiverDirection);
261
262MCAPI bool RtpTransceiverDirectionHasSend(::webrtc::RtpTransceiverDirection);
263
264MCAPI ::webrtc::RtpTransceiverDirection
265 RtpTransceiverDirectionIntersection(::webrtc::RtpTransceiverDirection, ::webrtc::RtpTransceiverDirection);
266
267MCAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionReversed(::webrtc::RtpTransceiverDirection);
268
269MCAPI char const* RtpTransceiverDirectionToString(::webrtc::RtpTransceiverDirection);
270
271MCAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionWithRecvSet(::webrtc::RtpTransceiverDirection, bool);
272
273MCAPI ::absl::AnyInvocable<void() &&>
275
276MCAPI ::std::string_view ScalabilityModeToString(::webrtc::ScalabilityMode);
277
278MCAPI bool SdpDeserialize(::std::string_view, ::webrtc::JsepSessionDescription*, ::webrtc::SdpParseError*);
279
280MCAPI bool SdpDeserializeCandidate(::std::string_view, ::webrtc::JsepIceCandidate*, ::webrtc::SdpParseError*);
281
282MCAPI ::std::string SdpSerialize(::webrtc::JsepSessionDescription const&);
283
284MCAPI ::std::string SdpSerializeCandidate(::cricket::Candidate const&);
285
286MCAPI ::std::string SdpSerializeCandidate(::webrtc::IceCandidateInterface const&);
287
288MCAPI ::std::optional<::webrtc::SdpType> SdpTypeFromString(::std::string const&);
289
290MCAPI char const* SdpTypeToString(::webrtc::SdpType);
291
292MCAPI ::std::optional<::webrtc::AV1Profile> StringToAV1Profile(::std::string_view);
293
294MCAPI ::std::optional<::webrtc::VP9Profile> StringToVP9Profile(::std::string const&);
295
296MCAPI ::webrtc::scoped_refptr<::webrtc::RTCStatsReport>
297TakeReferencedStats(::webrtc::scoped_refptr<::webrtc::RTCStatsReport>, ::std::vector<::std::string> const&);
298
299MCAPI ::std::optional<::webrtc::RtcpFeedback> ToRtcpFeedback(::cricket::FeedbackParam const&);
300
301MCAPI ::webrtc::RtpCapabilities
302ToRtpCapabilities(::std::vector<::cricket::Codec> const&, ::std::vector<::webrtc::RtpExtension> const&);
303
304MCAPI ::webrtc::RtpCodecCapability ToRtpCodecCapability(::cricket::Codec const&);
305
306MCAPI ::std::string_view ToString(::webrtc::RTCErrorType);
307
308MCAPI ::std::string ToString(::webrtc::DataRate);
309
310MCAPI ::std::string ToString(::webrtc::TimeDelta);
311
312MCAPI ::std::string ToString(::webrtc::DataSize);
313
314MCAPI ::std::string ToString(::webrtc::Timestamp);
315
316MCAPI bool UnimplementedRtpParameterHasValue(::webrtc::RtpParameters const&);
317
318MCAPI void UpdateCodec(::cricket::MediaContentDescription*, int, ::std::map<::std::string, ::std::string> const&);
319
320MCAPI void UpdateCodec(::cricket::MediaContentDescription*, int, ::cricket::FeedbackParam const&);
321
322MCAPI void UpdateCodec(int, ::std::string_view, ::cricket::MediaContentDescription*);
323
324MCAPI void UpdateCodec(int, ::std::string_view, int, int, uint64, ::cricket::MediaContentDescription*);
325
326MCAPI void UpdateFromWildcardCodecs(::cricket::MediaContentDescription*);
327
328MCAPI void
329UpdateRtpHeaderExtensionPreferencesFromSdpMunging(::cricket::SessionDescription const*, ::webrtc::TransceiverList*);
330
331MCAPI void UpdateVideoCodecPacketization(::cricket::MediaContentDescription*, int, ::std::string_view);
332
333MCAPI bool
334VP9IsSameProfile(::std::map<::std::string, ::std::string> const&, ::std::map<::std::string, ::std::string> const&);
335
336MCAPI bool ValidAlignment(uint64);
337
338MCAPI void WriteDataChannelOpenAckMessage(::rtc::CopyOnWriteBuffer*);
339
340MCAPI bool
341WriteDataChannelOpenMessage(::std::string const&, ::std::string const&, ::std::optional<::webrtc::Priority>, bool, ::std::optional<int>, ::std::optional<int>, ::rtc::CopyOnWriteBuffer*);
342
343MCAPI void WriteFmtpHeader(int, ::rtc::StringBuilder*);
344
345MCAPI void WriteFmtpParameter(::std::string_view, ::std::string_view, ::rtc::StringBuilder*);
346
347MCAPI bool WriteFmtpParameters(::std::map<::std::string, ::std::string> const&, ::rtc::StringBuilder*);
348
349MCAPI int WriteLeb128(uint64, uchar*);
350
351MCAPI void WritePacketizationHeader(int, ::rtc::StringBuilder*);
352
353MCAPI void WriteRtcpFbHeader(int, ::rtc::StringBuilder*);
354
355MCAPI bool operator!=(::webrtc::scoped_refptr<::webrtc::VideoFrameBuffer> const&, nullptr_t);
356
357MCAPI bool operator!=(::webrtc::scoped_refptr<::rtc::RTCCertificate> const&, nullptr_t);
358
359MCAPI bool operator!=(::webrtc::scoped_refptr<::webrtc::PendingTaskSafetyFlag> const&, nullptr_t);
360
361MCAPI bool
363
364MCAPI bool
366
367MCAPI bool
369
370MCAPI bool
372
373MCAPI bool
375
376MCAPI bool
378
379MCAPI bool
381
382MCAPI bool operator==(::webrtc::scoped_refptr<::webrtc::VideoFrameBuffer> const&, nullptr_t);
383
384MCAPI bool operator==(::webrtc::scoped_refptr<::rtc::RTCCertificate> const&, nullptr_t);
385
386MCAPI bool
388
389MCAPI bool operator==(::webrtc::scoped_refptr<::webrtc::PendingTaskSafetyFlag> const&, nullptr_t);
390
391MCAPI bool
393// NOLINTEND
394
395// static variables
396// NOLINTBEGIN
397MCAPI ::std::add_lvalue_reference_t<char const[]> kBweTypeHistogram();
398
399MCAPI ::webrtc::DataRate const& kCongestionControllerMinBitrate();
400
401MCAPI double const& kDefaultBitratePriority();
402
403MCAPI ::std::add_lvalue_reference_t<char const[]> kVP9FmtpProfileId();
404// NOLINTEND
405
406} // 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:238
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