For complete code, refer to the CNVWM demo.
// The example below checks all the streams for
// a mutual object. If the quality is less than 50,
// it is removed.
void SetupMutualObjects(IltmmWMProfile *pProfile)
{
USES_CONVERSION;
IltmmWMMutualExclusion *pMutualExc = NULL;
IltmmWMStreamConfig *pStreamConfig = NULL;
long lMCount;
long lSCount;
long lStreamNumber;
long lQuality;
BSTR bstrData;
WCHAR wstrUpdate[255];
pProfile->get_MutualExclusionCount(&lMCount);
// iterate through the objects
for (int i=0; i<lMCount; i++)
{
pProfile->GetMutualExclusion(i, &pMutualExc);
pMutualExc->get_StreamCount(&lSCount);
if (lSCount == 0)
{
pProfile->RemoveMutualExclusion(pMutualExc);
pMutualExc->Release();
}
else
{
for (int j=0; j<lSCount; j++)
{
// obtain the stream number
pMutualExc->GetStream(j, &lStreamNumber);
// get the stream using it's number
pProfile->GetStreamByNumber(lStreamNumber, &pStreamConfig);
// check it's quality, if it is less than 50, remove it...
pStreamConfig->get_Quality(&lQuality);
if (lQuality < 50)
{
// remove it...
pMutualExc->RemoveStream(lStreamNumber);
}
// report the user with update...
pMutualExc->get_Type(&bstrData);
wsprintf(wstrUpdate, TEXT("Updating Mutual object with type :\n %s"), bstrData);
SysFreeString(bstrData);
MessageBox(NULL, wstrUpdate, TEXT("Update..."), MB_OK);
pStreamConfig->Release();
pMutualExc->Release();
}
}
}
}
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.