Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
Typedefs | Functions
olaf_fp_matcher.h File Reference

Provides an algorithm to match extracted fingerprints with the indexed fingerprints in the database. More...

#include "olaf_fp_extractor.h"
#include "olaf_db.h"
#include "olaf_config.h"

Go to the source code of this file.

Typedefs

typedef struct Olaf_FP_Matcher Olaf_FP_Matcher
 

Functions

Olaf_FP_Matcherolaf_fp_matcher_new (Olaf_Config *config, Olaf_DB *db)
 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_mark_old_matches (Olaf_FP_Matcher *olaf_fp_matcher, int current_query_time)
 
void olaf_fp_matcher_print_header ()
 Print a header for the CSV output.
 
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!
 

Detailed Description

Provides an algorithm to match extracted fingerprints with the indexed fingerprints in the database.

Function Documentation

◆ olaf_fp_matcher_destroy()

void olaf_fp_matcher_destroy ( Olaf_FP_Matcher olaf_fp_matcher)

Free used memory and resources, does not close the database resources!

Parameters
olaf_fp_matcherThe olaf fp matcher

◆ olaf_fp_matcher_match()

void olaf_fp_matcher_match ( Olaf_FP_Matcher olaf_fp_matcher,
struct extracted_fingerprints olaf_fps 
)

Match fingerprints with the database.

Parameters
olaf_fp_matcherThe olaf fp matcher
olaf_fpsThe fingerprints

◆ olaf_fp_matcher_new()

Olaf_FP_Matcher * olaf_fp_matcher_new ( Olaf_Config config,
Olaf_DB db 
)

Initialize a new matcher.

Parameters
configThe current configuration
dbThe database
Returns
A newly initialzed state struct, or undefined if memory could not be allocated.

◆ olaf_fp_matcher_print_results()

void olaf_fp_matcher_print_results ( Olaf_FP_Matcher olaf_fp_matcher)

Print the current results.

Parameters
olaf_fp_matcherThe olaf fp matcher