audio-drain/audio/drain/EndPointRead.hpp

65 lines
1.9 KiB
C++
Raw Normal View History

2015-04-10 23:00:13 +02:00
/** @file
* @author Edouard DUPIN
* @copyright 2011, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
2015-04-10 23:00:13 +02:00
*/
#pragma once
2015-04-10 23:00:13 +02:00
2016-10-02 21:41:55 +02:00
#include <audio/drain/EndPoint.hpp>
2015-04-10 23:00:13 +02:00
namespace audio {
namespace drain{
class EndPointRead : public EndPoint {
protected:
/**
* @brief Constructor
*/
EndPointRead();
void init();
public:
2016-07-19 21:43:58 +02:00
static ememory::SharedPtr<EndPointRead> create();
2015-04-10 23:00:13 +02:00
/**
* @brief Destructor
*/
virtual ~EndPointRead() {};
virtual void configurationChange();
2015-04-13 21:49:48 +02:00
virtual bool process(audio::Time& _time,
2015-04-10 23:00:13 +02:00
void* _input,
size_t _inputNbChunk,
void*& _output,
size_t& _outputNbChunk);
/**
* @brief Set buffer size in chunk number
* @param[in] _nbChunk Number of chunk in the buffer
*/
virtual void setBufferSize(size_t _nbChunk);
/**
* @brief Set buffer size size of the buffer with the stored time in <EFBFBD>s
* @param[in] _time Time in microsecond of the buffer
*/
2017-09-26 15:57:44 +02:00
virtual void setBufferSize(const echrono::microseconds& _time);
2015-04-10 23:00:13 +02:00
/**
* @brief get buffer size in chunk number
* @return Number of chunk that can be written in the buffer
*/
virtual size_t getBufferSize();
/**
* @brief Set buffer size size of the buffer with the stored time in <EFBFBD>s
* @return Time in microsecond that can be written in the buffer
*/
2017-09-26 15:57:44 +02:00
virtual echrono::microseconds getBufferSizeMicrosecond();
2015-04-10 23:00:13 +02:00
/**
* @brief Get buffer size filled in chunk number
* @return Number of chunk in the buffer (that might be read/write)
*/
virtual size_t getBufferFillSize();
/**
* @brief Set buffer size size of the buffer with the stored time in <EFBFBD>s
* @return Time in microsecond of the buffer (that might be read/write)
*/
2017-09-26 15:57:44 +02:00
virtual echrono::microseconds getBufferFillSizeMicrosecond();
2015-04-10 23:00:13 +02:00
};
}
}