b6b2996b76e1b0f0e403b4be40430a445bc0873c
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

1) /* Blinker
Stefan Schuermans update copyright years

Stefan Schuermans authored 10 years ago

2)    Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
4)    a blinkenarea.org project */
5) 
Stefan Schuermans namespace for preprocessor...

Stefan Schuermans authored 12 years ago

6) #ifndef BLINKER_PLAYER_H
7) #define BLINKER_PLAYER_H
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

8) 
9) #include <list>
10) #include <string>
11) 
12) #include <BlinkenLib/BlinkenMovie.h>
13) 
14) #include "Directory.h"
15) #include "File.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

16) #include "InStreamFile.h"
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

17) #include "ListTracker.h"
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

18) #include "Mgrs.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

20) #include "OutStreamFile.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

21) #include "StreamRecv.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

22) #include "Time.h"
23) #include "TimeCallee.h"
24) 
25) namespace Blinker {
26) 
27) /// a movie player
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

29) {
30) protected:
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

31)   /// movie in playlist
32)   class Movie;
33) 
34)   /// playlist tracker
35)   typedef ListTracker<Player, Movie, File> PlaylistTracker;
36) 
37)   /// playlist iterator
38)   typedef PlaylistTracker::ListIt PlaylistIt;
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

39) 
40) public:
41)   /**
42)    * @brief constructor
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

43)    * @param[in] name module name
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

44)    * @param[in] mgrs managers
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

45)    * @param[in] dirBase base directory
46)    */
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

47)   Player(const std::string &name, Mgrs &mgrs, const Directory &dirBase);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

48) 
49)   /// virtual destructor
50)   virtual ~Player();
51) 
52) private:
53)   /// copy constructor disabled
Stefan Schuermans whitespace fixes

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

55) 
56)   /// assignment operator disabled
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

58) 
59) public:
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

60)   /// check for update of configuration
61)   virtual void updateConfig();
62) 
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

63)   /**
64)    * @brief set current frame
65)    * @param[in] stream stream name
66)    * @param[in] pFrame current frame (NULL for none)
67)    */
68)   virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame);
69) 
Stefan Schuermans fixed comment typo

Stefan Schuermans authored 12 years ago

70)   /// callback when requested time reached
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

71)   virtual void timeCall();
72) 
73) protected:
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

74)   /// check if current movie changed and react
75)   void checkCurChanged();
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

76) 
77)   /// process current frame
78)   void procFrame();
79) 
80)   /// send current frame to output stream
81)   void sendFrame();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

82) 
83) protected:
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

84)   OutStreamFile   m_fileOutStream;   ///< output stream name file
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

85)   InStreamFile    m_fileHaltStream;  /**< halt stream name file
86)                                           (player halts if stream active) */
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

87)   PlaylistTracker m_playlistTracker; ///< current playlist
88)   bool            m_curValid;        ///< if there is a current frame
89)   PlaylistIt      m_curEntry;        ///< current playlist entry
90)   int             m_curFrame;        ///< current frame in movie
91)   bool            m_curChange;       ///< current movie changed
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

92)   bool            m_halted;          ///< if player is halted
93)   Time            m_remainTime;      /**< remaining time of current frame
94)                                           (valid if m_curValid && m_halted) */
95)   Time            m_nextTime;        /**< when to show next frame
96)                                           (valid if m_curValid && !m_halted) */
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

97) }; // class Player
98) 
99) } // namespace Blinker
100) 
Stefan Schuermans namespace for preprocessor...

Stefan Schuermans authored 12 years ago

101) #endif // #ifndef BLINKER_PLAYER_H