Olaf
Overly Lightweight Acoustic Fingerprinting
|
Provides an algorithm to match extracted fingerprints with the indexed fingerprints in the database. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | Olaf_FP_Matcher_Result_Callback) (int matchCount, float queryStart, float queryStop, const char *path, uint32_t matchIdentifier, float referenceStart, float referenceStop) |
Callback function template to respond to a result. | |
typedef struct Olaf_FP_Matcher | Olaf_FP_Matcher |
Functions | |
Olaf_FP_Matcher * | olaf_fp_matcher_new (Olaf_Config *config, Olaf_DB *db, Olaf_FP_Matcher_Result_Callback callback) |
Initialize a new matcher. | |
void | olaf_fp_matcher_match (Olaf_FP_Matcher *olaf_fp_matcher, struct extracted_fingerprints *olaf_fps) |
Match fingerprints with the database. | |
void | olaf_fp_matcher_callback_print_header (void) |
Print a header for the CSV output. | |
void | olaf_fp_matcher_callback_print_result (int matchCount, float queryStart, float queryStop, const char *path, uint32_t matchIdentifier, float referenceStart, float referenceStop) |
Prints a match result using the specified format. | |
void | olaf_fp_matcher_print_results (Olaf_FP_Matcher *olaf_fp_matcher) |
Print the current results. | |
void | olaf_fp_matcher_destroy (Olaf_FP_Matcher *olaf_fp_matcher) |
Free used memory and resources, does not close the database resources! |
Provides an algorithm to match extracted fingerprints with the indexed fingerprints in the database.
typedef void(* Olaf_FP_Matcher_Result_Callback) (int matchCount, float queryStart, float queryStop, const char *path, uint32_t matchIdentifier, float referenceStart, float referenceStop) |
Callback function template to respond to a result.
matchCount | The number of matches. If zero, this means an empty result. |
queryStart | The match start time, in seconds, in the query. |
queryStop | The match end time, in seconds, of the query fingerprint. |
path | The path of the matched resource. |
matchIdentifier | The identifier of the matched audio file. |
referenceStart | The match start time, in seconds, of the reference fingerprint. |
referenceStop | The match end time, in seconds, of the reference fingerprint. |
void olaf_fp_matcher_callback_print_result | ( | int | matchCount, |
float | queryStart, | ||
float | queryStop, | ||
const char * | path, | ||
uint32_t | matchIdentifier, | ||
float | referenceStart, | ||
float | referenceStop ) |
Prints a match result using the specified format.
This function is an example of a callback function that can be used with olaf_fp_matcher_callback_print_results. It prints a single match result in a specific format.
matchCount | The number of matches. |
queryStart | The match start time, in seconds, in the query. |
queryStop | The match end time, in seconds, of the query fingerprint. |
path | The path of the matched resource. |
matchIdentifier | The identifier of the matched audio file. |
referenceStart | The match start time, in seconds, of the reference fingerprint. |
referenceStop | The match end time, in seconds, of the reference fingerprint. |
void olaf_fp_matcher_destroy | ( | Olaf_FP_Matcher * | olaf_fp_matcher | ) |
Free used memory and resources, does not close the database resources!
olaf_fp_matcher | The olaf fp matcher |
void olaf_fp_matcher_match | ( | Olaf_FP_Matcher * | olaf_fp_matcher, |
struct extracted_fingerprints * | olaf_fps ) |
Match fingerprints with the database.
olaf_fp_matcher | The olaf fp matcher |
olaf_fps | The fingerprints |
Olaf_FP_Matcher * olaf_fp_matcher_new | ( | Olaf_Config * | config, |
Olaf_DB * | db, | ||
Olaf_FP_Matcher_Result_Callback | callback ) |
Initialize a new matcher.
config | The current configuration |
db | The database |
void olaf_fp_matcher_print_results | ( | Olaf_FP_Matcher * | olaf_fp_matcher | ) |
Print the current results.
olaf_fp_matcher | The olaf fp matcher |