Error processing SSI file
LEADTOOLS Multimedia (Leadtools.Multimedia assembly)

LEADTOOLS SDK Help   |       |    Show Table of Contents    |   

SetMerit Method






String used for the Display Name or Friendly Name of the filter. It is best to use the "Display Name" since it is unique and no two filters can have the same Display Name. On the contrary, two or more filters can have the same Friendly Name. When two or more filters have the same Friendly name, this function works on the first filter it internally enumerates having the specified friendly name.
The new merit value for the specified DirectShow filter.
Sets the DirectShow filter Merit.
Syntax
public void SetMerit( 
   string Name,
   int Value
)
public:
void SetMerit( 
   String^ Name,
   int Value
) 
'Declaration
 
Public Sub SetMerit( _
   ByVal Name As String, _
   ByVal Value As Integer _
) 
 
'Usage
 
Dim instance As FilterEnum
Dim Name As String
Dim Value As Integer
 
instance.SetMerit(Name, Value)

Parameters

Name
String used for the Display Name or Friendly Name of the filter. It is best to use the "Display Name" since it is unique and no two filters can have the same Display Name. On the contrary, two or more filters can have the same Friendly Name. When two or more filters have the same Friendly name, this function works on the first filter it internally enumerates having the specified friendly name.
Value
The new merit value for the specified DirectShow filter.
Remarks
For more information, refer to the Microsoft documentation for DirectShow Merits http://msdn.microsoft.com/en-us/library/dd390674(VS.85).aspx http://msdn.microsoft.com/en-us/library/aa920889.aspx http://msmvps.com/blogs/chrisl/articles/40395.aspx A Display Name uniquely identifies a DirectShow filter (or any filter). Display names for software filters have the following format: @device:sw:GUID\\GUID, example: Microsoft's “MPEG-2 Splitter” display name is: @device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\\{3AE86B20-7BE8-11D1-ABE6-00A0C905F375}. A Friendly Name is not unique and one or more filters can have the same name. However, it is ideal for presenting a descriptive name in user interfaces. For example, the Friendly Name for Microsoft's MPEG-2 Splitter is "MPEG-2 Splitter"
Example
 
Imports Leadtools
Imports Leadtools.Multimedia
Imports LeadtoolsMultimediaExamples.Fixtures

Public _result As Boolean = False
Public _form As ConvertCtrlForm = New ConvertCtrlForm()
Public Sub FilterEnumMeritExample()
   Try
      ' Create an object instance of FilterEnum
      Dim filterEnum As FilterEnum = New FilterEnum

      ' Get LEAD H264 Decoder/Decompressor Merit
      Dim currentMerit As Integer = filterEnum.GetMerit(Leadtools.Multimedia.Constants.PreferredFilters.H264Decompressor)

      ' Increase the value by "one"
      Dim newMerit As Integer = currentMerit + 1

      ' Set the new merit value to LEAD H264 Decoder/Decompressor
      filterEnum.SetMerit(Leadtools.Multimedia.Constants.PreferredFilters.H264Decompressor, newMerit)

      ' Get the merit value again
      currentMerit = filterEnum.GetMerit(Leadtools.Multimedia.Constants.PreferredFilters.H264Decompressor)

      ' Check and see if the value has been set correctly
      If currentMerit = newMerit Then
         _result = True
      Else
         _result = False
      End If

   Catch e1 As Exception
      _result = False
   End Try
End Sub
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;

public bool _result = false;
public ConvertCtrlForm _form = new ConvertCtrlForm();
public void FilterEnumMeritExample()
{
   FilterEnum filterEnum = new FilterEnum();

   try
   {
      // Get LEAD H264 Decoder/Decompressor Merit
      int currentMerit = filterEnum.GetMerit(Constants.PreferredFilters.H264Decompressor);

      // Increase the value by "one"
      int newMerit = currentMerit + 1;

      // Set the new merit value to LEAD H264 Decoder/Decompressor
      filterEnum.SetMerit(Constants.PreferredFilters.H264Decompressor, newMerit);

      // Get the merit value again
      currentMerit = filterEnum.GetMerit(Constants.PreferredFilters.H264Decompressor);

      // Check and see whether the value has been set correctly
      _result = (currentMerit == newMerit) ? true : false;
   }
   catch (Exception)
   {
      _result = false;
   }
}
Requirements

Target Platforms

See Also

Reference

FilterEnum Class
FilterEnum Members

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