H.264 packetization types

在视频会议中 H264 的 NAL: Network Abstraction Layer 包类型基本上有三种 1) Single NAL unit 单个 NALU 2) STAP-A: Single Time Aggregation Packet 单时间聚合包 3) FU-A: Fragmentation Unit Packet 片段单元包 // The packetization types that we support: single, aggregated, and fragmented. enum H264PacketizationTypes { kH264SingleNalu, // This packet contains a single NAL unit. kH264StapA, // This packet contains […] →Read more

WebRTC Bandwidth Allocation

Title Bandwidth allocation by REMB ModuleRtpRtcpImpl->RTCPReceiver: IncomingPacket RTCPReceiver->RTCPReceiver: TriggerCallbacksFromRtcpPacket RTCPReceiver->RtpTransportControllerSend:OnReceivedEstimatedBitrate(bitrate) RtpTransportControllerSend->GoogCcNetworkController: OnRemoteBitrateReport(receiveTime, bitrate) GoogCcNetworkController->SendSideBandwidthEstimation: UpdateReceiverEstimate SendSideBandwidthEstimation->SendSideBandwidthEstimation: ApplyTargetLimits SendSideBandwidthEstimation->SendSideBandwidthEstimation: UpdateTargetBitrate #SendSideBandwidthEstimation->LinkCapacityTracker:OnRateUpdate GoogCcNetworkController->Call: OnTargetTransferRate Call->BitrateAllocator: OnNetworkEstimateChanged BitrateAllocator->BitrateAllocator: AllocateBitrates Snippets AllocateBitrates 带宽分配方法 std::map<BitrateAllocatorObserver*, int> AllocateBitrates( const std::vector<AllocatableTrack>& allocatable_tracks, uint32_t bitrate) { if (allocatable_tracks.empty()) return std::map<BitrateAllocatorObserver*, int>(); if (bitrate == 0) return ZeroRateAllocation(allocatable_tracks); uint32_t sum_min_bitrates = 0; uint32_t sum_max_bitrates […] →Read more

接收方带宽控制

从接收方控制带宽主要有两个方法, 也就是两种从接收方发送至发送方的 RTCP 消息 1) REMB 2) TMMBR REMB Receiver Estimated Max Bitrate (REMB) (draft-alvestrand-rmcat-remb) // Receiver Estimated Max Bitrate (REMB) (draft-alvestrand-rmcat-remb). // // 0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 […] →Read more

分析代码有方法

图 类图 UML class diagram 流程图 flow chat by graphviz 时序图 sequence diagram by websequence 表格 类责任与协作者表格 CRC table Class Responsiblity Collaborators 伪代码 核心算法最好用简化的伪代码来表示, 其实用化简过的 python 代码以 juypter notebook 形式阐述更好 示意图 用方框, 箭头, 圆圈加上注释可以将大多数概念性的交互都能大致说清楚 讲故事 作为什么角色, 想达成什么目标, 所以要做什么事, 能用暗喻, 类比以及引人入胜的故事把技术问题说明白,这是更高的境界, 融会贯通之后才能深入浅出 →Read more

2022-03-02

There is no excerpt because this is a protected post.

我的三六九原则

模式和框架应该简单,一旦有复杂化的迹象就需要做抽象和分解,核心要点限制在 3 点, 核心步骤限制在 6 步, 核心方法限制在 9 个. →Read more

boost asio note – Executors

Every asynchronous agent has an associated executor. An agent’s executor determines how the agent’s completion handlers are queued and ultimately run. 每个异步代理都有一个关联的执行器。 代理的执行者确定代理的完成处理程序如何排队并最终运行 Example uses of executors include: Coordinating a group of asynchronous agents that operate on shared data structures, ensuring that the agents’ completion handlers never run concurrently[5]. Ensuring that agents are run on […] →Read more

boost asio note 1 – asynchronous operation

An asynchronous operation is the basic unit of composition in the Boost.Asio asynchronous model. Asynchronous operations represent work that is launched and performed in the background, while the user’s code that initiated the work can continue with other things. Conceptually, the lifecycle of an asynchronous operation can be described in terms of the following events […] →Read more

boost asio note 2 – asynchronous agent

An asynchronous agent is a sequential composition of asynchronous operations. Every asynchronous operation is considered to run as a part of an asynchronous agent, even if that agent contains only that single operation. An asynchronous agent is an entity that may perform work concurrently with other agents. Asynchronous agents are to asynchronous operations as threads […] →Read more

Application Limitation Region Detector

@startuml struct AlrDetectorConfig { double bandwidth_usage_ratio = 0.65; double start_budget_level_ratio = 0.80; double stop_budget_level_ratio = 0.50; std::unique_ptr<StructParametersParser> Parser(); } class AlrDetector { void OnBytesSent(size_t bytes_sent, int64_t send_time_ms); void SetEstimatedBitrate(int bitrate_bps); absl::optional<int64_t> GetApplicationLimitedRegionStartTime() const; const AlrDetectorConfig conf_; absl::optional<int64_t> last_send_time_ms_; IntervalBudget alr_budget_; absl::optional<int64_t> alr_started_time_ms_; RtcEventLog* event_log_; } AlrDetectorConfig –o AlrDetector @enduml →Read more