Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
olaf_fp_matcher.h
Go to the documentation of this file.
1// Olaf: Overly Lightweight Acoustic Fingerprinting
2// Copyright (C) 2019-2023 Joren Six
3
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Affero General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Affero General Public License for more details.
13
14// You should have received a copy of the GNU Affero General Public License
15// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
23#ifndef OLAF_FP_MATCHER_H
24#define OLAF_FP_MATCHER_H
25
26 #include "olaf_fp_extractor.h"
27 #include "olaf_db.h"
28 #include "olaf_config.h"
29
36 typedef struct Olaf_FP_Matcher Olaf_FP_Matcher;
37
38 //Create a new matcher which matches incoming fingerprints with a database.
39
49
50 //Matches fingerprints to the database and updates internal state
51
58 void olaf_fp_matcher_match(Olaf_FP_Matcher * olaf_fp_matcher, struct extracted_fingerprints * olaf_fps);
59
60 //Remove old matches
61
62 void olaf_fp_matcher_mark_old_matches(Olaf_FP_Matcher * olaf_fp_matcher, int current_query_time);
63
64 //Print the header to interpret the csv results
65
70
76 void olaf_fp_matcher_print_results(Olaf_FP_Matcher * olaf_fp_matcher);
77
83 void olaf_fp_matcher_destroy(Olaf_FP_Matcher * olaf_fp_matcher);
84
85#endif // OLAF_FP_MATCHER_H
Olaf configuration pramameters.
Olaf fingerprint database.
Olaf fingerprint extractor: combines event points into fingerprints.
void olaf_fp_matcher_print_results(Olaf_FP_Matcher *olaf_fp_matcher)
Print the current results.
Definition: olaf_fp_matcher.c:370
void olaf_fp_matcher_match(Olaf_FP_Matcher *olaf_fp_matcher, struct extracted_fingerprints *olaf_fps)
Match fingerprints with the database.
Definition: olaf_fp_matcher.c:330
void olaf_fp_matcher_print_header()
Print a header for the CSV output.
Definition: olaf_fp_matcher.c:365
void olaf_fp_matcher_destroy(Olaf_FP_Matcher *olaf_fp_matcher)
Free used memory and resources, does not close the database resources!
Definition: olaf_fp_matcher.c:409
Olaf_FP_Matcher * olaf_fp_matcher_new(Olaf_Config *config, Olaf_DB *db)
Initialize a new matcher.
Definition: olaf_fp_matcher.c:111
Configuration parameters defining the behaviour of Olaf.
Definition: olaf_config.h:48
A struct with state information on the data store.
Definition: olaf_db.c:27
A matcher matches extracted fingerprints with a database. A struct to keep the internal state of the ...
Definition: olaf_fp_matcher.c:55
The result of fingerprint extraction: a list of fingerprints with a size.
Definition: olaf_fp_extractor.h:63