ref_iface_IVDXInputDriver_DetectBySignature - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
IVDXInputDriver interface
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);
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. |
This method is not thread-safe.
Errors may not be returned from this function (see SetError()).
-1 if the file could not be recognized, 0 if the file match is sketchy, and 1 if the match is definitive.
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.