Ginga  0.13.6
 All Classes Namespaces Functions Variables
IPlayer.h
1 /******************************************************************************
2 Este arquivo eh parte da implementacao do ambiente declarativo do middleware
3 Ginga (Ginga-NCL).
4 
5 Direitos Autorais Reservados (c) 1989-2007 PUC-Rio/Laboratorio TeleMidia
6 
7 Este programa eh software livre; voce pode redistribui-lo e/ou modificah-lo sob
8 os termos da Licenca Publica Geral GNU versao 2 conforme publicada pela Free
9 Software Foundation.
10 
11 Este programa eh distribuido na expectativa de que seja util, porem, SEM
12 NENHUMA GARANTIA; nem mesmo a garantia implicita de COMERCIABILIDADE OU
13 ADEQUACAO A UMA FINALIDADE ESPECIFICA. Consulte a Licenca Publica Geral do
14 GNU versao 2 para mais detalhes.
15 
16 Voce deve ter recebido uma copia da Licenca Publica Geral do GNU versao 2 junto
17 com este programa; se nao, escreva para a Free Software Foundation, Inc., no
18 endereco 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
19 
20 Para maiores informacoes:
21 ncl @ telemidia.puc-rio.br
22 http://www.ncl.org.br
23 http://www.ginga.org.br
24 http://www.telemidia.puc-rio.br
25 ******************************************************************************
26 This file is part of the declarative environment of middleware Ginga (Ginga-NCL)
27 
28 Copyright: 1989-2007 PUC-RIO/LABORATORIO TELEMIDIA, All Rights Reserved.
29 
30 This program is free software; you can redistribute it and/or modify it under
31 the terms of the GNU General Public License version 2 as published by
32 the Free Software Foundation.
33 
34 This program is distributed in the hope that it will be useful, but WITHOUT ANY
35 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
36 PARTICULAR PURPOSE. See the GNU General Public License version 2 for more
37 details.
38 
39 You should have received a copy of the GNU General Public License version 2
40 along with this program; if not, write to the Free Software
41 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
42 
43 For further information contact:
44 ncl @ telemidia.puc-rio.br
45 http://www.ncl.org.br
46 http://www.ginga.org.br
47 http://www.telemidia.puc-rio.br
48 *******************************************************************************/
49 
50 #ifndef IPLAYER_H_
51 #define IPLAYER_H_
52 
53 #include <stdint.h>
54 
55 #include "mb/interface/IWindow.h"
56 #include "mb/interface/ISurface.h"
57 #include "mb/interface/IImageProvider.h"
58 using namespace ::br::pucrio::telemidia::ginga::core::mb;
59 
60 #include "IPlayerListener.h"
61 
62 #include <map>
63 #include <string>
64 using namespace std;
65 
66 namespace br {
67 namespace pucrio {
68 namespace telemidia {
69 namespace ginga {
70 namespace core {
71 namespace player {
72  class IPlayer {
73  public:
74  static const short PL_NOTIFY_START = 1;
75  static const short PL_NOTIFY_PAUSE = 2;
76  static const short PL_NOTIFY_RESUME = 3;
77  static const short PL_NOTIFY_STOP = 4;
78  static const short PL_NOTIFY_ABORT = 5;
79  static const short PL_NOTIFY_NCLEDIT = 6;
80  static const short PL_NOTIFY_UPDATECONTENT = 7;
81  static const short PL_NOTIFY_OUTTRANS = 8;
82 
83  static const short TYPE_PRESENTATION = 10;
84  static const short TYPE_ATTRIBUTION = 11;
85  static const short TYPE_SIGNAL = 12;
86  static const short TYPE_PASSIVEDEVICE = 13;
87  static const short TYPE_SELECTION = 14;
88 
89  virtual ~IPlayer(){};
90 
91  virtual void flip()=0;
92  virtual ISurface* getSurface()=0;
93  virtual void setMrl(string mrl, bool visible=true)=0;
94  virtual void reset()=0;
95  virtual void rebase()=0;
96  //virtual void setStandByState(bool standBy)=0;
97  virtual void setNotifyContentUpdate(bool notify)=0;
98  virtual void addListener(IPlayerListener* listener)=0;
99  virtual void removeListener(IPlayerListener* listener)=0;
100  virtual void notifyPlayerListeners(
101  short code, string paremeter, short type, string value)=0;
102 
103  virtual int64_t getVPts()=0;
104  virtual double getMediaTime()=0;
105  virtual double getTotalMediaTime()=0;
106  virtual void setMediaTime(double newTime)=0;
107  virtual bool setKeyHandler(bool isHandler)=0;
108  virtual void setScope(
109  string scope,
110  short type,
111  double begin=-1, double end=-1, double outTransDur=-1)=0;
112 
113  virtual bool play()=0;
114  virtual void stop()=0;
115  virtual void abort()=0;
116  virtual void pause()=0;
117  virtual void resume()=0;
118 
119  virtual string getPropertyValue(string name)=0;
120  virtual void setPropertyValue(string name, string value)=0;
121 
122  virtual void setReferenceTimePlayer(IPlayer* player)=0;
123  virtual void addTimeReferPlayer(IPlayer* referPlayer)=0;
124  virtual void removeTimeReferPlayer(IPlayer* referPlayer)=0;
125  virtual void notifyReferPlayers(int transition)=0;
126  virtual void timebaseObjectTransitionCallback(int transition)=0;
127  virtual void setTimeBasePlayer(IPlayer* timeBasePlayer)=0;
128  virtual bool hasPresented()=0;
129  virtual void setPresented(bool presented)=0;
130  virtual bool isVisible()=0;
131  virtual void setVisible(bool visible)=0;
132  virtual bool immediatelyStart()=0;
133  virtual void setImmediatelyStart(bool immediatelyStartVal)=0;
134  virtual void forceNaturalEnd(bool forceIt)=0;
135  virtual bool isForcedNaturalEnd()=0;
136  virtual bool setOutWindow(GingaWindowID windowId)=0;
137 
138  /*Exclusive for ChannelPlayer*/
139  virtual IPlayer* getSelectedPlayer()=0;
140  virtual void setPlayerMap(map<string, IPlayer*>* objs)=0;
141  virtual map<string, IPlayer*>* getPlayerMap()=0;
142  virtual IPlayer* getPlayer(string objectId)=0;
143  virtual void select(IPlayer* selObject)=0;
144 
145  /*Exclusive for Application Players*/
146  virtual void setCurrentScope(string scopeId)=0;
147 
148  virtual void timeShift(string direction)=0;
149  };
150 }
151 }
152 }
153 }
154 }
155 }
156 
157 typedef ::br::pucrio::telemidia::ginga::core::player::IPlayer* PlayerCreator(
158  GingaScreenID screenId, const char* mrl, bool* hasVisual);
159 
160 typedef void PlayerDestroyer(
162 
163 #endif /*IPLAYER_H_*/
Definition: Player.h:249