BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
d47b86a
Branches
Tags
master
Blinker
src
noarch
Player.h
implemented stream printer (for debug purposes)
Stefan Schuermans
commited
d47b86a
at 2011-10-23 19:20:38
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 "SettingFile.h" #include "StreamMgr.h" #include "Time.h" #include "TimeCallee.h" namespace Blinker { /// a movie player class Player: 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: /// callback when requsted time reached virtual void timeCall(); protected: /// update playlist void updatePlaylist(); /// show current frame void showFrame(); protected: CallMgr &m_callMgr; ///< callback manager StreamMgr &m_streamMgr; ///< stream manager Directory m_dirBase; ///< base directory 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