99ee20ed7723d5787a5be3a61e9aa177f611b040
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) 
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 "CallMgr.h"
15) #include "Directory.h"
16) #include "File.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

18) #include "ListTracker.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 first version, plays videos...

Stefan Schuermans authored 13 years ago

21) #include "StreamMgr.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

40) 
41) public:
42)   /**
43)    * @brief constructor
44)    * @param[in] callMgr callback manager
45)    * @param[in] streamMgr stream manager
46)    * @param[in] dirBase base directory
47)    */
48)   Player(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase);
49) 
50)   /// virtual destructor
51)   virtual ~Player();
52) 
53) private:
54)   /// copy constructor disabled
Stefan Schuermans whitespace fixes

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

102) #endif // #ifndef BLINKER_PLAYER_H