webrtc::VideoEncoderConfig
WebRtcVideoChannel::WebRtcVideoSendStream::CreateVideoEncoderConfig(
const VideoCodec& codec) const {
RTC_DCHECK_RUN_ON(&thread_checker_);
webrtc::VideoEncoderConfig encoder_config;
encoder_config.codec_type = webrtc::PayloadStringToCodecType(codec.name);
encoder_config.video_format =
webrtc::SdpVideoFormat(codec.name, codec.params);
bool is_screencast = parameters_.options.is_screencast.value_or(false);
if (is_screencast) {
encoder_config.min_transmit_bitrate_bps =
1000 * parameters_.options.screencast_min_bitrate_kbps.value_or(0);
encoder_config.content_type =
webrtc::VideoEncoderConfig::ContentType::kScreen;
} else {
encoder_config.min_transmit_bitrate_bps = 0;
encoder_config.content_type =
webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo;
}
// By default, the stream count for the codec configuration should match the
// number of negotiated ssrcs. But if the codec is blacklisted for simulcast
// or a screencast (and not in simulcast screenshare experiment), only
// configur
发送端两个sdp片段:SetLocalDescription,SetremoteDescription;SetLocalDescription:b=AS:600a=rtcp:9 IN IP4 0.0.0.0a=ice-ufrag:gY3Ka=ice-pwd:1HSgJcvP5SkTGcJ8uiixrdqea=ice-options:tricklea=fingerprint:sha-256 BC:7A:18:73:C5:BF:A3:9D:06:BC:13:A6:AC:99:0C:6B:BE:.