Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
olaf_stream_processor.h File Reference

Makes it more easy to process an audio stream. More...

#include "olaf_config.h"
#include "olaf_runner.h"
#include "olaf_fp_matcher.h"

Go to the source code of this file.

Typedefs

typedef struct Olaf_Stream_Processor Olaf_Stream_Processor
 Typedef for struct Olaf_Stream_Processor.

Functions

Olaf_Stream_Processorolaf_stream_processor_new (Olaf_Runner *runner, const char *raw_path, const char *orig_path)
 Initialize a new stream processor.
void olaf_stream_processor_process (Olaf_Stream_Processor *olaf_stream_processor)
 Process a file from the first to last audio sample.
void olaf_stream_processor_destroy (Olaf_Stream_Processor *olaf_stream_processor)
 Free up memory and release resources.
void olaf_stream_processor_set_result_callback (Olaf_Stream_Processor *olaf_stream_processor, Olaf_FP_Matcher_Result_Callback callback)
 Set the result callback function.
void olaf_stream_processor_set_result_header (Olaf_Stream_Processor *processor, const char *result_header)
 Set the result header for the stream processor.

Detailed Description

Makes it more easy to process an audio stream.

The stream processor

Function Documentation

◆ olaf_stream_processor_destroy()

void olaf_stream_processor_destroy ( Olaf_Stream_Processor * olaf_stream_processor)

Free up memory and release resources.

Parameters
olaf_stream_processorThe olaf stream processor.

◆ olaf_stream_processor_new()

Olaf_Stream_Processor * olaf_stream_processor_new ( Olaf_Runner * runner,
const char * raw_path,
const char * orig_path )

Initialize a new stream processor.

Parameters
runnerThe runner which determines the type of processing to take place (query, match, print,... )
[in]raw_pathThe path to the transcoded raw audio samples file
[in]orig_pathThe original audio path to store in meta-data.
Returns
Newly created state information related to the processor.

◆ olaf_stream_processor_process()

void olaf_stream_processor_process ( Olaf_Stream_Processor * olaf_stream_processor)

Process a file from the first to last audio sample.

Parameters
olaf_stream_processorThe olaf stream processor.

◆ olaf_stream_processor_set_result_callback()

void olaf_stream_processor_set_result_callback ( Olaf_Stream_Processor * olaf_stream_processor,
Olaf_FP_Matcher_Result_Callback callback )

Set the result callback function.

Parameters
olaf_stream_processorThe stream processor
callbackThe callback function

◆ olaf_stream_processor_set_result_header()

void olaf_stream_processor_set_result_header ( Olaf_Stream_Processor * processor,
const char * result_header )

Set the result header for the stream processor.

Parameters
processorThe stream processor
result_headerThe result header string