BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
4a1b01f
Branches
Tags
master
Blinker
src
noarch
Scaler.h
implemented scaler module
Stefan Schuermans
commited
4a1b01f
at 2011-11-19 22:04:34
Scaler.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef SCALER_H #define SCALER_H #include <string> #include <BlinkenLib/BlinkenFrame.h> #include "CallMgr.h" #include "Directory.h" #include "File.h" #include "Module.h" #include "SettingFile.h" #include "Size.h" #include "StreamMgr.h" #include "StreamRecv.h" namespace Blinker { /// a stream scaler class Scaler: public Module, public StreamRecv { public: /** * @brief constructor * @param[in] callMgr callback manager * @param[in] streamMgr stream manager * @param[in] dirBase base directory */ Scaler(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); /// virtual destructor virtual ~Scaler(); private: /// copy constructor disabled Scaler(const Scaler &that); /// assignment operator disabled const Scaler & operator=(const Scaler &that); public: /// check for update of configuration virtual void updateConfig(); /** * @brief set current frame * @param[in] stream stream name * @param[in] pFrame current frame */ virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame); /** * @brief set current frame to none * @param[in] stream stream name */ virtual void setNoFrame(const std::string &stream); protected: /// get input stream and attach to it void getInStream(); /// detach from input stream and release it void releaseInStream(); /// (re-)get size to scale to void getSize(); /// get output stream void getOutStream(); /// release output stream void releaseOutStream(); /// send current frame to output stream void sendFrame(); /** * @brief process frame * @param[in] pFrame frame to process */ void procFrame(stBlinkenFrame *pFrame); /// process "no frame" void procNoFrame(); protected: SettingFile m_fileInStream; ///< input stream name file SettingFile m_fileSize; ///< size file SettingFile m_fileOutStream; ///< output stream name file std::string m_nameInStream; ///< name of input stream Stream *m_pInStream; ///< input stream bool m_haveSize; ///< if the size to scale to is available Size m_size; ///< size to scale to std::string m_nameOutStream; ///< name of output stream Stream *m_pOutStream; ///< output stream }; // class Scaler } // namespace Blinker #endif // #ifndef SCALER_H