/* * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
namespace cricket { using webrtc::FrameDecryptorInterface; using webrtc::FrameEncryptorInterface; using webrtc::FrameTransformerInterface; using webrtc::PendingTaskSafetyFlag; using webrtc::SafeTask; using webrtc::TaskQueueBase; using webrtc::VideoTrackInterface;
int MediaChannelUtil::SetOption(MediaChannelNetworkInterface::SocketType type,
rtc::Socket::Option opt, int option) { return transport_.SetOption(type, opt, option);
}
// Corresponds to the SDP attribute extmap-allow-mixed, see RFC8285. // Set to true if it's allowed to mix one- and two-byte RTP header extensions // in the same stream. The setter and getter must only be called from // worker_thread. void MediaChannelUtil::SetExtmapAllowMixed(bool extmap_allow_mixed) {
extmap_allow_mixed_ = extmap_allow_mixed;
}
// TODO(bugs.webrtc.org/11993): ModuleRtpRtcpImpl2 and related classes (e.g. // RTCPSender) aren't aware of the network thread and may trigger calls to // this function from different threads. Update those classes to keep // network traffic on the network thread. if (network_thread_->IsCurrent()) {
send();
} else {
network_thread_->PostTask(SafeTask(network_safety_, std::move(send)));
} returntrue;
}
int MediaChannelUtil::TransportForMediaChannels::SetOption(
MediaChannelNetworkInterface::SocketType type,
rtc::Socket::Option opt, int option) {
RTC_DCHECK_RUN_ON(network_thread_); return SetOptionLocked(type, opt, option);
}
int MediaChannelUtil::TransportForMediaChannels::SetOptionLocked(
MediaChannelNetworkInterface::SocketType type,
rtc::Socket::Option opt, int option) { if (!network_interface_) return -1; return network_interface_->SetOption(type, opt, option);
}
void MediaChannelUtil::TransportForMediaChannels::SetPreferredDscp(
rtc::DiffServCodePoint new_dscp) { if (!network_thread_->IsCurrent()) { // This is currently the common path as the derived channel classes // get called on the worker thread. There are still some tests though // that call directly on the network thread.
network_thread_->PostTask(SafeTask(
network_safety_, [this, new_dscp]() { SetPreferredDscp(new_dscp); })); return;
}
RTC_DCHECK_RUN_ON(network_thread_); if (new_dscp == preferred_dscp_) return;
preferred_dscp_ = new_dscp;
UpdateDscp();
}
} // namespace cricket
Messung V0.5
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.