f0c104c5056a43dc4a9f4267fd08c8b521d2f660
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

1) /* Blinker
2)    Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org>
3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
4)    a blinkenarea.org project */
5) 
6) #ifndef PLAYER_H
7) #define PLAYER_H
8) 
9) #include <list>
10) #include <string>
11) 
12) #include <BlinkenLib/BlinkenMovie.h>
13) 
14) #include "CallMgr.h"
15) #include "Directory.h"
16) #include "File.h"
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

17) #include "Module.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

18) #include "OutStreamFile.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

19) #include "StreamMgr.h"
20) #include "Time.h"
21) #include "TimeCallee.h"
22) 
23) namespace Blinker {
24) 
25) /// a movie player
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

26) class Player: public Module, public TimeCallee
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

27) {
28) protected:
29)   /// playlist entry
30)   struct Entry {
31)     std::string     m_name;    ///< name of playlist entry
32)     File            m_file;    ///< file object (to check for updates)
33)     stBlinkenMovie *m_pMovie;  ///< movie object
34)     Entry(const std::string &name, const File &file); ///< constructor
35)     bool loadMovie(); ///< load movie from current file
36)     void freeMovie(); ///< free current movie
37)   };
38) 
39)   /// playlist
40)   typedef std::list<Entry> Playlist;
41) 
42) public:
43)   /**
44)    * @brief constructor
45)    * @param[in] callMgr callback manager
46)    * @param[in] streamMgr stream manager
47)    * @param[in] dirBase base directory
48)    */
49)   Player(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase);
50) 
51)   /// virtual destructor
52)   virtual ~Player();
53) 
54) private:
55)   /// copy constructor disabled
Stefan Schuermans whitespace fixes

Stefan Schuermans authored 13 years ago

56)   Player(const Player &that);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

57) 
58)   /// assignment operator disabled
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

59)   const Player & operator=(const Player &that);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

60) 
61) public:
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

62)   /// check for update of configuration
63)   virtual void updateConfig();
64) 
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

65)   /// callback when requsted time reached
66)   virtual void timeCall();
67) 
68) protected:
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

69)   /// light update of playlist, i.e. stat all files in current playlist
70)   void updatePlaylistLight();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

71) 
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

72)   /// full update of playlist, i.e. scan files in playlist directory
73)   void updatePlaylistFull();
74) 
75)   /// process current frame
76)   void procFrame();
77) 
78)   /// send current frame to output stream
79)   void sendFrame();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

80) 
81) protected:
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

82)   OutStreamFile            m_fileOutStream; ///< output stream name file
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

83)   Directory                m_dirPlaylist;   ///< playlist directory
84)   Playlist                 m_playlist;      ///< current playlist
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

85)   bool                     m_curValid;      ///< if there is a current frame
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

86)   Playlist::const_iterator m_curEntry;      ///< current playlist entry
87)   int                      m_curFrame;      ///< current frame in movie
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

88)   Time                     m_nextTime;      ///< when to show next frame