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

Caches and finally writes fingerprints to the database. More...

#include <stdint.h>
#include "olaf_db.h"
#include "olaf_fp_extractor.h"

Go to the source code of this file.

Typedefs

typedef struct Olaf_FP_DB_Writer Olaf_FP_DB_Writer
 

Functions

Olaf_FP_DB_Writerolaf_fp_db_writer_new (Olaf_DB *db, uint32_t audio_file_identifier)
 Initialize a new db writer.
 
void olaf_fp_db_writer_store (Olaf_FP_DB_Writer *olaf_fp_db_writer, struct extracted_fingerprints *fingerprints)
 Cache and store fingerprints.
 
void olaf_fp_db_writer_delete (Olaf_FP_DB_Writer *olaf_fp_db_writer, struct extracted_fingerprints *fingerprints)
 Cache and delete fingerprints.
 
void olaf_fp_db_writer_destroy (Olaf_FP_DB_Writer *olaf_fp_db_writer, bool store)
 Free up memory and release resources.
 

Detailed Description

Caches and finally writes fingerprints to the database.

Function Documentation

◆ olaf_fp_db_writer_delete()

void olaf_fp_db_writer_delete ( Olaf_FP_DB_Writer olaf_fp_db_writer,
struct extracted_fingerprints fingerprints 
)

Cache and delete fingerprints.

Parameters
olaf_fp_db_writerThe olaf fp database writer.
fingerprintsThe fingerprints.

◆ olaf_fp_db_writer_destroy()

void olaf_fp_db_writer_destroy ( Olaf_FP_DB_Writer olaf_fp_db_writer,
bool  store 
)

Free up memory and release resources.

Parameters
olaf_fp_db_writerThe olaf fp database writer
[in]storeTrue if store needs to be called or false if delete needs to be called.

◆ olaf_fp_db_writer_new()

Olaf_FP_DB_Writer * olaf_fp_db_writer_new ( Olaf_DB db,
uint32_t  audio_file_identifier 
)

Initialize a new db writer.

Parameters
dbThe database.
[in]audio_file_identifierThe audio file identifier.
Returns
A newly initialized db writer struct.

◆ olaf_fp_db_writer_store()

void olaf_fp_db_writer_store ( Olaf_FP_DB_Writer olaf_fp_db_writer,
struct extracted_fingerprints fingerprints 
)

Cache and store fingerprints.

Parameters
olaf_fp_db_writerThe olaf fp database writer.
fingerprintsThe fingerprints.