Ginga  0.13.6.1771-df200
The iTV middleware.
PlayerVideo Class Reference

#include <PlayerVideo.h>

Inheritance diagram for PlayerVideo:
Collaboration diagram for PlayerVideo:

Public Types

enum  PlayerState { SLEEPING = 1, OCCURRING, PAUSED }
 
enum  PlayerProperty {
  PROP_UNKNOWN = 0, PROP_BACKGROUND, PROP_BALANCE, PROP_BASS,
  PROP_BOTTOM, PROP_BOUNDS, PROP_DEBUG, PROP_DURATION,
  PROP_EXPLICIT_DUR, PROP_FOCUS_INDEX, PROP_FONT_BG_COLOR, PROP_FONT_COLOR,
  PROP_FONT_FAMILY, PROP_FONT_SIZE, PROP_FONT_STYLE, PROP_FONT_VARIANT,
  PROP_FONT_WEIGHT, PROP_FREEZE, PROP_HEIGHT, PROP_HORZ_ALIGN,
  PROP_LEFT, PROP_LOCATION, PROP_MUTE, PROP_RIGHT,
  PROP_SIZE, PROP_TOP, PROP_TRANSPARENCY, PROP_TREBLE,
  PROP_VERT_ALIGN, PROP_VISIBLE, PROP_VOLUME, PROP_WIDTH,
  PROP_Z_INDEX
}
 

Public Member Functions

 PlayerVideo (Formatter *, const string &, const string &)
 
 ~PlayerVideo ()
 
void start () override
 
void stop () override
 
void pause () override
 
void resume () override
 
void redraw (cairo_t *) 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 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 sendKeyEvent (const string &, bool)
 

Static Public Member Functions

static string getCurrentFocus ()
 
static void setCurrentFocus (const string &)
 
static PlayerProperty getPlayerProperty (const string &, string *)
 
static PlayercreatePlayer (Formatter *, const string &, const string &, const string &)
 

Protected Member Functions

bool doSetProperty (PlayerProperty, const string &, const string &) override
 

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
 

Private Member Functions

bool getFreeze ()
 

Static Private Member Functions

static gboolean cb_Bus (GstBus *, GstMessage *, PlayerVideo *)
 
static GstFlowReturn cb_NewSample (GstAppSink *, gpointer)
 

Private Attributes

GstElement * _playbin
 
struct {
   GstElement *   bin
 
   GstElement *   volume
 
   GstElement *   pan
 
   GstElement *   equalizer
 
   GstElement *   convert
 
   GstElement *   sink
 
_audio
 
struct {
   GstElement *   bin
 
   GstElement *   caps
 
   GstElement *   sink
 
_video
 
int _sample_flag
 
GstAppSinkCallbacks _callbacks
 
struct {
   bool   mute
 
   double   balance
 
   double   volume
 
   double   treble
 
   double   bass
 
   bool   freeze
 
_prop
 

Member Enumeration Documentation

enum Player::PlayerProperty
inherited
Enumerator
PROP_UNKNOWN 
PROP_BACKGROUND 
PROP_BALANCE 
PROP_BASS 
PROP_BOTTOM 
PROP_BOUNDS 
PROP_DEBUG 
PROP_DURATION 
PROP_EXPLICIT_DUR 
PROP_FOCUS_INDEX 
PROP_FONT_BG_COLOR 
PROP_FONT_COLOR 
PROP_FONT_FAMILY 
PROP_FONT_SIZE 
PROP_FONT_STYLE 
PROP_FONT_VARIANT 
PROP_FONT_WEIGHT 
PROP_FREEZE 
PROP_HEIGHT 
PROP_HORZ_ALIGN 
PROP_LEFT 
PROP_LOCATION 
PROP_MUTE 
PROP_RIGHT 
PROP_SIZE 
PROP_TOP 
PROP_TRANSPARENCY 
PROP_TREBLE 
PROP_VERT_ALIGN 
PROP_VISIBLE 
PROP_VOLUME 
PROP_WIDTH 
PROP_Z_INDEX 
enum Player::PlayerState
inherited
Enumerator
SLEEPING 
OCCURRING 
PAUSED 

Constructor & Destructor Documentation

PlayerVideo::PlayerVideo ( Formatter formatter,
const string &  id,
const string &  uri 
)
PlayerVideo::~PlayerVideo ( )

Member Function Documentation

gboolean PlayerVideo::cb_Bus ( GstBus *  bus,
GstMessage *  msg,
PlayerVideo player 
)
staticprivate
GstFlowReturn PlayerVideo::cb_NewSample ( GstAppSink *  ,
gpointer   
)
staticprivate
Player * Player::createPlayer ( Formatter formatter,
const string &  id,
const string &  uri,
const string &  mime 
)
staticinherited
bool PlayerVideo::doSetProperty ( PlayerProperty  ,
const string &  ,
const string &   
)
overrideprotectedvirtual
string Player::getCurrentFocus ( )
staticinherited
Time Player::getDuration ( )
inherited

Referenced by Media::sendTickEvent().

bool Player::getEOS ( )
inherited

Referenced by redraw(), and Media::sendTickEvent().

bool PlayerVideo::getFreeze ( )
private

References _prop.

Referenced by cb_Bus().

Player::PlayerProperty Player::getPlayerProperty ( const string &  name,
string *  defval 
)
staticinherited
string Player::getProperty ( const string &  name)
virtualinherited

Referenced by Media::sendKeyEvent().

Player::PlayerState Player::getState ( )
inherited

Referenced by Media::doStop().

Time Player::getTime ( )
inherited
void Player::getZ ( int *  z,
int *  zorder 
)
inherited

References tryset.

Referenced by Media::getZ().

void Player::incTime ( Time  inc)
inherited

Referenced by Media::sendTickEvent().

bool Player::isFocused ( )
inherited
void PlayerVideo::pause ( )
overridevirtual
void Player::reload ( )
virtualinherited

Reimplemented in PlayerText, PlayerImage, and PlayerSvg.

References TRACE.

Referenced by PlayerImage::reload(), PlayerSvg::reload(), and PlayerText::reload().

void Player::resetProperties ( )
inherited
void Player::resetProperties ( set< string > *  props)
inherited
void PlayerVideo::resume ( )
overridevirtual
void Player::schedulePropertyAnimation ( const string &  name,
const string &  from,
const string &  to,
Time  dur 
)
inherited

Referenced by Media::setProperty().

void Player::sendKeyEvent ( const string &  ,
bool   
)
virtualinherited

Reimplemented in PlayerLua.

References Player::_currentFocus.

Referenced by Media::sendKeyEvent().

void Player::setCurrentFocus ( const string &  index)
staticinherited

References TRACE.

Referenced by MediaSettings::setProperty().

void Player::setDuration ( Time  duration)
inherited
void Player::setEOS ( bool  eos)
inherited

Referenced by cb_Bus(), and start().

void Player::setProperty ( const string &  name,
const string &  value 
)
virtualinherited
void Player::setZ ( int  z,
int  zorder 
)
inherited
void PlayerVideo::start ( )
overridevirtual
void PlayerVideo::stop ( )
overridevirtual

Member Data Documentation

PlayerAnimator* Player::_animator
protectedinherited
struct { ... } PlayerVideo::_audio

Referenced by doSetProperty(), PlayerVideo(), and start().

GstAppSinkCallbacks PlayerVideo::_callbacks
private

Referenced by PlayerVideo().

bool Player::_dirty
protectedinherited
bool Player::_eos
protectedinherited
Formatter* Player::_formatter
protectedinherited
guint Player::_gltexture
protectedinherited
string Player::_id
protectedinherited
bool Player::_opengl
protectedinherited
GstElement* PlayerVideo::_playbin
private

Referenced by pause(), PlayerVideo(), resume(), start(), and stop().

struct { ... } PlayerVideo::_prop

Referenced by doSetProperty(), getFreeze(), and start().

map<string, string> Player::_properties
protectedinherited
int PlayerVideo::_sample_flag
private

Referenced by cb_NewSample(), redraw(), and start().

cairo_surface_t* Player::_surface
protectedinherited
Time Player::_time
protectedinherited
string Player::_uri
protectedinherited
struct { ... } PlayerVideo::_video

Referenced by PlayerVideo(), redraw(), and start().

guint8 Player::alpha
inherited
double PlayerVideo::balance
double PlayerVideo::bass
Color Player::bgColor
inherited
GstElement* PlayerVideo::bin
GstElement* PlayerVideo::caps

Referenced by redraw(), and start().

GstElement* PlayerVideo::convert
bool Player::debug
inherited
Time Player::duration
inherited
GstElement* PlayerVideo::equalizer
string Player::focusIndex
inherited
bool PlayerVideo::freeze
bool PlayerVideo::mute
GstElement* PlayerVideo::pan
Rect Player::rect
inherited
GstElement* PlayerVideo::sink
double PlayerVideo::treble
bool Player::visible
inherited
GstElement* PlayerVideo::volume
double PlayerVideo::volume
int Player::z
inherited
int Player::zorder
inherited

The documentation for this class was generated from the following files: