GetMediaType Method

Summary
Gets the media type of the stream in the form of a MediaType object.
Syntax
C#
C++/CLI
public MediaType GetMediaType() 
public: 
MediaType^ GetMediaType();  
Remarks

For more information, refer to the Microsoft documentation for IWMMediaProps.GetMediaType.

Example
C#
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; 
   } 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.