Gets or sets a value that indicates whether the object will use the DVD Source object when attempting to convert a DVD image (optional).
public virtual bool UseDVDSource { get; set; } Public Overridable Property UseDVDSource As Boolean
true to use the DVD Source object; false, otherwise.
A DVD image is the set of files that contain all of the video and audio content for a DVD, organized with a table of contents.
using Leadtools;using Leadtools.Multimedia;using LeadtoolsMultimediaExamples.Fixtures;public bool _result = false;public ConvertCtrlForm _form = new ConvertCtrlForm();public void UseDVDSourceExample(){// reference the convert controlConvertCtrl convertctrl = _form.ConvertCtrl;// input and output filesstring inFile = Path.Combine(LEAD_VARS.MediaDir, @"VIDEO_TS\VIDEO_TS.IFO");string outFile = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_UseDVDSourceExample.avi");try{DVDSource dvdSource;DVDTitle title;DVDChapter chapter;DVDSubpictureStream subpictureStream;DVDAudioStream audioStream;DVDVideoCompression comp;DVDAudioAppMode appMode;DVDAudioFormat audFormat;DVDAudioLangExt audLangExt;DVDSubpictureCoding subPicCoding;DVDSubpictureLangExt subPicLangExt;DVDSubpictureType subPicType;int i;int lCount;long lVal;bool bVal;double dVal;string strPlayList;// force to use the DVD sourceconvertctrl.UseDVDSource = true;// set the input and output filesconvertctrl.SourceFile = inFile;convertctrl.TargetFile = outFile;// reference the DVDSource objectdvdSource = (DVDSource)convertctrl.GetSubObject(ConvertObject.SourceFilter);// Select the main title on the discif ((dvdSource.Selected != DVDSourceSelectedState.MainSelected))dvdSource.Selected = DVDSourceSelectedState.MainSelected;// Get the disc durationdVal = dvdSource.TotalDuration;// Get the selected title durationdVal = dvdSource.SelectedDuration;// Get the play list settingsstrPlayList = dvdSource.PlayList;// You can save this to a file and restore the settings later// Restore the playlist settingsdvdSource.PlayList = strPlayList;// Get the title count in the disclCount = dvdSource.TitleCount;for (i = 0; (i <= (lCount - 1)); i++){// Get the title interfacetitle = dvdSource.GetTitle(i);// Get the X and Y aspectslVal = title.AspectX;lVal = title.AspectY;// Get if the title is a film mode or camera modebVal = title.IsFilmMode;// Get if there is a user data in line 21, field 1bVal = title.Line21Field1InGOP;// Get if there is a user data in line 21, field 2bVal = title.Line21Field2InGOP;// Get the compressioncomp = title.Compression;// Get the X source resolutionlVal = title.SourceResolutionX;// Get the Y source resolutionlVal = title.SourceResolutionY;// Get the Frame HeightlVal = title.FrameHeight;// Get the Frame RatelVal = title.FrameRate;// Get if the source is a letter boxedbVal = title.IsSourceLetterboxed;// Get if the picture can be shown as letterboxbVal = title.LetterboxPermitted;// Get if the picture can be shown as pan-scanbVal = title.PanscanPermitted;// Get the title durationdVal = title.TotalDuration;// Select all title chaptersif ((title.Selected != DVDTitleSelectedState.Selected))title.Selected = DVDTitleSelectedState.Selected;// Get the selected chapter durationdVal = title.SelectedDuration;// Get the audio stream count in the titleif ((title.AudioStreamCount > 0)){// Select the first audio streamif ((title.SelectedAudioStream == -1))title.SelectedAudioStream = 0;// Get the first audio streamaudioStream = title.GetAudioStream(0);// Select the audio streamif ((audioStream.Selected == false))audioStream.Selected = true;// Get the application modeappMode = audioStream.AppMode;// Get the application mode datalVal = audioStream.AppModeData;// Get the auido formataudFormat = audioStream.AudioFormat;// Get the number of channelslVal = audioStream.Channels;// Get the frequencylVal = audioStream.Frequency;// Get the languagelVal = audioStream.Language;// Get the language extensionaudLangExt = audioStream.LanguageExtension;// Get the quantizationlVal = audioStream.Quantization;if ((title.SubpictureStreamCount > 0)){// Select the first subpicture streamif ((title.SelectedSubpictureStream == -1))title.SelectedSubpictureStream = 0;// Get the first subpicture streamsubpictureStream = title.GetSubpictureStream(0);// Select the subpicture streamif ((subpictureStream.Selected == false))subpictureStream.Selected = true;// Get the coding modesubPicCoding = subpictureStream.CodingMode;// Get the langaugelVal = subpictureStream.Language;// Get the language extensionsubPicLangExt = subpictureStream.LanguageExtension;// Get the typesubPicType = subpictureStream.Type;}// Get the chapter countif ((title.ChapterCount > 0)){// Get the first chapterchapter = title.GetChapter(0);// Get the chapter durationdVal = chapter.Duration;// Get if the chapter is selectedif ((chapter.Selected == false))chapter.Selected = true;}}}}catch (COMException){_result = false;}catch (Exception){_result = false;}// we'll loop on the state and pump messages for this example.// but you should not need to if running from a Windows Forms application.while (convertctrl.State == ConvertState.Running)Application.DoEvents();}static class LEAD_VARS{public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 20\Media";}
Imports LeadtoolsImports Leadtools.MultimediaImports LeadtoolsMultimediaExamples.FixturesPublic _result As Boolean = FalsePublic _form As ConvertCtrlForm = New ConvertCtrlForm()Public Sub UseDVDSourceExample()' reference the convert controlDim convertctrl As ConvertCtrl = _form.ConvertCtrl' input and output filesDim inFile As String = Path.Combine(LEAD_VARS.MediaDir, "VIDEO_TS.IFO")Dim outFile As String = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_UseDVDSourceExample.avi")TryDim dvdSource As DVDSourceDim title As DVDTitleDim chapter As DVDChapterDim subpictureStream As DVDSubpictureStreamDim audioStream As DVDAudioStreamDim comp As DVDVideoCompressionDim appMode As DVDAudioAppModeDim audFormat As DVDAudioFormatDim audLangExt As DVDAudioLangExtDim subPicCoding As DVDSubpictureCodingDim subPicLangExt As DVDSubpictureLangExtDim subPicType As DVDSubpictureTypeDim i As IntegerDim lCount As IntegerDim lVal As LongDim bVal As BooleanDim dVal As DoubleDim strPlayList As String' force to use the DVD sourceconvertctrl.UseDVDSource = True' set the input and output filesconvertctrl.SourceFile = inFileconvertctrl.TargetFile = outFile' reference the DVDSource objectdvdSource = CType(convertctrl.GetSubObject(ConvertObject.SourceFilter), DVDSource)' Select the main title on the discIf (dvdSource.Selected <> DVDSourceSelectedState.MainSelected) ThendvdSource.Selected = DVDSourceSelectedState.MainSelectedEnd If' Get the disc durationdVal = dvdSource.TotalDuration' Get the selected title durationdVal = dvdSource.SelectedDuration' Get the play list settingsstrPlayList = dvdSource.PlayList' You can save this to a file and restore the settings later' Restore the playlist settingsdvdSource.PlayList = strPlayList' Get the title count in the disclCount = dvdSource.TitleCounti = 0Do While (i <= (lCount - 1))' Get the title interfacetitle = dvdSource.GetTitle(i)' Get the X and Y aspectslVal = title.AspectXlVal = title.AspectY' Get if the title is a film mode or camera modebVal = title.IsFilmMode' Get if there is a user data in line 21, field 1bVal = title.Line21Field1InGOP' Get if there is a user data in line 21, field 2bVal = title.Line21Field2InGOP' Get the compressioncomp = title.Compression' Get the X source resolutionlVal = title.SourceResolutionX' Get the Y source resolutionlVal = title.SourceResolutionY' Get the Frame HeightlVal = title.FrameHeight' Get the Frame RatelVal = title.FrameRate' Get if the source is a letter boxedbVal = title.IsSourceLetterboxed' Get if the picture can be shown as letterboxbVal = title.LetterboxPermitted' Get if the picture can be shown as pan-scanbVal = title.PanscanPermitted' Get the title durationdVal = title.TotalDuration' Select all title chaptersIf (title.Selected <> DVDTitleSelectedState.Selected) Thentitle.Selected = DVDTitleSelectedState.SelectedEnd If' Get the selected chapter durationdVal = title.SelectedDuration' Get the audio stream count in the titleIf (title.AudioStreamCount > 0) Then' Select the first audio streamIf (title.SelectedAudioStream = -1) Thentitle.SelectedAudioStream = 0End If' Get the first audio streamaudioStream = title.GetAudioStream(0)' Select the audio streamIf (audioStream.Selected = False) ThenaudioStream.Selected = TrueEnd If' Get the application modeappMode = audioStream.AppMode' Get the application mode datalVal = audioStream.AppModeData' Get the auido formataudFormat = audioStream.AudioFormat' Get the number of channelslVal = audioStream.Channels' Get the frequencylVal = audioStream.Frequency' Get the languagelVal = audioStream.Language' Get the language extensionaudLangExt = audioStream.LanguageExtension' Get the quantizationlVal = audioStream.QuantizationIf (title.SubpictureStreamCount > 0) Then' Select the first subpicture streamIf (title.SelectedSubpictureStream = -1) Thentitle.SelectedSubpictureStream = 0End If' Get the first subpicture streamsubpictureStream = title.GetSubpictureStream(0)' Select the subpicture streamIf (subpictureStream.Selected = False) ThensubpictureStream.Selected = TrueEnd If' Get the coding modesubPicCoding = subpictureStream.CodingMode' Get the langaugelVal = subpictureStream.Language' Get the language extensionsubPicLangExt = subpictureStream.LanguageExtension' Get the typesubPicType = subpictureStream.TypeEnd If' Get the chapter countIf (title.ChapterCount > 0) Then' Get the first chapterchapter = title.GetChapter(0)' Get the chapter durationdVal = chapter.Duration' Get if the chapter is selectedIf (chapter.Selected = False) Thenchapter.Selected = TrueEnd IfEnd IfEnd Ifi += 1LoopCatch e1 As COMException_result = FalseCatch e2 As Exception_result = FalseEnd Try' we'll loop on the state and pump messages for this example.' but you should not need to if running from a Windows Forms application.Do While convertctrl.State = ConvertState.RunningApplication.DoEvents()LoopEnd SubPublic NotInheritable Class LEAD_VARSPublic Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 20\Media"End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
