baf52dacd8003c3ac6d43bfef7073aae9e871e3b
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 "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 put all managers in one str...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

44)    * @param[in] dirBase base directory
45)    */
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

46)   Player(Mgrs &mgrs, const Directory &dirBase);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

100) #endif // #ifndef BLINKER_PLAYER_H