|
Ginga
0.13.6.1771-df200
The iTV middleware.
|
A player class for HTML. More...
#include <PlayerHTML.h>


Public Member Functions | |
| PlayerHTML (const string &location) | |
| Default constructor for PlayerHTML. More... | |
| virtual | ~PlayerHTML () |
| Default destructor for PlayerHTML. More... | |
| virtual bool | play () override |
| Start the presentation. More... | |
| virtual void | stop () override |
| Stop the presentation. More... | |
| virtual void | handleKeyEvent (SDL_EventType type, SDL_Keycode key) override |
| Process keyboard input events. More... | |
| virtual void | handleTickEvent (Time, Time, int) override |
| PlayerState | getState () |
| bool | isFocused () |
| Time | getTime () |
| void | incTime (Time) |
| Time | getDuration () |
| void | setDuration (Time) |
| bool | getEOS () |
| void | setEOS (bool) |
| void | getZ (int *, int *) |
| void | setZ (int, int) |
| virtual void | start () |
| virtual void | pause () |
| virtual void | resume () |
| virtual string | getProperty (const string &) |
| virtual void | setProperty (const string &, const string &) |
| void | resetProperties () |
| void | resetProperties (set< string > *) |
| void | schedulePropertyAnimation (const string &, const string &, const string &, Time) |
| virtual void | reload () |
| virtual void | redraw (cairo_t *) |
| virtual void | sendKeyEvent (const string &, bool) |
Static Public Member Functions | |
| static string | getCurrentFocus () |
| static void | setCurrentFocus (const string &) |
| static PlayerProperty | getPlayerProperty (const string &, string *) |
| static Player * | createPlayer (Formatter *, const string &, const string &, const string &) |
Protected Member Functions | |
| virtual bool | doSetProperty (PlayerProperty, const string &, const string &) |
Protected Attributes | |
| Formatter * | _formatter |
| bool | _opengl |
| string | _id |
| string | _uri |
| PlayerState | _state |
| Time | _time |
| bool | _eos |
| cairo_surface_t * | _surface |
| guint | _gltexture |
| bool | _dirty |
| PlayerAnimator * | _animator |
| map< string, string > | _properties |
| struct { | |
| bool debug | |
| string focusIndex | |
| Rect rect | |
| int z | |
| int zorder | |
| guint8 alpha | |
| Color bgColor | |
| bool visible | |
| Time duration | |
| } | _prop |
Private Member Functions | |
| bool | displayJobCallback (DisplayJob *job, SDL_Renderer *renderer) |
| Defines the job actions to be executed by the renderer. More... | |
| void | mouseInputCallback (SDL_EventType type, int x, int y) |
| Process mouse input events. More... | |
| int | getPlayerKey (SDL_Keycode key) |
| Translate a SDL key code to a CEF key code. More... | |
Static Private Member Functions | |
| static bool | displayJobCallbackWrapper (DisplayJob *job, SDL_Renderer *renderer, void *self) |
| Defines mutex methods. More... | |
Private Attributes | |
| CefRefPtr< GingaCefHandler > | _handler |
| Keep the active handler instance, needed to create a new client instance. More... | |
| CefRefPtr< GingaCefClient > | _client |
| Keep the active client instance, needed to create a new browser instance. More... | |
| CefRefPtr< CefBrowser > | _browser |
| Keep the active browser instance. More... | |
| bool | _isPlaying |
| Keep execution player status. More... | |
A player class for HTML.
This class is responsible to present HTML pages. The player use the Chromium Embedded Framework (CEF) together with SDL to render the result in the screen.
|
inherited |
|
inherited |
|
explicit |
Default constructor for PlayerHTML.
| location | An URI for the HTML file. |
References _browser, _client, _handler, _isPlaying, and g_assert().
|
virtual |
Default destructor for PlayerHTML.
|
staticinherited |
References g_assert_nonnull(), unlikely, WARNING, and xstrhasprefix().
Referenced by Media::startTransition().
|
private |
Defines the job actions to be executed by the renderer.
| job | The job data. |
| renderer | The renderer. |
This method create a new browser and load the page to be render in the screen. In case the browser already exist, just process the browser events and update the screen. Return false only when stop() is called.
References _browser, _client, _handler, and _isPlaying.
|
staticprivate |
Defines mutex methods.
This MACRO is defined in src/ginga.h. Defines the job actions to be executed by the renderer.
| job | The job data. |
| renderer | The renderer. |
| self | The object instance. |
Actually, this is just a wrapper to displayJobCallback().
Referenced by play().
|
protectedvirtualinherited |
Reimplemented in PlayerLua, PlayerText, and PlayerVideo.
References g_assert(), GINGA_TIME_NONE, parse_bool(), parse_color(), parse_percent(), parse_pixel(), parse_time(), try_parse_list(), unlikely, and xstrtoint().
Referenced by PlayerVideo::doSetProperty(), PlayerText::doSetProperty(), and PlayerLua::doSetProperty().
|
staticinherited |
|
inherited |
Referenced by Media::sendTickEvent().
|
inherited |
Referenced by PlayerVideo::redraw(), and Media::sendTickEvent().
|
private |
Translate a SDL key code to a CEF key code.
| key | A SDL key code. |
Referenced by handleKeyEvent().
|
staticinherited |
References g_assert(), player_property_aliases, player_property_map, and tryset.
Referenced by Player::setProperty().
|
virtualinherited |
Referenced by Media::sendKeyEvent().
|
inherited |
Referenced by Media::doStop().
|
inherited |
|
inherited |
References tryset.
Referenced by Media::getZ().
|
overridevirtual |
Process keyboard input events.
| type | A SDL event type (SDL_KEYDOWN or SDL_KEYUP). |
| key | A SDL key code. |
This method translate the key code captured by SDL in the event to the CEF code style and forward the events to the active browser.
References _browser, and getPlayerKey().
|
inherited |
Referenced by Media::sendTickEvent().
|
inherited |
Referenced by Media::isFocused(), and Media::sendKeyEvent().
|
private |
Process mouse input events.
| type | A SDL event type (SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP) |
| x | The X coordinate, relative to window. |
| y | The Y coordinate, relative to window. |
This method forward the events captured by SDL to the active browser.
References _browser.
|
virtualinherited |
Reimplemented in PlayerLua, and PlayerVideo.
References g_assert(), and TRACE.
Referenced by PlayerVideo::pause().
|
overridevirtual |
Start the presentation.
This method adds a new display job to start the presentation.
References _isPlaying, and displayJobCallbackWrapper().
|
virtualinherited |
Reimplemented in PlayerLua, and PlayerVideo.
References GL::draw_quad(), and g_assert().
Referenced by PlayerVideo::redraw(), PlayerLua::redraw(), and Media::redraw().
|
virtualinherited |
Reimplemented in PlayerText, PlayerImage, and PlayerSvg.
References TRACE.
Referenced by PlayerImage::reload(), PlayerSvg::reload(), and PlayerText::reload().
|
inherited |
References player_property_map.
Referenced by PlayerText::PlayerText(), and PlayerVideo::PlayerVideo().
|
inherited |
|
virtualinherited |
Reimplemented in PlayerLua, and PlayerVideo.
References g_assert(), and TRACE.
Referenced by PlayerVideo::resume().
|
inherited |
Referenced by Media::setProperty().
|
virtualinherited |
|
staticinherited |
References TRACE.
Referenced by MediaSettings::setProperty().
|
inherited |
|
inherited |
Referenced by PlayerVideo::cb_Bus(), and PlayerVideo::start().
|
virtualinherited |
References PlayerPropertyInfo::code, PlayerPropertyInfo::defval, ERROR, Player::getPlayerProperty(), Player::PROP_UNKNOWN, and unlikely.
Referenced by Media::setProperty(), and Media::startTransition().
|
inherited |
|
virtualinherited |
Reimplemented in PlayerLua, and PlayerVideo.
References g_assert(), and TRACE.
Referenced by PlayerVideo::start(), PlayerLua::start(), and Media::startTransition().
|
overridevirtual |
Stop the presentation.
This method stop the presentation by finishing the display job and cleaning the screen.
Reimplemented from Player.
References _browser, _client, _handler, and _isPlaying.
|
protectedinherited |
|
private |
Keep the active browser instance.
Referenced by displayJobCallback(), handleKeyEvent(), mouseInputCallback(), PlayerHTML(), and stop().
|
private |
Keep the active client instance, needed to create a new browser instance.
Referenced by displayJobCallback(), PlayerHTML(), and stop().
|
protectedinherited |
Referenced by PlayerText::doSetProperty().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by PlayerVideo::redraw(), PlayerLua::redraw(), PlayerImage::reload(), PlayerText::reload(), and PlayerLua::stop().
|
private |
Keep the active handler instance, needed to create a new client instance.
Referenced by displayJobCallback(), GingaCefClient::GetRenderHandler(), GingaCefClient::GingaCefClient(), PlayerHTML(), and stop().
|
protectedinherited |
|
private |
Keep execution player status.
Referenced by displayJobCallback(), play(), PlayerHTML(), and stop().
|
protectedinherited |
Referenced by PlayerVideo::redraw(), PlayerLua::redraw(), PlayerImage::reload(), PlayerText::reload(), and PlayerLua::stop().
| struct { ... } Player::_prop |
Referenced by PlayerSvg::reload(), PlayerText::reload(), and PlayerLua::start().
|
protectedinherited |
|
protectedinherited |
Referenced by PlayerVideo::doSetProperty(), PlayerLua::doSetProperty(), PlayerVideo::pause(), PlayerLua::pause(), PlayerVideo::redraw(), PlayerLua::redraw(), PlayerSvg::reload(), PlayerVideo::resume(), PlayerLua::resume(), PlayerVideo::start(), PlayerLua::start(), PlayerVideo::stop(), and PlayerLua::stop().
|
protectedinherited |
Referenced by PlayerVideo::redraw(), PlayerLua::redraw(), PlayerSvg::reload(), PlayerImage::reload(), and PlayerText::reload().
|
protectedinherited |
|
protectedinherited |
Referenced by PlayerImage::reload(), PlayerSvg::reload(), PlayerText::reload(), and PlayerLua::start().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |