在RFC3551中,可以看到关于rtp的payload type中,96 ~ 127属于动态设置范围;
一:video:
在webrtc中,逻辑部分是:
主要逻辑: 就是为之前创建的encoder设置相应的id值,codec.id = *payload_type;
supported_codecs_链表中的同一个encoder,不会重复计算,Don't add same codec twice.
// This is a helper function for GetSupportedCodecs below. It will append new
// unique codecs from |input_codecs| to |unified_codecs|. It will add default
// feedback params to the codecs and will also add an associated RTX codec for
// recognized codecs (VP8, VP9, H264, and RED).
static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs,
std::vector<VideoCodec>* unified_codecs) {
for (VideoCodec codec : input_codecs) {
const rtc::Optional<int> payload_type =
N