public virtual void AllocTarget(
int size
)
public:
virtual void AllocTarget(
int size
)
size
Value containing the size of the target to be allocated, in megabytes.
Pre-allocates the capture target to the specified size. This method is typically used when the target is defined as a file. For best capture results, always capture to a defragmented, pre-allocated capture file that is larger than the size of the capture data. If the method fails, an error is raised. For more information, refer to the Error Codes.
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;
public bool _result = false;
public CaptureCtrlForm _form = new CaptureCtrlForm();
string outFile = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_AllocTargetExample.avi");
public void AllocTargetExample()
{
// reference the capture control
CaptureCtrl capturectrl = _form.CaptureCtrl;
try
{
// set the target output file
capturectrl.TargetFile = outFile;
// allocate a file
capturectrl.AllocTarget(1000);
_result = File.Exists(outFile);
}
catch (COMException)
{
_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