public virtual void SetClosedCaptioningTargetFile(
string FileName,
ClosedCaptioningFlags Flags
)
public:
virtual void SetClosedCaptioningTargetFile(
String^ FileName,
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 control
ConvertCtrl convertctrl = _form.ConvertCtrl;
// target file
string targetFileCc = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_ClosedCaptioningTargetFile.srt");
ClosedCaptioningFlags flags = ClosedCaptioningFlags.Default;
string testFile;
ClosedCaptioningFlags testFlags;
try
{
// set target file name and save options
convertctrl.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:\LEADTOOLS22\Media";
}
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