/* Blinker
Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
a blinkenarea.org project */
#include <stdlib.h>
#include <string>
#include <BlinkenLib/BlinkenFrame.h>
#include "Directory.h"
#include "File.h"
#include "Format.h"
#include "FormatFile.h"
#include "InStreamFile.h"
#include "Mgrs.h"
#include "Module.h"
#include "OutStreamFile.h"
#include "Resizer.h"
#include "StreamRecv.h"
namespace Blinker {
/**
* @brief constructor
* @param[in] name module name
* @param[in] mgrs managers
* @param[in] dirBase base directory
*/
Resizer::Resizer(const std::string &name, Mgrs &mgrs,
const Directory &dirBase):
Module(name, mgrs, dirBase),
m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr),
m_fileFormat(dirBase.getFile("format")),
m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr)
{
// set up
getFormat();
m_fileInStream.setStreamRecv(this);
}
/// virtual destructor
Resizer::~Resizer()
{
// clean up
m_fileInStream.setStreamRecv(NULL);
}
/// check for update of configuration
void Resizer::updateConfig()
{