Table of Contents

Class VFPAPI86

Namespace
VisioForge.Core.VideoFingerPrinting
Assembly
VisioForge.Core.dll

Provides access to the 32-bit (x86) native video fingerprinting API through platform invoke declarations. This class contains methods for fingerprint search, comparison, and image analysis operations. Note: 32-bit support is primarily for Windows; Linux and macOS typically use 64-bit libraries.

public static class VFPAPI86

Inheritance

Inherited Members

Methods

VFPCompare_Build(out int, nint)

Builds the final fingerprint data from processed frames for comparison.

public static extern nint VFPCompare_Build(out int pLen, nint pDataTmp)

Parameters

pLen int

Output parameter receiving the length of the fingerprint data.

pDataTmp nint

Pointer to the comparison context.

Returns

nint

Pointer to the built fingerprint data.

VFPCompare_Clear(nint)

Clears and releases resources associated with the comparison context.

public static extern void VFPCompare_Clear(nint pDataTmp)

Parameters

pDataTmp nint

Pointer to the comparison context to clear.

VFPCompare_Compare(nint, int, nint, int, int)

Compares two fingerprints and returns a difference score (lower means more similar).

public static extern double VFPCompare_Compare(nint pData1, int iLen1, nint pData2, int iLen2, int MaxS)

Parameters

pData1 nint

Pointer to the first fingerprint data.

iLen1 int

Length of the first fingerprint data.

pData2 nint

Pointer to the second fingerprint data.

iLen2 int

Length of the second fingerprint data.

MaxS int

Maximum time shift in seconds searched for the best alignment.

Returns

double

The difference score: 0 for identical content, higher values for greater differences (lower means more similar).

VFPCompare_CompareMirror(nint, int, nint, int, int, bool)

Compares two fingerprints with mirror detection support.

public static extern double VFPCompare_CompareMirror(nint data1, int len1, nint data2, int len2, int maxShift, bool checkMirror)

Parameters

data1 nint

Pointer to the first fingerprint data.

len1 int

Length of the first fingerprint data.

data2 nint

Pointer to the second fingerprint data.

len2 int

Length of the second fingerprint data.

maxShift int

Maximum time shift in seconds searched for the best alignment.

checkMirror bool

Whether to check mirrored orientations (horizontal, vertical, both).

Returns

double

The difference score: 0 for identical content, higher values for greater differences (lower means more similar).

VFPCompare_CompareMirror2(nint, int, nint, int, int, out int)

Compares two fingerprints with mirror detection and reports the detected mirror mode.

public static extern double VFPCompare_CompareMirror2(nint data1, int len1, nint data2, int len2, int maxShift, out int mirrorMode)

Parameters

data1 nint

Pointer to the first fingerprint data.

len1 int

Length of the first fingerprint data.

data2 nint

Pointer to the second fingerprint data.

len2 int

Length of the second fingerprint data.

maxShift int

Maximum time shift in seconds searched for the best alignment.

mirrorMode int

Output parameter receiving the detected mirror mode.

Returns

double

The difference score: 0 for identical content, higher values for greater differences (lower means more similar).

VFPCompare_Init(int, nint)

Initializes the fingerprint comparison engine with a specified frame count.

public static extern void VFPCompare_Init(int count, nint pDataTmp)

Parameters

count int

The number of frames to allocate for processing.

pDataTmp nint

Pointer to the temporary data structure for comparison operations.

VFPCompare_Init2(int)

Initializes the fingerprint comparison engine and returns a handle to the comparison context.

public static extern nint VFPCompare_Init2(int count)

Parameters

count int

The number of frames to allocate for processing.

Returns

nint

A pointer to the initialized comparison context.

VFPCompare_Process(nint, int, int, int, double, nint)

Processes a video frame for fingerprint comparison operations.

public static extern int VFPCompare_Process(nint p, int w, int h, int s, double dTime, nint pDataTmp)

Parameters

p nint

Pointer to the frame pixel data.

w int

Width of the frame in pixels.

h int

Height of the frame in pixels.

s int

Stride (bytes per row) of the frame data.

dTime double

Timestamp of the frame in seconds.

pDataTmp nint

Pointer to the comparison context.

Returns

int

Status code indicating success (0) or failure.

VFPSearch_Build(out int, nint)

Builds the final fingerprint data from processed frames.

public static extern nint VFPSearch_Build(out int pLen, nint pDataTmp)

Parameters

pLen int

Output parameter receiving the length of the fingerprint data.

pDataTmp nint

Pointer to the search context.

Returns

nint

Pointer to the built fingerprint data.

VFPSearch_Clear(nint)

Clears and releases resources associated with the search context.

public static extern void VFPSearch_Clear(nint pDataTmp)

Parameters

pDataTmp nint

Pointer to the search context to clear.

VFPSearch_Init(int, nint)

Initializes the fingerprint search engine with a specified frame count.

public static extern void VFPSearch_Init(int count, nint pDataTmp)

Parameters

count int

The number of frames to allocate for processing.

pDataTmp nint

Pointer to the temporary data structure for search operations.

VFPSearch_Init2(int)

Initializes the fingerprint search engine and returns a handle to the search context.

public static extern nint VFPSearch_Init2(int count)

Parameters

count int

The number of frames to allocate for processing.

Returns

nint

A pointer to the initialized search context.

VFPSearch_Process(nint, int, int, int, double, nint)

Processes a video frame for fingerprint search operations.

public static extern int VFPSearch_Process(nint p, int w, int h, int s, double dTime, nint pDataTmp)

Parameters

p nint

Pointer to the frame pixel data.

w int

Width of the frame in pixels.

h int

Height of the frame in pixels.

s int

Stride (bytes per row) of the frame data.

dTime double

Timestamp of the frame in seconds.

pDataTmp nint

Pointer to the search context.

Returns

int

Status code indicating success (0) or failure.

VFPSearch_Search(nint, int, int, nint, int, int, out double, int)

Searches for matches between two fingerprints.

public static extern int VFPSearch_Search(nint pData1, int iLen1, int iSkip1, nint pData2, int iLen2, int iSkip2, out double pDiff, int maxDiff)

Parameters

pData1 nint

Pointer to the first fingerprint data.

iLen1 int

Length of the first fingerprint data.

iSkip1 int

Number of leading samples of the first fingerprint to skip (10 per second; usually 0).

pData2 nint

Pointer to the second fingerprint data.

iLen2 int

Length of the second fingerprint data.

iSkip2 int

Second of the second fingerprint to search from; the search window opens half the length of the first fingerprint earlier.

pDiff double

Output parameter receiving the difference value between fingerprints.

maxDiff int

Maximum allowed difference for a match.

Returns

int

The position of the best match, or int.MaxValue when no match was found.

VFPSearch_SearchMirror(nint, int, int, nint, int, int, out double, int, bool)

Searches for matches between two fingerprints with mirror detection.

public static extern int VFPSearch_SearchMirror(nint data1, int len1, int skip1, nint data2, int len2, int skip2, out double diff, int maxDiff, bool checkMirror)

Parameters

data1 nint

Pointer to the first fingerprint data (needle).

len1 int

Length of the first fingerprint data.

skip1 int

Number of leading samples of the first fingerprint to skip (10 per second; usually 0).

data2 nint

Pointer to the second fingerprint data (haystack).

len2 int

Length of the second fingerprint data.

skip2 int

Second of the second fingerprint to search from; the search window opens half the length of the first fingerprint earlier.

diff double

Output parameter receiving the difference value of the best match.

maxDiff int

Maximum difference for a match to be reported.

checkMirror bool

Whether to check mirrored orientations (horizontal, vertical, both).

Returns

int

The position of the best match, or int.MaxValue when no match was found.

VFPSearch_SearchMirror2(nint, int, nint, int, out int, out int, out int, double, double)

Searches for matches between two fingerprints with mirror detection and duration hints.

public static extern void VFPSearch_SearchMirror2(nint data1, int len1, nint data2, int len2, out int diff, out int pos, out int mirrorMode, double duration1, double duration2)

Parameters

data1 nint

Pointer to the first fingerprint data.

len1 int

Length of the first fingerprint data.

data2 nint

Pointer to the second fingerprint data.

len2 int

Length of the second fingerprint data.

diff int

Output parameter receiving the difference value between fingerprints.

pos int

Output parameter receiving the position of the best match.

mirrorMode int

Output parameter receiving the detected mirror mode.

duration1 double

Duration of the first video in seconds.

duration2 double

Duration of the second video in seconds.

VFPSearch_SearchRange(nint, int, nint, int, int, int, out double, int, bool, out int)

Finds the best alignment of the whole fragment inside the second fingerprint whose start lies in a range. Up to 9 samples (0.9 s, never more than a tenth of the fragment) may run past the end of the second fingerprint, which drops the last partial second of its video; nothing may run past the start. Of equally good alignments, the earliest wins.

public static extern int VFPSearch_SearchRange(nint data1, int len1, nint data2, int len2, int start, int end, out double diff, int maxDiff, bool checkMirror, out int mirrorMode)

Parameters

data1 nint

Pointer to the first fingerprint data (needle).

len1 int

Length of the first fingerprint data in bytes.

data2 nint

Pointer to the second fingerprint data (haystack).

len2 int

Length of the second fingerprint data in bytes.

start int

First start sample to try (10 samples per second).

end int

Last start sample to try; clamped to the last start allowed at the end.

diff double

When this method returns, contains the difference score of the match.

maxDiff int

Maximum difference for a match to be reported.

checkMirror bool

Whether to check mirrored orientations (horizontal, vertical, both).

mirrorMode int

When this method returns, contains the mirror mode of the match (0 when none).

Returns

int

The start sample of the best match (10 per second), or -1 when no alignment scores below maxDiff.

VFPSetLicenseKey(string)

Sets the license key for the video fingerprinting library.

public static extern void VFPSetLicenseKey(string licenseKey)

Parameters

licenseKey string

The license key string to activate the library.

VFPSetLicenseKeyA(string)

Sets the license key from a byte string. Used on macOS and Linux, where wchar_t is 4 bytes and VFPSetLicenseKey does not match a UTF-16 marshal.

public static extern void VFPSetLicenseKeyA(string licenseKey)

Parameters

licenseKey string

The license key string to activate the library.