video capture 设置
作者:LanPZzzz
文章目录
1. video capture 创建,在Add Video Track 时需要创建video source,里面就是video capture,这里就不再重复创建的过程了
2. video capture 在选择format 的时候是查看最理想的一个,查看代码
\pc\videocapturertracksource.cc 354
format_ = GetBestCaptureFormat(formats);
// Find the format that best matches the default video size.
// Constraints are optional and since the performance of a video call
// might be bad due to bitrate limitations, CPU, and camera performance,
// it is better to select a resolution that is as close as possible to our
// default and still meets the contraints.
const cricket::VideoFormat& GetBestCaptureFormat(
const std::vector<cricket::VideoFormat>& formats) {
RTC_DCHECK(formats.size() > 0);
int