LEADTOOLS Multimedia (Leadtools.MediaFoundation assembly)

Constants.PreferredMediaSourceHandlers Class

Show in webframe
Example 



Members 
Contains constant string values for predefined values that can be used to identify preferred media source handlers
Object Model
Syntax
'Declaration
 
Public MustInherit NotInheritable Class Constants.PreferredMediaSourceHandlers 
'Usage
 
Dim instance As Constants.PreferredMediaSourceHandlers
public static class Constants.PreferredMediaSourceHandlers 
public ref class Constants.PreferredMediaSourceHandlers abstract sealed 
Remarks
The constants in this class are designed to be used with the
Example
Copy Code  
Imports Leadtools
Imports Leadtools.MediaFoundation
Imports LeadtoolsMediaFoundationExamples.Fixtures

Public _result As Boolean = False
Public _form As PlayCtrlForm = New PlayCtrlForm()
Public Sub PlayerPreferredMediaSourceHandlersExample()
   Try
      ' reference the forms play control
      Dim playctrl As PlayCtrl = _form.PlayCtrl

      ' set the preferred ISO(MP4) media source handler to the LEAD default (which is the LEAD ISO Media Source handler)
      playctrl.SetPreferredMediaSourceHandler(PreferredMediaSourceHandler.ISO, _
                                  Leadtools.MediaFoundation.Constants.PreferredMediaSourceHandlers.LEADDefault)

      ' the default ISO(MP4) media source handler should be the LEAD ISO(MP4) media source handler now
      _result = (String.Compare(playctrl.GetPreferredMediaSourceHandler(PreferredMediaSourceHandler.ISO), _
                                Leadtools.MediaFoundation.Constants.PreferredMediaSourceHandlers.ISO, True) = 0)
   Catch e1 As Exception
      _result = False
   End Try
End Sub
using Leadtools;
using Leadtools.MediaFoundation;
using LeadtoolsMediaFoundationExamples.Fixtures;

public bool _result = false;
public PlayCtrlForm _form = new PlayCtrlForm();
public void PlayerPreferredMediaSourceHandlersExample()
{
    PlayCtrl playctrl = _form.PlayCtrl;

    try
    {
        // set the preferred ISO(MP4) media source handler to the LEAD default (which is the LEAD ISO Media Source handler)
        playctrl.SetPreferredMediaSourceHandler(PreferredMediaSourceHandler.ISO, Constants.PreferredMediaSourceHandlers.LEADDefault);

        // the default ISO(MP4) media source handler should be the LEAD ISO(MP4) media source handler now
        _result = (string.Compare(playctrl.GetPreferredMediaSourceHandler(PreferredMediaSourceHandler.ISO),
                   Constants.PreferredMediaSourceHandlers.ISO, true) == 0);
    }
    catch (Exception)
    {
        _result = false;
    }
}
Requirements

Target Platforms

See Also

Reference

Constants.PreferredMediaSourceHandlers Members
Leadtools.MediaFoundation Namespace
GetPreferredMediaSourceHandler Method
SetPreferredMediaSourceHandler Method
GetPreferredMediaSourceHandler Method
SetPreferredMediaSourceHandler Method

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.MediaFoundation requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features