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.
LPTSTR OLE2A(LPCOLESTR lpw){static CHAR convert[512];if(!lpw)return NULL;convert[0] = '\0';WideCharToMultiByte(CP_ACP, 0, lpw, -1, convert, 512, NULL, NULL);return convert;}void IltmmWMProfile_get_MutualExclusionCount_Example (IltmmWMProfile *pProfile){IltmmWMMutualExclusion *pMutualExc = NULL;IltmmWMStreamConfig *pStreamConfig = NULL;long lMCount;long lSCount;long lStreamNumber;long lQuality;BSTR bstrData;char strUpdate[255];int i;int j;IltmmWMProfile_get_MutualExclusionCount(pProfile, &lMCount);// iterate through the objectsfor(i=0; i<lMCount; i++){IltmmWMProfile_GetMutualExclusion(pProfile, i, &pMutualExc);IltmmWMMutualExclusion_get_StreamCount(pMutualExc, &lSCount);if(lSCount == 0){IltmmWMProfile_RemoveMutualExclusion(pProfile, pMutualExc);IltmmWMMutualExclusion_Release(pMutualExc);}else{for(j=0; j<lSCount; j++){// obtain the stream numberIltmmWMMutualExclusion_GetStream(pMutualExc, j, &lStreamNumber);// get the stream using it's numberIltmmWMProfile_GetStreamByNumber (pProfile, lStreamNumber, &pStreamConfig);// check it's quality, if it is less than 50, remove it...IltmmWMStreamConfig_get_Quality(pStreamConfig, &lQuality);if(lQuality < 50){// remove it...IltmmWMMutualExclusion_RemoveStream(pMutualExc, lStreamNumber);}// report the user with update...IltmmWMMutualExclusion_get_Type(pMutualExc, &bstrData);sprintf(strUpdate, "Updating Mutual object with type :\n %s", OLE2A(bstrData));SysFreeString(bstrData);MessageBox(NULL, strUpdate, "Update...", MB_OK);IltmmWMStreamConfig_Release(pStreamConfig);IltmmWMMutualExclusion_Release(pMutualExc);}}}}
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
