Class VFPSearchData
- Namespace
- VisioForge.Core.VideoFingerPrinting
- Assembly
- VisioForge.Core.dll
Manages native memory allocation for video fingerprint search operations.
public class VFPSearchData : IDisposableInheritance
Implements
Inherited Members
Remarks
The VisioForge.Core.VideoFingerPrinting.VFPSearchData class encapsulates unmanaged memory used by the native video fingerprinting library during search operations. It implements IDisposable to ensure proper cleanup of native resources. The memory allocation size varies between x86 (48 bytes) and x64 (80 bytes) platforms.
Constructors
VFPSearchData(TimeSpan)
Initializes a new instance of the VisioForge.Core.VideoFingerPrinting.VFPSearchData class.
public VFPSearchData(TimeSpan duration)Parameters
durationTimeSpan-
The expected duration of the video content to be processed.
Remarks
The constructor allocates platform-specific amounts of unmanaged memory (48 bytes for x86, 80 bytes for x64) and initializes the native search structure with the specified duration.
Properties
Data
Gets or sets the pointer to the native search data structure.
public nint Data { get; set; }Property Value
Remarks
This pointer is allocated during construction and must be properly freed by calling VisioForge.Core.VideoFingerPrinting.VFPSearchData.Free or disposing the object.
Methods
Dispose()
Releases all resources used by the VisioForge.Core.VideoFingerPrinting.VFPSearchData instance.
public void Dispose()Remarks
This method implements the IDisposable pattern and ensures that unmanaged memory is properly freed. It also suppresses finalization to improve performance.
Dispose(bool)
Releases the unmanaged resources and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
Remarks
This method follows the standard dispose pattern. When called from the finalizer (disposing = false), only unmanaged resources are freed. When called from Dispose() (disposing = true), both managed and unmanaged resources are freed.
~VFPSearchData()
Finalizes an instance of the VisioForge.Core.VideoFingerPrinting.VFPSearchData class.
protected ~VFPSearchData()Free()
Releases the unmanaged memory allocated for search data.
public void Free()Remarks
This method clears the native search structure and sets the data pointer to Zero. It is automatically called during disposal but can be called manually if immediate cleanup is required.
X86()
Determines whether the current process is running as a 32-bit (x86) application.
public static bool X86()Returns
- bool
-
trueif the process is 32-bit;falseif it is 64-bit.
Remarks
This method is used internally to determine the correct memory allocation size for platform-specific structures.