void SetFilterMerit(IltmmConvert *pConvert)
{
HRESULT hr = S_OK;
CComPtr<IltmmFilterEnum> pFilterEnum;
// try to get the filter enumeration object
hr = CoCreateInstance(CLSID_ltmmFilterEnum, NULL, CLSCTX_INPROC_SERVER, IID_IltmmFilterEnum, (void**)&pFilterEnum);
if(FAILED(hr))
{
AfxMessageBox(_T("Can't instantiate IltmmFilterEnum library"));
return;
}
BSTR bstr = SysAllocString(L"LEAD Audio SPDIF Passthru");
long value = 0;
// get the Merit of the LEAD Audio SPDIF Passthru filter
hr = pFilterEnum->get_Merit(bstr, &value);
// Increase the Merit
value = value + 100;
// Set the New Merit
hr = pFilterEnum->put_Merit(bstr, value);
VARIANT_BOOL isEnable;
// Determine whether the filter is Enabled
hr = pFilterEnum->get_Enable(bstr, &isEnable);
// Disable the filter
hr = pFilterEnum->put_Enable(bstr, VARIANT_FALSE);
// Free the string
SysFreeString(bstr);
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document