BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
ce10d4f
Branches
Tags
master
Blinker
src
noarch
Player.h
implemented base class for modules minor whitespace fixes
Stefan Schuermans
commited
ce10d4f
at 2011-10-24 19:31:39
Player.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 PLAYER_H #define PLAYER_H #include <list> #include <string> #include <BlinkenLib/BlinkenMovie.h> #include "CallMgr.h" #include "Directory.h" #include "File.h" #include "Module.h" #include "SettingFile.h" #include "StreamMgr.h" #include "Time.h" #include "TimeCallee.h" namespace Blinker { /// a movie player class Player: public Module, public TimeCallee { protected: /// playlist entry struct Entry { std::string m_name; ///< name of playlist entry File m_file; ///< file object (to check for updates) stBlinkenMovie *m_pMovie; ///< movie object Entry(const std::string &name, const File &file); ///< constructor bool loadMovie(); ///< load movie from current file void freeMovie(); ///< free current movie }; /// playlist typedef std::list<Entry> Playlist; public: /** * @brief constructor * @param[in] callMgr callback manager * @param[in] streamMgr stream manager * @param[in] dirBase base directory */ Player(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); /// virtual destructor virtual ~Player(); private: /// copy constructor disabled Player(const Player & that); /// assignment operator disabled const Player & operator=(const Player &that); public: /// check for update of configuration virtual void updateConfig(); /// callback when requsted time reached virtual void timeCall(); protected: /// update playlist void updatePlaylist(); /// show current frame void showFrame(); protected: SettingFile m_fileOutStream; ///< output stream name file Directory m_dirPlaylist; ///< playlist directory std::string m_nameOutStream; ///< name of output stream Stream *m_pOutStream; ///< output stream Playlist m_playlist; ///< current playlist Playlist::const_iterator m_curEntry; ///< current playlist entry int m_curFrame; ///< current frame in movie Time m_showTime; ///< when to show frame }; // class Player } // namespace Blinker #endif // #ifndef PLAYER_H