本文共 348 字,大约阅读时间需要 1 分钟。
先来张总体架构图吧,从官网拿的,根据这个图来分析下
A worker represents a mediasoup C++ subprocess that runs in a single CPU core and handles instances.
可以看到每个worker相当于一个sfu,核心转发逻辑是router,下面我们来分析下这个router
A router enables injection, selection and forwarding of media streams through instances created on it.
router维护了订阅关系:mapProducerConsumer。当producer有数据过来会直接转发给订阅它的consumer
转载地址:http://riprj.baihongyu.com/