For more information, refer to the Microsoft documentation for IWMMediaProps.GetMediaType.
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;
public bool _result = false;
public CaptureCtrlForm _form = new CaptureCtrlForm();
public void GetMediaTypeExample()
{
// reference the capture control
CaptureCtrl capturectrl = _form.CaptureCtrl;
MediaType mediaType = new MediaType();
try
{
// reference the profile if available
WMProfileManager manager = new WMProfileManager();
manager.SystemProfileVersion = WMT_Version.V8;
capturectrl.WMProfile = manager.LoadSystemProfile(0);
WMStreamConfig wmStreamConfig = capturectrl.WMProfile.GetStream(1);
mediaType = wmStreamConfig.GetMediaType();
if (mediaType.SubType == "{33564D57-0000-0010-8000-00AA00389B71}")
_result = true;
}
catch (Exception)
{
_result = false;
}
}
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