53 #include "system/fs/IGingaLocatorFactory.h"
54 using namespace ::br::pucrio::telemidia::ginga::core::system::fs;
56 #include "system/compat/SystemCompat.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::system::compat;
59 #include "system/thread/Thread.h"
60 using namespace ::br::pucrio::telemidia::ginga::core::system::thread;
62 #include "mb/IInputManager.h"
63 #include "mb/ILocalScreenManager.h"
64 #include "mb/interface/IInputEventListener.h"
65 #include "mb/interface/CodeMap.h"
66 using namespace ::br::pucrio::telemidia::ginga::core::mb;
72 #ifndef HAVE_CLOCKTIME
73 #define HAVE_CLOCKTIME 1
99 set<IPlayerListener*>* clone;
104 pthread_mutex_t listM;
105 pthread_mutex_t lockedListM;
106 pthread_mutex_t referM;
107 pthread_mutex_t pnMutex;
111 map<string, string> properties;
112 set<IPlayerListener*> listeners;
113 vector<LockedPlayerListener*> lockedListeners;
114 vector<PendingNotification*> pendingNotifications;
117 GingaScreenID myScreen;
119 static const short NONE = 0;
120 static const short PLAY = 1;
121 static const short PAUSE = 2;
122 static const short STOP = 3;
125 static ILocalScreenManager* dm;
127 IWindow* outputWindow;
128 double initTime, elapsedTime, elapsedPause, pauseTime;
129 set<IPlayer*> referredPlayers;
133 bool immediatelyStartVar;
134 bool forcedNaturalEnd;
135 bool notifyContentUpdate;
138 double scopeInitTime;
143 Player(GingaScreenID screenId,
string mrl);
146 virtual void flip(){};
147 virtual void setMrl(
string mrl,
bool visible=
true);
148 virtual void reset(){};
149 virtual void rebase(){};
151 virtual void setNotifyContentUpdate(
bool notify);
156 void performLockedListenersRequest();
159 void notifyPlayerListeners(
162 short type=TYPE_PRESENTATION,
166 static void* detachedNotifier(
void* ptr);
167 static void ntsNotifyPlayerListeners(
168 set<IPlayerListener*>* list,
169 short code,
string parameter,
short type,
string value);
172 virtual void setSurface(ISurface* surface);
173 virtual ISurface* getSurface();
175 virtual void setMediaTime(
double newTime);
176 virtual int64_t getVPts() {
177 clog <<
"Player::getVPts return 0" << endl;
182 double getMediaTime();
184 virtual double getMediaTime();
187 virtual double getTotalMediaTime();
189 virtual bool setKeyHandler(
bool isHandler);
190 virtual void setScope(
192 short type=TYPE_PRESENTATION,
193 double begin=-1,
double end=-1,
double outTransDur=-1);
197 virtual void abort();
198 virtual void pause();
199 virtual void resume();
200 virtual string getPropertyValue(
string name);
201 virtual void setPropertyValue(
string name,
string value);
203 virtual void setReferenceTimePlayer(
IPlayer* player){};
205 void addTimeReferPlayer(
IPlayer* referPlayer);
206 void removeTimeReferPlayer(
IPlayer* referPlayer);
207 void notifyReferPlayers(
int transition);
208 void timebaseObjectTransitionCallback(
int transition);
209 void setTimeBasePlayer(
IPlayer* timeBasePlayer);
210 virtual bool hasPresented();
211 void setPresented(
bool presented);
213 void setVisible(
bool visible);
214 bool immediatelyStart();
215 void setImmediatelyStart(
bool immediatelyStartVal);
218 void checkScopeTime();
221 static void* scopeTimeHandler(
void* ptr);
224 void forceNaturalEnd(
bool forceIt);
225 bool isForcedNaturalEnd();
226 virtual bool setOutWindow(GingaWindowID windowId);
229 virtual IPlayer* getSelectedPlayer(){
return NULL;};
230 virtual void setPlayerMap(map<string, IPlayer*>* objs){};
231 virtual map<string, IPlayer*>* getPlayerMap(){
return NULL;};
232 virtual IPlayer* getPlayer(
string objectId){
return NULL;};
233 virtual void select(
IPlayer* selObject){};
236 virtual void setCurrentScope(
string scopeId){};
238 virtual void timeShift(
string direction){};
247 using namespace ::br::pucrio::telemidia::ginga::core::player;
250 IPlayerListener* listener;
Definition: IPlayerListener.h:62