webrtc 代码学习(二十七)video capture 设置

本文介绍了WebRTC中视频捕获的设置,包括创建视频源和选择理想格式的过程。在添加视频轨道时,会创建包含视频捕获的源。在选择格式时,通常会寻找最佳匹配,但为了给用户提供更多选择,可以在SDK客户端修改这一行为,允许用户控制所选格式,例如默认选择720P。
摘要由CSDN通过智能技术生成

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 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值