Sets the filename and options to save closed captioning data as SRT or TEXT format files.
public virtual void SetClosedCaptioningTargetFile(string FileName,Leadtools.Multimedia.ClosedCaptioningFlags Flags)
Public Overridable Sub SetClosedCaptioningTargetFile( _ByVal FileName As String, _ByVal Flags As Leadtools.Multimedia.ClosedCaptioningFlags _)
public:virtual void SetClosedCaptioningTargetFile(String^ FileName,Leadtools.Multimedia.ClosedCaptioningFlags Flags)
FileName
A character string that contains the filename to save the closed captioning data.
Flags
Value that represents the desired save options. For a list of possible values, refer to ClosedCaptioningFlags enumeration values.
Use this method to save the decoded closed captioning data coming from a LEAD MPEG2 decoder. Closed captioning data can be embedded inside MPEG2 Video Elementary stream. If so, then the convert object can decode this data and write it to SRT format using this method, where the closed captioning text and time are saved. For more information, refer to https://en.wikipedia.org/wiki/SubRip. Also, the convert object can save the closed captioning data as text.
By default this method saves the data as an SRT file; but if ClosedCaptioningFlags.Text is specified, the output will be a pure text file.
using Leadtools;using Leadtools.Multimedia;using LeadtoolsMultimediaExamples.Fixtures;public bool _result = false;public ConvertCtrlForm _form = new ConvertCtrlForm();public void ClosedCaptioningTargetFile(){// reference the convert controlConvertCtrl convertctrl = _form.ConvertCtrl;// target filestring targetFileCc = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_ClosedCaptioningTargetFile.srt");ClosedCaptioningFlags flags = ClosedCaptioningFlags.Default;string testFile;ClosedCaptioningFlags testFlags;try{// set target file name and save optionsconvertctrl.SetClosedCaptioningTargetFile(targetFileCc, flags);convertctrl.GetClosedCaptioningTargetFile(out testFile, out testFlags);if (testFile == targetFileCc && testFlags == flags)_result = true;else_result = false;}catch (Exception){_result = false;}}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()Public Sub ClosedCaptioningTargetFile()' reference the convert controlDim convertctrl As ConvertCtrl = _form.ConvertCtrl' target fileDim targetFileCc As String = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_ClosedCaptioningTargetFile.srt")Dim flags As ClosedCaptioningFlags = ClosedCaptioningFlags.DefaultDim testFile As String = String.EmptyDim testFlags As ClosedCaptioningFlagsTry' set target file name and save optionsconvertctrl.SetClosedCaptioningTargetFile(targetFileCc, flags)convertctrl.GetClosedCaptioningTargetFile(testFile, testFlags)If testFile = targetFileCc AndAlso testFlags = flags Then_result = TrueElse_result = FalseEnd IfCatch e1 As Exception_result = FalseEnd TryEnd SubPublic NotInheritable Class LEAD_VARSPublic Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media"End Class
|
Products |
Support |
Feedback: SetClosedCaptioningTargetFile Method - Leadtools.Multimedia |
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.