线上用户遇到的问题,Failed to bind to the selected capture device。BindToObject的返回值为 800700c1。
暂时分析有两种可能
1、filter注册失败,这可以通过GraphStudio里的VideoCaptureSource来看。
2、360禁止,手动将360的严格模式打开,看看会不会有弹窗。
if (strncmp(tempDevicePathUTF8,
(const char*) deviceUniqueIdUTF8,
deviceUniqueIdUTF8Length) == 0)
{
// We have found the requested device
deviceFound = true;
hr = pM->BindToObject(0, 0, IID_IBaseFilter,
(void**) &captureFilter);
if FAILED(hr)
{
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture,
_id, "Failed to bind to the selected capture device %d",hr);
}
if (productUniqueIdUTF8
&& productUniqueIdUTF8Length > 0) // Get the device name
{
GetProductId(deviceUniqueIdUTF8,
productUniqueIdUTF8,
productUniqueIdUTF8Length);
}
}