【发布时间】:2017-02-17 02:35:32
【问题描述】:
捕获设备有效,但绑定失败。 800703E8 通常表示过滤器未注册。 win10-64
if (SUCCEEDED(hr))
{
char tempDevicePathUTF8[256];
memset(tempDevicePathUTF8,0,256);
tempDevicePathUTF8[0] = 0;
WideCharToMultiByte(CP_UTF8, 0, varName.bstrVal, -1,
tempDevicePathUTF8,
sizeof(tempDevicePathUTF8), NULL,
NULL);
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);
}
}
}
这是 webrtc 中常见的捕获步骤,可以在大多数计算机上运行良好,但这个特定的不能。
【问题讨论】:
标签: c++ winapi com directshow