Commit e206cf59 authored by Samuel Debionne's avatar Samuel Debionne Committed by Valentin Valls
Browse files

Clean up C++ implementation

parent 2c1ed865
......@@ -110,7 +110,7 @@ public:
void setHwMaxImageSizeCallback(HwMaxImageSizeCallback *cbk);
virtual void fillData(Data&);
virtual void fillData(Data&) {}
private:
class SimuThread : public CmdThread {
......
......@@ -176,19 +176,16 @@ void Camera::SimuThread::execStartAcq()
throw LIMA_HW_EXC(InvalidValue, "Failed to get next frame");
{
Data *data = new Data();
Buffer *buffer = new Buffer();
buffer->data = ptr;
buffer->ref();
data->frameNumber = frame_nb;
data->type = dataTypeFromImageType(frame_dim.getImageType());
data->dimensions.push_back(frame_dim.getSize().getWidth());
data->dimensions.push_back(frame_dim.getSize().getHeight());
data->buffer = buffer;
m_simu->fillData(*data);
delete data;
buffer->data = NULL;
delete buffer;
Data data;
Buffer buffer;
buffer.data = ptr;
buffer.owner = Buffer::MAPPED;
data.frameNumber = frame_nb;
data.type = dataTypeFromImageType(frame_dim.getImageType());
data.dimensions = { frame_dim.getSize().getWidth(), frame_dim.getSize().getHeight() };
data.setBuffer(&buffer);
m_simu->fillData(data);
data.releaseBuffer();
}
HwFrameInfoType frame_info;
......@@ -245,16 +242,6 @@ void Camera::setDefaultProperties()
m_nb_frames = 1;
}
/**
* Called after the framer builder to fill extra data.
*
* Provides an easy way to create custom simulator
* implemented in Python.
*/
void Camera::fillData(Data&)
{
}
void Camera::constructFrameGetter()
{
DEB_MEMBER_FUNCT();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment