Ginga  0.13.6.1771-df200
The iTV middleware.
Media.h
Go to the documentation of this file.
1 /* Copyright (C) 2006-2017 PUC-Rio/Laboratorio TeleMidia
2 
3 This file is part of Ginga (Ginga-NCL).
4 
5 Ginga is free software: you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9 
10 Ginga is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with Ginga. If not, see <http://www.gnu.org/licenses/>. */
17 
18 #ifndef MEDIA_H
19 #define MEDIA_H
20 
21 #include "Object.h"
22 #include "player/Player.h"
23 
25 
26 class Media: public Object
27 {
28 public:
29  Media (const string &, const string &, const string &);
30  virtual ~Media ();
31 
32  // Object:
33  string getObjectTypeAsString () override;
34  string toString () override;
35  void setProperty (const string &, const string &, Time dur=0) override;
36  void sendKeyEvent (const string &, bool) override;
37  void sendTickEvent (Time, Time, Time) override;
38  bool startTransition (Event *, Event::Transition) override;
39  void endTransition (Event *, Event::Transition) override;
40 
41  // Media:
42  virtual bool isFocused ();
43  virtual bool getZ (int *, int *);
44  virtual void redraw (cairo_t *);
45 
46 protected:
47  string _mime; // mime-type
48  string _uri; // content URI
49  Player *_player; // underlying player
50 
51  void doStop () override;
52 };
53 
55 
56 #endif // MEDIA_H
virtual ~Media()
Definition: Media.cpp:116
Definition: Object.h:29
void doStop() override
Definition: Media.cpp:457
void sendKeyEvent(const string &, bool) override
Definition: Media.cpp:161
Player * _player
Definition: Media.h:49
void sendTickEvent(Time, Time, Time) override
Definition: Media.cpp:221
#define GINGA_NAMESPACE_END
Definition: aux-ginga.h:62
virtual bool isFocused()
Definition: Media.cpp:427
virtual bool getZ(int *, int *)
Definition: Media.cpp:436
string toString() override
Definition: Media.cpp:131
virtual void redraw(cairo_t *)
Definition: Media.cpp:446
#define GINGA_NAMESPACE_BEGIN
Definition: aux-ginga.h:61
string getObjectTypeAsString() override
Definition: Media.cpp:125
Transition
Definition: Event.h:44
Definition: Media.h:26
string _uri
Definition: Media.h:48
Media(const string &, const string &, const string &)
Definition: Media.cpp:87
Definition: Event.h:27
void endTransition(Event *, Event::Transition) override
Definition: Media.cpp:295
string _mime
Definition: Media.h:47
void setProperty(const string &, const string &, Time dur=0) override
Definition: Media.cpp:146
Definition: Player.h:27
bool startTransition(Event *, Event::Transition) override
Definition: Media.cpp:250
GstClockTime Time
Definition: aux-ginga.h:115