Leadtools.Multimedia Namespace > FilterEnum Class : FilterEnum Constructor |
public FilterEnum()
'Declaration Public Function New()
'Usage Dim instance As New FilterEnum()
public FilterEnum()
function FilterEnum()
public: FilterEnum();
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
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; } }
Public _result As Boolean = False Public _form As ConvertCtrlForm = New ConvertCtrlForm() Public Sub FilterEnumEnableExample() Try Dim LeadAudioSpdifPassthru As String = "@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\{668B161A-9AB4-472D-8A48-550F7BD54F15}" ' Create an object instance of FilterEnum Dim filterEnum As FilterEnum = New FilterEnum ' Get the Enable value of LEAD Audio SPDIF Passthru filter Dim isEnable As Boolean = filterEnum.GetEnable(LeadAudioSpdifPassthru) ' Toggle the value and set it to a new variable Dim isEnableNew As Boolean = Not isEnable ' Set the new value to LEAD Audio SPDIF Passthru filter filterEnum.SetEnable(LeadAudioSpdifPassthru, isEnableNew) ' Get the Enable value again isEnable = filterEnum.GetEnable(LeadAudioSpdifPassthru) ' Check and see if the value has been set correctly If isEnable = isEnableNew Then _result = True Else _result = False End If Catch e1 As Exception _result = False End Try End Sub
public bool _result = false; public ConvertCtrlForm _form = new ConvertCtrlForm(); public void FilterEnumEnableExample() { string LeadAudioSpdifPassthru = "@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\\{668B161A-9AB4-472D-8A48-550F7BD54F15}"; FilterEnum filterEnum = new FilterEnum(); try { // Get the Enable value for the LEAD Audio SPDIF Passthru filter bool isEnable = filterEnum.GetEnable(LeadAudioSpdifPassthru); // Toggle the value and set it to a new variable bool isEnableNew = !isEnable; // Set the new value to the LEAD Audio SPDIF Passthru filter filterEnum.SetEnable(LeadAudioSpdifPassthru, isEnableNew); // Get the Enable value again isEnable = filterEnum.GetEnable(LeadAudioSpdifPassthru); // Check and see whether the value has been set correctly _result = (isEnable == isEnableNew) ? true : false; } catch (Exception) { _result = false; } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2