C#
VB
C++
Gets the highest channel available.
public int ChannelMax { get; } Public ReadOnly Property ChannelMax As Integer public:property int ChannelMax {int get();}
A value which represents the highest channel available.
Gets the highest channel available. For more detailed information, refer to the Microsoft documentation for IAMTuner.ChannelMinMax.
using Leadtools;using Leadtools.MediaFoundation;using LeadtoolsMediaFoundationExamples.Fixtures;public bool _result = false;public CaptureCtrlForm _form = new CaptureCtrlForm();public void AutoTuneExample(){// reference the capture controlCaptureCtrl capturectrl = _form.CaptureCtrl;try{// try set the analog video capture device, use your device name hereif (capturectrl.VideoDevices["Analog"] != null)capturectrl.VideoDevices["Analog"].Selected = true;// reference the TV tuner interfaceTVTuner tvtuner = capturectrl.TVTuner;// Check if TV tuner is validif (tvtuner != null){// get the min and max channel infoint minChan = tvtuner.ChannelMin;int maxChan = tvtuner.ChannelMax;// select a channel between min and max to auto tune, do this for as many channels as desiredint tuneChan = 25;int ok = tvtuner.AutoTune(tuneChan);// if we auto-tuned successfully, store the infoif (ok != 0){// store the auto tune informationtvtuner.StoreAutoTune();// set the result to what we expect_result = true;}}}catch (Exception){_result = false;}}
Imports LeadtoolsImports Leadtools.MediaFoundationImports LeadtoolsMediaFoundationExamples.FixturesPublic _result As Boolean = FalsePublic _form As CaptureCtrlForm = New CaptureCtrlForm()Public Sub AutoTuneExample()' reference the capture controlDim capturectrl As CaptureCtrl = _form.CaptureCtrlTry' try set the analog video capture device, use your device name hereIf Not capturectrl.VideoDevices("Analog") Is Nothing Thencapturectrl.VideoDevices("Analog").Selected = TrueEnd If' reference the TV tuner interfaceDim tvtuner As TVTuner = capturectrl.TVTuner' Check if TV tuner is validIf Not tvtuner Is Nothing Then' get the min and max channel infoDim minChan As Integer = tvtuner.ChannelMinDim maxChan As Integer = tvtuner.ChannelMax' select a channel between min and max to auto tune, do this for as many channels as desiredDim tuneChan As Integer = 25Dim ok As Integer = tvtuner.AutoTune(tuneChan)' if we auto-tuned successfully, store the infoIf ok <> 0 Then' store the auto tune informationtvtuner.StoreAutoTune()' set the result to what we expect_result = TrueEnd IfEnd IfCatch e1 As Exception_result = FalseEnd TryEnd Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
