Gets the current count of titles in the Titles list.
[DispIdAttribute(10)]int MenuTitleCount {get;}
<DispIdAttribute(10)>ReadOnly Property MenuTitleCount As Integer
[DispIdAttribute(10)]property int MenuTitleCount {int get();}
The count of titles in the Titles list.
Gets the current count of titles in the Titles list.
using Leadtools;using Leadtools.Multimedia;using LeadtoolsMultimediaExamples.Fixtures;public bool _result = false;public ConvertCtrlForm _form = new ConvertCtrlForm();private ConvertCtrl _convertCtrl = null;private LTDvdWriter _dvdWriter = null;public void DvdWriterExample(){// reference the convert control_convertCtrl = _form.ConvertCtrl;// source files for DVD contentstring inFile1 = Path.Combine(LEAD_VARS.MediaDir, "DVDWriter_Source1.avi");string inFile2 = Path.Combine(LEAD_VARS.MediaDir, "DVDWriter_Source2.avi");string inFile3 = Path.Combine(LEAD_VARS.MediaDir, "DVDWriter_Source3.avi");string inFile4 = Path.Combine(LEAD_VARS.MediaDir, "DVDWriter_Source4.avi");string backgroundImageFile = Path.Combine(LEAD_VARS.MediaDir, "DVDWriter_Background.jpg");string outFile = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_DvdWriterExample_DVD");try{_dvdWriter = null;_convertCtrl.Preview = true;_convertCtrl.PreviewVisible = true;// setup the converter_convertCtrl.TargetFormat = TargetFormatType.DVD;_convertCtrl.VideoCompressors.Mpeg2.Selected = true;_convertCtrl.AudioCompressors.MpegAudio.Selected = true;// Create a DVD image with 2 titles, each contains 2 chapters:// Source video_convertCtrl.SourceFile = inFile1;// Destination image folder_convertCtrl.TargetFile = outFile;// Retrieve the DVD Writer interface_dvdWriter = _convertCtrl.GetSubObject(ConvertObject.Sink) as LTDvdWriter;_dvdWriter.RemoveAllMenuTitles();_dvdWriter.MenulessTitlePlay = false;// Set the TitleBreak property to false.// This will prevent the title from being written immediately after the conversion_dvdWriter.TitleBreak = false;_dvdWriter.AddMenuTitle("Title 1", -1);// Write the first chapter in the first title_convertCtrl.StartConvert();while (_convertCtrl.State != ConvertState.Stopped)Application.DoEvents();_convertCtrl.ResetSource();int highPart = 0;int lowPart = _dvdWriter.GetBytesWritten(out highPart);Int64 written = highPart << 32 | lowPart;_convertCtrl.SourceFile = inFile2;_convertCtrl.StartConvert();while (_convertCtrl.State != ConvertState.Stopped)Application.DoEvents();_convertCtrl.ResetSource();// Prepare for the second title// Set the TitleBreak property to TRUE, so the the current title can be flushed_dvdWriter.TitleBreak = true;// Disable Overwrite so the title will be appended to an existing dvd image_dvdWriter.Overwrite = false;_dvdWriter.MenulessTitlePlay = false;// Set the TitleBreak property to FALSE.// This will prevent the title from being written immediately after the conversion_dvdWriter.TitleBreak = false;_dvdWriter.AddMenuTitle("Title 2", -1);// Write the first chapter in the second title_convertCtrl.SourceFile = inFile3;_convertCtrl.StartConvert();while (_convertCtrl.State != ConvertState.Stopped)Application.DoEvents();_convertCtrl.ResetSource();// Write the second chapter in the second title_convertCtrl.SourceFile = inFile4;_convertCtrl.StartConvert();while (_convertCtrl.State != ConvertState.Stopped)Application.DoEvents();_convertCtrl.ResetSource();// Close the second title_dvdWriter.TitleBreak = true;_dvdWriter.TitleMenu = true;_dvdWriter.MenuLoop = true;_dvdWriter.MenulessTitlePlay = false;// Write the second chapter in the second title_convertCtrl.SourceFile = backgroundImageFile;ChangeStillImageDuration(1.0);_convertCtrl.StartConvert();while (_convertCtrl.State != ConvertState.Stopped)Application.DoEvents();_convertCtrl.ResetSource();_dvdWriter.TitleMenu = false;_dvdWriter.Overwrite = false;_convertCtrl.ResetTarget();_convertCtrl.ResetSource();// done, free COM objectMarshal.ReleaseComObject(_dvdWriter);_dvdWriter = null;// set the result_result = true;}catch (Exception ex){_result = false;}}private void ChangeStillImageDuration(double duration){ILTStlImgRd pStlImgRd;try{pStlImgRd = _convertCtrl.GetSubObject(ConvertObject.SourceFilter) as ILTStlImgRd;if (pStlImgRd != null){// get the current menu durationdouble currentDuration;currentDuration = _convertCtrl.Duration;if (currentDuration * 2 <= duration)pStlImgRd.Loop = (int)(duration / currentDuration + 0.5);}}catch{}}static class LEAD_VARS{public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media";}
Imports LeadtoolsImports Leadtools.MultimediaImports LeadtoolsMultimediaExamples.FixturesPublic _result As Boolean = FalsePublic _form As ConvertCtrlForm = New ConvertCtrlForm()Private _convertCtrl As ConvertCtrl = NothingPrivate _dvdWriter As LTDvdWriter = NothingPublic Sub DvdWriterExample()' reference the convert control_convertCtrl = _form.ConvertCtrl' source files for DVD contentDim inFile1 As String = "mediafiles\input\DVDWriter_Source1.avi"Dim inFile2 As String = "mediafiles\input\DVDWriter_Source2.avi"Dim inFile3 As String = "mediafiles\input\DVDWriter_Source3.avi"Dim inFile4 As String = "mediafiles\input\DVDWriter_Source4.avi"Dim backgroundImageFile As String = "mediafiles\input\DVDWriter_Background.jpg"Dim outFile As String = "mediafiles\output\ConvertCtrl_DvdWriterExample_DVD"Try_dvdWriter = Nothing_convertCtrl.Preview = True_convertCtrl.PreviewVisible = True' setup the converter_convertCtrl.TargetFormat = TargetFormatType.DVD_convertCtrl.VideoCompressors.Mpeg2.Selected = True_convertCtrl.AudioCompressors.MpegAudio.Selected = True' Create a DVD image with 2 titles, each contains 2 chapters:' Source video_convertCtrl.SourceFile = inFile1' Destination image folder_convertCtrl.TargetFile = outFile' Retrieve the DVD Writer interface_dvdWriter = TryCast(_convertCtrl.GetSubObject(ConvertObject.Sink), LTDvdWriter)_dvdWriter.RemoveAllMenuTitles()_dvdWriter.MenulessTitlePlay = False' Set the TitleBreak property to false.' This will prevent the title from being written immediately after the conversion_dvdWriter.TitleBreak = False_dvdWriter.AddMenuTitle("Title 1", -1)' Write the first chapter in the first title_convertCtrl.StartConvert()Do While _convertCtrl.State <> ConvertState.StoppedApplication.DoEvents()Loop_convertCtrl.ResetSource()Dim highPart As Integer = 0Dim lowPart As Integer = _dvdWriter.GetBytesWritten(highPart)Dim written As Int64 = highPart << 32 Or lowPart_convertCtrl.SourceFile = inFile2_convertCtrl.StartConvert()Do While _convertCtrl.State <> ConvertState.StoppedApplication.DoEvents()Loop_convertCtrl.ResetSource()' Prepare for the second title' Set the TitleBreak property to TRUE, so the the current title can be flushed_dvdWriter.TitleBreak = True' Disable Overwrite so the title will be appended to an existing dvd image_dvdWriter.Overwrite = False_dvdWriter.MenulessTitlePlay = False' Set the TitleBreak property to FALSE.' This will prevent the title from being written immediately after the conversion_dvdWriter.TitleBreak = False_dvdWriter.AddMenuTitle("Title 2", -1)' Write the first chapter in the second title_convertCtrl.SourceFile = inFile3_convertCtrl.StartConvert()Do While _convertCtrl.State <> ConvertState.StoppedApplication.DoEvents()Loop_convertCtrl.ResetSource()' Write the second chapter in the second title_convertCtrl.SourceFile = inFile4_convertCtrl.StartConvert()Do While _convertCtrl.State <> ConvertState.StoppedApplication.DoEvents()Loop_convertCtrl.ResetSource()' Close the second title_dvdWriter.TitleBreak = True_dvdWriter.TitleMenu = True_dvdWriter.MenuLoop = True_dvdWriter.MenulessTitlePlay = False' Write the second chapter in the second title_convertCtrl.SourceFile = backgroundImageFileChangeStillImageDuration(1.0)_convertCtrl.StartConvert()Do While _convertCtrl.State <> ConvertState.StoppedApplication.DoEvents()Loop_convertCtrl.ResetSource()_dvdWriter.TitleMenu = False_dvdWriter.Overwrite = False_convertCtrl.ResetTarget()_convertCtrl.ResetSource()' done, free COM objectMarshal.ReleaseComObject(_dvdWriter)_dvdWriter = Nothing' set the result_result = TrueCatch ex As Exception_result = FalseEnd TryEnd SubPrivate Sub ChangeStillImageDuration(ByVal duration As Double)Dim pStlImgRd As ILTStlImgRdTrypStlImgRd = TryCast(_convertCtrl.GetSubObject(ConvertObject.SourceFilter), ILTStlImgRd)If Not pStlImgRd Is Nothing Then' get the current menu durationDim currentDuration As DoublecurrentDuration = _convertCtrl.DurationIf currentDuration * 2 <= duration ThenpStlImgRd.Loop = CInt(duration / currentDuration + 0.5)End IfEnd IfCatchEnd TryEnd Sub
|
Products |
Support |
Feedback: MenuTitleCount Property - LTDvdWriter |
Introduction |
Help Version 19.0.2017.6.16
|

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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.