3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/external/absl/AnyInvocable.h"
7#include "mc/external/cricket/MediaType.h"
8#include "mc/external/webrtc/AV1Profile.h"
9#include "mc/external/webrtc/IceCandidateType.h"
10#include "mc/external/webrtc/PeerConnectionInterface.h"
11#include "mc/external/webrtc/Priority.h"
12#include "mc/external/webrtc/RTCErrorDetailType.h"
13#include "mc/external/webrtc/RTCErrorType.h"
14#include "mc/external/webrtc/RtpTransceiverDirection.h"
15#include "mc/external/webrtc/ScalabilityMode.h"
16#include "mc/external/webrtc/SdpType.h"
17#include "mc/external/webrtc/VP9Profile.h"
18#include "mc/external/webrtc/VideoCodecType.h"
19#include "mc/external/webrtc/scoped_refptr.h"
28namespace cricket {
struct Codec; }
70 KMaxEncoderBuffers = 8,
74 KMaxPreferredPixelFormats = 5,
78 KMaxSimulcastStreams = 3,
82 KMaxSpatialLayers = 5,
86 KMaxTemporalStreams = 4,
95MCNAPI
bool AV1IsSameProfile(
96 ::std::map<::std::string, ::std::string>
const& params1,
97 ::std::map<::std::string, ::std::string>
const& params2
101AddAudioAttribute(::std::string
const& name, ::std::string_view value, ::cricket::MediaContentDescription* desc);
103MCNAPI
void AddFmtpLine(::cricket::Codec
const& codec, ::std::string* message);
105MCNAPI
void AddOrReplaceCodec(::cricket::MediaContentDescription* content_desc, ::cricket::Codec
const& codec);
107MCNAPI
void AddPacketizationLine(::cricket::Codec
const& codec, ::std::string* message);
109MCNAPI
void AddRtcpFbLines(::cricket::Codec
const& codec, ::std::string* message);
111MCNAPI
void AlignedFree(
void* mem_block);
113MCNAPI
void* AlignedMalloc(uint64 size, uint64 alignment);
115MCNAPI
char const* CodecTypeToPayloadString(::webrtc::VideoCodecType type);
117MCNAPI ::webrtc::TimeDelta CompactNtpRttToTimeDelta(uint compact_ntp_interval);
119MCNAPI ::std::unique_ptr<::webrtc::TaskQueueFactory>
120CreateDefaultTaskQueueFactory(::webrtc::FieldTrialsView
const* field_trials);
122MCNAPI ::webrtc::IceCandidateInterface* CreateIceCandidate(
123 ::std::string
const& sdp_mid,
125 ::std::string
const& sdp,
126 ::webrtc::SdpParseError* error
129MCNAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
130CreateSessionDescription(::webrtc::SdpType type, ::std::string
const& sdp);
132MCNAPI ::std::unique_ptr<::webrtc::SessionDescriptionInterface>
133CreateSessionDescription(::webrtc::SdpType type, ::std::string
const& sdp, ::webrtc::SdpParseError* error_out);
135MCNAPI ::std::unique_ptr<::webrtc::TaskQueueFactory> CreateTaskQueueStdlibFactory();
137MCNAPI
void CreateTrackWithNoSsrcs(
138 ::std::vector<::std::string>
const& msid_stream_ids,
139 ::std::string_view msid_track_id,
140 ::std::vector<::cricket::RidDescription>
const& rids,
141 ::std::vector<::cricket::StreamParams>* tracks
144MCNAPI
void CreateTracksFromSsrcInfos(
145 ::std::vector<::webrtc::SsrcInfo>
const& ssrc_infos,
146 ::std::vector<::std::string>
const& msid_stream_ids,
147 ::std::string_view msid_track_id,
148 ::std::vector<::cricket::StreamParams>* tracks,
152MCNAPI ::cricket::Codec
153GetCodecWithPayloadType(::cricket::MediaType type, ::std::vector<::cricket::Codec>
const& codecs,
int payload_type);
155MCNAPI
void GetMediaStreamIds(::cricket::ContentInfo
const* content, ::std::set<::std::string>* labels);
157MCNAPI
bool GetParameter(::std::string
const& name, ::std::map<::std::string, ::std::string>
const& params,
int* value);
159MCNAPI ::std::vector<::std::string const*> GetStatsReferencedIds(::webrtc::RTCStats
const& stats);
161MCNAPI
void H264GenerateProfileLevelIdForAnswer(
162 ::std::map<::std::string, ::std::string>
const& local_supported_params,
163 ::std::map<::std::string, ::std::string>
const& remote_offered_params,
164 ::std::map<::std::string, ::std::string>* answer_params
167MCNAPI
bool H264IsSameProfile(
168 ::std::map<::std::string, ::std::string>
const& params1,
169 ::std::map<::std::string, ::std::string>
const& params2
172MCNAPI ::std::optional<::std::string> H264ProfileLevelIdToString(::webrtc::H264ProfileLevelId
const& profile_level_id);
174MCNAPI
bool HasDuplicateMsidLines(::cricket::SessionDescription* desc);
176MCNAPI ::std::string_view IceCandidateTypeToString(::webrtc::IceCandidateType type);
178MCNAPI ::webrtc::RTCError
179InvokeSetParametersCallback(::absl::AnyInvocable<
void(::webrtc::RTCError) &&>& callback, ::webrtc::RTCError error);
181MCNAPI
bool IsLegalRsidName(::std::string_view name);
183MCNAPI
bool IsNewerSequenceNumber(ushort sequence_number, ushort prev_sequence_number);
185MCNAPI
bool IsOpenMessage(::rtc::CopyOnWriteBuffer
const& payload);
187MCNAPI
bool IsRtcpPacket(::rtc::ArrayView<uchar const> packet);
189MCNAPI
bool IsRtpPacket(::rtc::ArrayView<uchar const> packet);
191MCNAPI
int Leb128Size(uint64 value);
194MaybeCreateStaticPayloadAudioCodecs(::std::vector<int>
const& fmts, ::cricket::MediaContentDescription* media_desc);
196MCNAPI
bool ParseCandidate(
197 ::std::string_view message,
198 ::cricket::Candidate* candidate,
199 ::webrtc::SdpParseError* error,
203MCNAPI
bool ParseConnectionData(::std::string_view line, ::rtc::SocketAddress* addr, ::webrtc::SdpParseError* error);
205MCNAPI
bool ParseDataChannelOpenAckMessage(::rtc::CopyOnWriteBuffer
const& payload);
207MCNAPI
bool ParseDataChannelOpenMessage(
208 ::rtc::CopyOnWriteBuffer
const& payload,
209 ::std::string* label,
210 ::webrtc::DataChannelInit* config
213MCNAPI
void ParseFieldTrial(
214 ::std::initializer_list<::webrtc::FieldTrialParameterInterface*> fields,
215 ::std::string_view trial_string
218MCNAPI ::webrtc::RTCError ParseIceServersOrError(
219 ::std::vector<::webrtc::PeerConnectionInterface::IceServer>
const& servers,
220 ::std::set<::rtc::SocketAddress>* stun_servers,
221 ::std::vector<::cricket::RelayServerConfig>* turn_servers
224MCNAPI ushort ParseRtpSequenceNumber(::rtc::ArrayView<uchar const> rtp_packet);
226MCNAPI uint ParseRtpSsrc(::rtc::ArrayView<uchar const> rtp_packet);
228MCNAPI
bool ParseSctpMaxMessageSize(::std::string_view line,
int* max_message_size, ::webrtc::SdpParseError* error);
230MCNAPI
bool ParseSctpPort(::std::string_view line,
int* sctp_port, ::webrtc::SdpParseError* error);
232MCNAPI ::std::optional<::webrtc::AV1Profile>
233ParseSdpForAV1Profile(::std::map<::std::string, ::std::string>
const& params);
235MCNAPI ::std::optional<::webrtc::H264ProfileLevelId>
236ParseSdpForH264ProfileLevelId(::std::map<::std::string, ::std::string>
const& params);
238MCNAPI ::std::optional<::webrtc::VP9Profile>
239ParseSdpForVP9Profile(::std::map<::std::string, ::std::string>
const& params);
241MCNAPI ::webrtc::VideoCodecType PayloadStringToCodecType(::std::string
const& name);
243MCNAPI
int ResolveHostname(::std::string_view hostname,
int family, ::std::vector<::rtc::IPAddress>& addresses);
245MCNAPI ::std::vector<uchar> RtpDescriptorAuthentication(::webrtc::RTPVideoHeader
const& rtp_video_header);
247MCNAPI
int RtpHeaderExtensionSize(
248 ::rtc::ArrayView<::webrtc::RtpExtensionSize const> extensions,
249 ::webrtc::RtpHeaderExtensionMap
const& registered_extensions
252MCNAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionFromSendRecv(
bool send,
bool recv);
254MCNAPI
bool RtpTransceiverDirectionHasRecv(::webrtc::RtpTransceiverDirection direction);
256MCNAPI
bool RtpTransceiverDirectionHasSend(::webrtc::RtpTransceiverDirection direction);
258MCNAPI ::webrtc::RtpTransceiverDirection
259RtpTransceiverDirectionIntersection(::webrtc::RtpTransceiverDirection lhs, ::webrtc::RtpTransceiverDirection rhs);
261MCNAPI ::webrtc::RtpTransceiverDirection RtpTransceiverDirectionReversed(::webrtc::RtpTransceiverDirection direction);
263MCNAPI
char const* RtpTransceiverDirectionToString(::webrtc::RtpTransceiverDirection direction);
265MCNAPI ::webrtc::RtpTransceiverDirection
266RtpTransceiverDirectionWithRecvSet(::webrtc::RtpTransceiverDirection direction,
bool recv);
268MCNAPI ::absl::AnyInvocable<void() &&>
269SafeTask(::webrtc::scoped_refptr<::webrtc::PendingTaskSafetyFlag> flag, ::absl::AnyInvocable<
void() &&> task);
271MCNAPI ::std::string_view ScalabilityModeToString(::webrtc::ScalabilityMode scalability_mode);
274SdpDeserialize(::std::string_view message, ::webrtc::JsepSessionDescription* jdesc, ::webrtc::SdpParseError* error);
276MCNAPI
bool SdpDeserializeCandidate(
277 ::std::string_view message,
278 ::webrtc::JsepIceCandidate* jcandidate,
279 ::webrtc::SdpParseError* error
282MCNAPI ::std::string SdpSerialize(::webrtc::JsepSessionDescription
const& jdesc);
284MCNAPI ::std::string SdpSerializeCandidate(::cricket::Candidate
const& candidate);
286MCNAPI ::std::string SdpSerializeCandidate(::webrtc::IceCandidateInterface
const& candidate);
288MCNAPI ::std::optional<::webrtc::SdpType> SdpTypeFromString(::std::string
const& type_str);
290MCNAPI
char const* SdpTypeToString(::webrtc::SdpType type);
292MCNAPI ::webrtc::scoped_refptr<::webrtc::RTCStatsReport>
293TakeReferencedStats(::webrtc::scoped_refptr<::webrtc::RTCStatsReport> report, ::std::vector<::std::string>
const& ids);
295MCNAPI ::std::optional<::webrtc::RtcpFeedback> ToRtcpFeedback(::cricket::FeedbackParam
const& cricket_feedback);
297MCNAPI ::webrtc::RtpCapabilities ToRtpCapabilities(
298 ::std::vector<::cricket::Codec>
const& cricket_codecs,
299 ::std::vector<::webrtc::RtpExtension>
const& cricket_extensions
302MCNAPI ::webrtc::RtpCodecCapability ToRtpCodecCapability(::cricket::Codec
const& cricket_codec);
304MCNAPI ::std::string ToString(::webrtc::DataRate value);
306MCNAPI ::std::string ToString(::webrtc::DataSize value);
308MCNAPI ::std::string ToString(::webrtc::TimeDelta value);
310MCNAPI ::std::string ToString(::webrtc::Timestamp value);
312MCNAPI ::std::string_view ToString(::webrtc::RTCErrorDetailType error);
314MCNAPI ::std::string_view ToString(::webrtc::RTCErrorType error);
316MCNAPI
bool UnimplementedRtpParameterHasValue(::webrtc::RtpParameters
const& parameters);
318MCNAPI
void UpdateFromWildcardCodecs(::cricket::MediaContentDescription* desc);
320MCNAPI
void UpdateRtpHeaderExtensionPreferencesFromSdpMunging(
321 ::cricket::SessionDescription
const* description,
322 ::webrtc::TransceiverList* transceivers
325MCNAPI
bool VP9IsSameProfile(
326 ::std::map<::std::string, ::std::string>
const& params1,
327 ::std::map<::std::string, ::std::string>
const& params2
330MCNAPI
void WriteDataChannelOpenAckMessage(::rtc::CopyOnWriteBuffer* payload);
332MCNAPI
bool WriteDataChannelOpenMessage(
333 ::std::string
const& label,
334 ::std::string
const& protocol,
335 ::std::optional<::webrtc::Priority> opt_priority,
337 ::std::optional<int> max_retransmits,
338 ::std::optional<int> max_retransmit_time,
339 ::rtc::CopyOnWriteBuffer* payload
342MCNAPI
bool WriteFmtpParameters(::std::map<::std::string, ::std::string>
const& parameters, ::rtc::StringBuilder* os);
344MCNAPI
int WriteLeb128(uint64 value, uchar* buffer);
346MCNAPI
bool operator==(::webrtc::FrameDependencyStructure
const& lhs, ::webrtc::FrameDependencyStructure
const& rhs);
351MCNAPI ::std::add_lvalue_reference_t<char const[]> kBweTypeHistogram();
353MCNAPI
double const& kDefaultBitratePriority();
355MCNAPI ::std::add_lvalue_reference_t<char const[]> kVP9FmtpProfileId();
Definition Candidate.h:15
Definition ContentInfo.h:12
Definition FeedbackParam.h:7
Definition MediaContentDescription.h:19
Definition SessionDescription.h:18
Definition CopyOnWriteBuffer.h:11
Definition SocketAddress.h:12
Definition StringBuilder.h:7
Definition FieldTrialParameterInterface.h:7
Definition FieldTrialsView.h:7
Definition IceCandidateInterface.h:12
Definition JsepIceCandidate.h:15
Definition JsepSessionDescription.h:19
Definition PendingTaskSafetyFlag.h:16
Definition RTCStatsReport.h:17
Definition SessionDescriptionInterface.h:18
Definition TaskQueueFactory.h:13
Definition TimeDelta.h:10
Definition Timestamp.h:15
Definition TransceiverList.h:18
Definition RelayServerConfig.h:15
Definition RidDescription.h:10
Definition StreamParams.h:12
Definition DataChannelInit.h:7
Definition FrameDependencyStructure.h:7
Definition H264ProfileLevelId.h:7
Definition RtcpFeedback.h:11
Definition RtpCapabilities.h:7
Definition RtpCodecCapability.h:10
Definition RtpExtensionSize.h:7
Definition RtpExtension.h:7
Definition RtpParameters.h:7
Definition SdpParseError.h:7