BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
b6b2996
Branches
Tags
master
Blinker
src
noarch
Player.h
update copyright years
Stefan Schuermans
commited
b6b2996
at 2014-01-02 21:57:13
Player.h
Blame
History
Raw
/* Blinker Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef BLINKER_PLAYER_H #define BLINKER_PLAYER_H #include <list> #include <string> #include <BlinkenLib/BlinkenMovie.h> #include "Directory.h" #include "File.h" #include "InStreamFile.h" #include "ListTracker.h" #include "Mgrs.h" #include "Module.h" #include "OutStreamFile.h" #include "StreamRecv.h" #include "Time.h" #include "TimeCallee.h" namespace Blinker { /// a movie player class Player: public Module, public StreamRecv, public TimeCallee { protected: /// movie in playlist class Movie; /// playlist tracker typedef ListTracker<Player, Movie, File> PlaylistTracker; /// playlist iterator typedef PlaylistTracker::ListIt PlaylistIt; public: /** * @brief constructor * @param[in] name module name * @param[in] mgrs managers * @param[in] dirBase base directory */ Player(const std::string &name, Mgrs &mgrs, 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(); /** * @brief set current frame * @param[in] stream stream name * @param[in] pFrame current frame (NULL for none) */ virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame); /// callback when requested time reached virtual void timeCall(); protected: /// check if current movie changed and react void checkCurChanged(); /// process current frame void procFrame(); /// send current frame to output stream void sendFrame(); protected: OutStreamFile m_fileOutStream; ///< output stream name file InStreamFile m_fileHaltStream; /**< halt stream name file (player halts if stream active) */ PlaylistTracker m_playlistTracker; ///< current playlist bool m_curValid; ///< if there is a current frame PlaylistIt m_curEntry; ///< current playlist entry int m_curFrame; ///< current frame in movie bool m_curChange; ///< current movie changed bool m_halted; ///< if player is halted Time m_remainTime; /**< remaining time of current frame (valid if m_curValid && m_halted) */ Time m_nextTime; /**< when to show next frame (valid if m_curValid && !m_halted) */ }; // class Player } // namespace Blinker #endif // #ifndef BLINKER_PLAYER_H