DTLS handshake

DTLS record header DTLS Header Field Purpose 8-bit Message Type This field contains the type of DTLS record being sent. Valid types are as follows:- ChangeCipherSpec: 0x14- Alert: 0x15- Handshake: 0x16- Application Data: 0x17 16-bit Protocol Version This field contains the DTLS protocol version. Valid values are as follows:- DTLS 1.1: 0xFEFD 16-bit Epoch This […] →Read more

10 Tips for Working at Home Like a Pro BY HELEN GALL

top 10 tips to help keep you productive and sane. Set a schedule and stick to it. This will help you maintain work-life balance; otherwise, you might find that you’re suddenly working longer hours than usual. Create a daily routine. Get ready for work the same way you do when you’re going to the office, […] →Read more

WebRTC’s data channel uses dcSCTP instead of usrSCTP

Feautre https://bugs.chromium.org/p/webrtc/issues/detail?id=12614 Message Starting with Chrome M95 for the Canary and Dev channels, we’re going to start to rollout the DcSCTP library for the SCTP transport used by WebRTC’s Data Channels. It is a new implementation with a focus on security and compatibility with the previous implementation. No action should be required on your part […] →Read more

线程切换的经典模式

以 WebRTC library 为例,这两百行代码演示了线程切换的经典模式。 一个线程会有一个对应的任务队列,线程会不断检查这个队列,如果有任务就执行,无任务就等待 往这个任务队列中提交一个任务,就等于从当前线程切换了到了这个任务线程。 当然这个实现方面还是有些细节, 为了线程安全,GetNextTask 时需要加锁 /* * Copyright 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 […] →Read more

How to disable SRTP in WebRTC library

Take peerconnection_client as example webrtc::PeerConnectionFactoryInterface::Options options; options.disable_encryption = this->disable_srtp_; peer_connection_factory_->SetOptions(options); step 1 change C:\webrtc-checkout\src\examples\peerconnection\client\flag_defs.h ABSL_FLAG(bool, disable_srtp, false, "disable srtp or not: false-enable srtp, true-disable srtp"); step 2 change C:\webrtc-checkout\src\examples\peerconnection\client\conductor.h class Conductor : public webrtc::PeerConnectionObserver, public webrtc::CreateSessionDescriptionObserver, public PeerConnectionClientObserver, public MainWndCallback { public: void DisableSrtp(bool flag); bool disable_srtp_; }; void Conductor::DisableSrtp(bool flag) { this->disable_srtp_ = flag; […] →Read more

How to get media stats from peer connection

Take Peerconection_client as example step 1 class RtcStatsRecorder : public webrtc::RTCStatsCollectorCallback { public: void OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report) override; }; step 2 void RtcStatsRecorder::OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report) { RTC_LOG(LS_INFO) << report.ToJson() << endl; } →Read more

WebRTC 源码阅读笔记之 TrendlineEstimator

Trendline 趋势线估算器所实现的接口称为 DelayIncreaseDetectorInterface, 意谓延迟增长检测器. 每一个反馈的 PacketResult 都会用来更新这个趋势线, 这个趋势线的斜率反应了网络延迟的变化, 可以从趋势线的斜率和自适应的阈值可能得出带宽的使用状况: kBwNormal: 带宽使用正常 kBwUnderusing: 带宽使用不足 kBwOverusing: 带宽使用过度 class TrendlineEstimator : public DelayIncreaseDetectorInterface { public: TrendlineEstimator(const WebRtcKeyValueConfig* key_value_config, NetworkStatePredictor* network_state_predictor); ~TrendlineEstimator() override; /* * 用新的采样来更新估算器, 这个 delta 是指包组中第一个包和最后一个包之间的发送时间,或接收时间差 * Update the estimator with a new sample. The deltas should represent deltas * between timestamp groups as defined by […] →Read more

What is CPaaS

What is CPaaS CPaaS (Communications Platform as a Service) is a cloud-based, programmable multichannel communications platform that enables developers to customize and build on existing applications and software. CPaaS offers turnkey communications capabilities such as voice calls, SMS messaging, video conferencing, and more that programmers can add to their software without the need for additional […] →Read more

WebRTC Peer Connection Example – Server

Overview 启动了一个 peerconnection server,也就是一个简单的 web server 用来在两个 client 之间交换信令,比如 SDP, ICE candidate 启动了两个 peerconnection client, 直接连接进行音频和视频媒体数据的传输 Windows peerconnection example peerconnection server server 比较简单,启动一个 HTTP server, 接受 client 的连接, 将接收的数据在 client 之间进行交换 两个 client 都连接到 server 上, 发送 HTTP 请求 /signin , server 把它作为一个成员(ChannelMember)加到内存中的成员列表中(PeerChannel.members) 这里有一个蹩脚的设计, 由于 server 提供的是 Http 服务,它不会主动发起请求到 client 总是等 client 来要数据(/wait),server 发现有消息缓存在内部队列(ChannelMember.queue_)中,它才把消息以 HTTP […] →Read more

WebRTC 源码阅读笔记之AcknowledgedBitrateEstimator

AcknowledgedBitrateEstimatorInterface 确认的比特率估算器接口 class AcknowledgedBitrateEstimatorInterface { public: static std::unique_ptr<AcknowledgedBitrateEstimatorInterface> Create( const WebRtcKeyValueConfig* key_value_config); virtual ~AcknowledgedBitrateEstimatorInterface(); virtual void IncomingPacketFeedbackVector( const std::vector<PacketResult>& packet_feedback_vector) = 0; virtual absl::optional<DataRate> bitrate() const = 0; virtual absl::optional<DataRate> PeekRate() const = 0; virtual void SetAlr(bool in_alr) = 0; virtual void SetAlrEndedTime(Timestamp alr_ended_time) = 0; }; AcknowledgedBitrateEstimator 确认的比特率估算器 class AcknowledgedBitrateEstimator : public AcknowledgedBitrateEstimatorInterface { […] →Read more