Skip to content

ref_iface_IVDXInputDriver_DetectBySignature

shekh edited this page Apr 15, 2018 · 1 revision

VirtualDub Plugin SDK 1.2

IVDXInputDriver interface

IVDXInputDriver:: DetectBySignature

Attempts to detect whether a file can be handled by this input handler based on data from the file.

int DetectBySignature(const void *pHeader, sint32 nHeaderSize, const void *pFooter, sint32 nFooterSize, sint64 nFileSize);

Parameters

pHeader Pointer to bytes from the start of the file available for signature detection.
nHeaderSize Size of the buffer pointed to by pHeader.
pFooter Pointer to bytes from the end of the file available for signature detection.
nFooterSize Size of the buffer pointed to by pFooter.
nFileSize Size of the file, in bytes.

Thread safety

This method is not thread-safe.

Errors

Errors may not be returned from this function (see SetError()).

Return value

-1 if the file could not be recognized, 0 if the file match is sketchy, and 1 if the match is definitive.

Remarks

This function is optional and is only called if kFlagCustomSignature is set on the mFlags field of the input driver definition. It is better to use only the signature block in the definition, if possible, because enabling this method requires the driver to be loaded every time a file needs to be tested. If both the signature block and a custom signature are enabled, the test passes only if both tests are successful.


Copyright (C) 2007-2012 Avery Lee.

Clone this wiki locally