GetPreferredFilter Method (original) (raw)

Summary

Retrieves the preferred filter's Display Name set using the SetPreferredFilter method.

Syntax

Parameters

filterType
A PreferredFilter enumeration value specifying the desired filter type

Return Value

A string containing a filter's display name.

Example

using Leadtools; using Leadtools.Multimedia; using LeadtoolsMultimediaExamples.Fixtures; public bool _result = false; public CaptureCtrlForm _form = new CaptureCtrlForm(); public void CapturePreferredFiltersExample() { CaptureCtrl captureCtrl = _form.CaptureCtrl; try { // set the preferred H264 decompressor to the LEAD default (which is the LEAD H264 Decoder) captureCtrl.SetPreferredFilter(PreferredFilter.H264Decompressor, Constants.PreferredFilters.LEADDefault); // the default H264 Decompressor should be the LEAD H264 Decoder now // filter names are not case sensitive, so ignore case in the compare _result = (string.Compare(captureCtrl.GetPreferredFilter(PreferredFilter.H264Decompressor), Constants.PreferredFilters.H264Decompressor, true) == 0); } catch (Exception) { _result = false; } }