2015-01-25 22:10:49 +01:00
|
|
|
/** @file
|
|
|
|
* @author Edouard DUPIN
|
|
|
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
|
|
|
* @license APACHE v2.0 (see license file)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __AIRT_ALGO_END_POINT_CALLBACK_H__
|
|
|
|
#define __AIRT_ALGO_END_POINT_CALLBACK_H__
|
|
|
|
|
|
|
|
#include <airtalgo/EndPoint.h>
|
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
|
|
|
|
namespace airtalgo {
|
2015-01-27 21:26:03 +01:00
|
|
|
typedef std::function<void (const std::chrono::system_clock::time_point& _playTime,
|
|
|
|
size_t _nbChunk,
|
|
|
|
const std::vector<airtalgo::channel>& _map,
|
|
|
|
void* _data,
|
|
|
|
enum airtalgo::format _type)> needDataFunction;
|
|
|
|
typedef std::function<void (const std::chrono::system_clock::time_point& _readTime,
|
|
|
|
size_t _nbChunk,
|
|
|
|
const std::vector<airtalgo::channel>& _map,
|
|
|
|
const void* _data,
|
|
|
|
enum airtalgo::format _type)> haveNewDataFunction;
|
2015-01-25 22:10:49 +01:00
|
|
|
class EndPointCallback : public EndPoint {
|
|
|
|
private:
|
2015-01-27 21:26:03 +01:00
|
|
|
needDataFunction m_outputFunction;
|
|
|
|
haveNewDataFunction m_inputFunction;
|
2015-01-25 22:10:49 +01:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Constructor
|
|
|
|
*/
|
2015-01-27 21:26:03 +01:00
|
|
|
EndPointCallback(needDataFunction _callback);
|
|
|
|
EndPointCallback(haveNewDataFunction _callback);
|
2015-01-25 22:10:49 +01:00
|
|
|
/**
|
|
|
|
* @brief Destructor
|
|
|
|
*/
|
2015-01-28 22:07:11 +01:00
|
|
|
virtual ~EndPointCallback();
|
2015-01-25 22:10:49 +01:00
|
|
|
virtual void configurationChange();
|
|
|
|
virtual bool process(std::chrono::system_clock::time_point& _time,
|
|
|
|
void* _input,
|
|
|
|
size_t _inputNbChunk,
|
|
|
|
void*& _output,
|
|
|
|
size_t& _outputNbChunk);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|