5b311bf422079c7c413879108e167ab19e66c5f6
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 converted player module to...

Stefan Schuermans authored 12 years ago

18) #include "ListTracker.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

38) 
39) public:
40)   /**
41)    * @brief constructor
42)    * @param[in] callMgr callback manager
43)    * @param[in] streamMgr stream manager
44)    * @param[in] dirBase base directory
45)    */
46)   Player(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase);
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 fixed comment typo

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

63)   virtual void timeCall();
64) 
65) protected:
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 13 years ago

68) 
69)   /// process current frame
70)   void procFrame();
71) 
72)   /// send current frame to output stream
73)   void sendFrame();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

74) 
75) protected:
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

76)   OutStreamFile   m_fileOutStream;   ///< output stream name file
77)   PlaylistTracker m_playlistTracker; ///< current playlist
78)   bool            m_curValid;        ///< if there is a current frame
79)   PlaylistIt      m_curEntry;        ///< current playlist entry
80)   int             m_curFrame;        ///< current frame in movie
81)   bool            m_curChange;       ///< current movie changed
82)   Time            m_nextTime;        ///< when to show next frame