17 #ifndef ADORESTREAMER_H
18 #define ADORESTREAMER_H
20 #include "engines/gstengine.h"
21 #include "engines/bufferconsumer.h"
26 #define MINIMUM_PROBING_DURATION 40
49 void MonoMix(
const short *source_buffer,
int source_numsamples,
int source_numberofchannels,
int source_samplingrate,
short *target_buffer,
int target_buffer_size);
64 #endif // ADORESTREAMER_H
GstEngine * engine_
the GStreamer engine object, necessary to peek into the audio stream
Definition: adorestreamer.h:54
QString fingerprinting_algorithm_
either 'echoprint' or 'chromapint', depending on the #define uncommented in the cpp file...
Definition: adorestreamer.h:60
void GetFingerprint(QString &fingerprint)
Definition: adorestreamer.cpp:144
QBuffer buffer_
fingerprinting buffer to collect audio buffers for some seconds before creating a fingerprint ...
Definition: adorestreamer.h:55
void StartProbing()
tell ConsumeBuffer() to start collecting audio buffers for later fingerprinting
Definition: adorestreamer.cpp:93
int samplerate_
computed in ConsumeBuffer() and stored to determine whether the rate has changed and the audio buffer...
Definition: adorestreamer.h:58
~AdoreStreamer()
Definition: adorestreamer.cpp:41
This class handles the received audio buffers.
Definition: adorestreamer.h:33
void MonoMix(const short *source_buffer, int source_numsamples, int source_numberofchannels, int source_samplingrate, short *target_buffer, int target_buffer_size)
Definition: adorestreamer.cpp:119
QString fingerprinting_algorithm_version_
current version of the fingerprinting algorithm. This is set in the constructor.
Definition: adorestreamer.h:61
void StopProbing()
stops collecting buffers and erases existing audio data from the fingerprinting buffer ...
Definition: adorestreamer.cpp:103
QString & GetFingerprintingAlgorithmVersion()
public read-only access to the private fingerprinting_algorithm_version_ member variable.
Definition: adorestreamer.h:45
QString fingerprint_
ascii (base64) representation of the result created by GetFingerprint().
Definition: adorestreamer.h:59
QTime probing_start_time
used to measure when MINIMUM_PROBING_DURATION has been reached and then create a fingerprint ...
Definition: adorestreamer.h:57
AdoreStreamer()
Definition: adorestreamer.cpp:28
QString & GetFingerprintingAlgorithm()
public read-only access to the private fingerprinting_algorithm_ member variable. ...
Definition: adorestreamer.h:44
void ConsumeBuffer(GstBuffer *buffer, int pipeline_id)
Definition: adorestreamer.cpp:56
QString ChromaPrint(short *data, int size)
Definition: adorestreamer.cpp:172
void ResetLastFingerprint()
erases a previously created fingerprint.
Definition: adorestreamer.h:46
bool probing_
controls the collection.
Definition: adorestreamer.h:56
QString & GetLastFingerprint()
public read-only access to the private fingerprint_ member variable.
Definition: adorestreamer.h:43
void SetEngine(GstEngine *engine)
Pass the GStreamer Engine object to the class and get a BufferConsumer hook.
Definition: adorestreamer.cpp:47
QString EchoPrint(short *data, int size)
Definition: adorestreamer.cpp:204