Mr. Fantastic
New member
BACKGROUND
I am attempting to use the NDI Virtual Input with Windows Media Foundation, but it refuses to work because of an easily reproducible and consistent failure when attempting to open the virtual input as a web cam.
I would like to know if this is a known bug and if you plan to fix it.
The same code in my app works well with all standard web cams and other video input devices. I've supplied a code snippet from my app below, but the bug is also reproducible using Microsoft sample code.
Note that I am working with the latest version of NewTek Virtual Input, downloaded two days ago.
Thanks in advance for whatever guidance you can offer.
Best Wishes,
Mark
DETAIL
After creating a media session, I use the following code to create the video capture source from the NewTek Virtual Input
This code works well with every webcam I've tested. But when attempting to open the NewTek Virtual Input, MFCreateDeviceSource consistently returns the following error:
ERROR_ARIRTMETIC_OVERFLOW: Arithmetic Result Exceeded 32 Bits
(Error Code = 80070216)
Best Wishes,
Mark
I am attempting to use the NDI Virtual Input with Windows Media Foundation, but it refuses to work because of an easily reproducible and consistent failure when attempting to open the virtual input as a web cam.
I would like to know if this is a known bug and if you plan to fix it.
The same code in my app works well with all standard web cams and other video input devices. I've supplied a code snippet from my app below, but the bug is also reproducible using Microsoft sample code.
Note that I am working with the latest version of NewTek Virtual Input, downloaded two days ago.
Thanks in advance for whatever guidance you can offer.
Best Wishes,
Mark
DETAIL
After creating a media session, I use the following code to create the video capture source from the NewTek Virtual Input
Code:
static HRESULT
WMFCreateVideoCaptureSource(
PCWSTR pszSymbolicLink,
IMFMediaSource** ppSource)
{
*ppSource = NULL;
IMFAttributes* pAttributes = NULL;
IMFMediaSource* pSource = NULL;
HRESULT hr = MFCreateAttributes(&pAttributes, 2);
// Set the device type to video.
if (SUCCEEDED(hr)) {
hr = pAttributes->SetGUID(
MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE,
MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID
);
}
// Set the symbolic link.
if (SUCCEEDED(hr)) {
hr = pAttributes->SetString(
MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK,
(LPCWSTR)pszSymbolicLink
);
}
if (SUCCEEDED(hr)) {
hr = MFCreateDeviceSource(pAttributes, ppSource);
}
SafeRelease(&pAttributes);
return hr;
}
This code works well with every webcam I've tested. But when attempting to open the NewTek Virtual Input, MFCreateDeviceSource consistently returns the following error:
ERROR_ARIRTMETIC_OVERFLOW: Arithmetic Result Exceeded 32 Bits
(Error Code = 80070216)
Best Wishes,
Mark