Gnash  0.8.10
Classes | Public Member Functions
gnash::Player Class Reference

#include <Player.h>

List of all members.

Classes

class  CallbacksHandler

Public Member Functions

 Player ()
 ~Player ()
void run (int argc, char *argv[], const std::string &infile, const std::string &url="")
 Play the movie at the given url/path.
float setScale (float s)
void setDelay (unsigned int d)
void setWidth (size_t w)
size_t getWidth () const
void setHeight (size_t h)
size_t getHeight () const
void setXPosition (int xPos)
size_t getXPosition () const
void setYPosition (int yPos)
size_t getYPosition () const
void setWindowId (unsigned long x)
void setDoLoop (bool b)
void setDoRender (bool b)
void setDoSound (bool b)
void setMaxAdvances (unsigned long ul)
void setBaseUrl (const std::string &baseurl)
 Set the base url for this run.
float setExitTimeout (float n)
void setParam (const std::string &name, const std::string &value)
void setHostFD (int fd)
int getHostFD () const
void setMedia (const std::string &media)
void setControlFD (int fd)
int getControlFD () const
void setStartFullscreen (bool x)
void hideMenu (bool x)
void setAudioDumpfile (const std::string &filespec)
void setRenderer (const std::string &x)
void setHWAccel (const std::string &x)
void setScreenShots (const std::string &screenshots)
 This should be a comma-separated list of frames.
void setScreenShotFile (const std::string &file)
 Set the filename for screenshot output.
void setScreenShotQuality (int quality)
 Set the quality for screenshot output.

Detailed Description

This class is an attempt at simplifying the code required to simply start the SWF player. The idea was to use it from the plugin so we can set callback for getUrl and fs_commands w/out the need of using FIFOs or sockets or whatever else.


Constructor & Destructor Documentation

Player::Player ( )
Player::~Player ( )

Member Function Documentation

int gnash::Player::getControlFD ( ) const [inline]
size_t gnash::Player::getHeight ( ) const [inline]

Referenced by main().

int gnash::Player::getHostFD ( ) const [inline]
size_t gnash::Player::getWidth ( ) const [inline]

Referenced by main().

size_t gnash::Player::getXPosition ( ) const [inline]
size_t gnash::Player::getYPosition ( ) const [inline]
void gnash::Player::hideMenu ( bool  x) [inline]

References x.

void Player::run ( int  argc,
char *  argv[],
const std::string &  infile,
const std::string &  url = "" 
)

Play the movie at the given url/path.

Run, used to open a new flash file. Using previous initialization.

Parameters:
argcnumber of argument strings in argv
argvargument strings
urlan optional url to assign to the given movie. if unspecified the url will be set to the movie path/url.

The RunResources should be populated before parsing.

The StreamProvider uses the actual URL of the loaded movie.

References assert, gnash::URL::str(), url, gnash::SWF::addDefaultLoaders(), gnash::GnashFactory::instance(), _, gnash::RcInitFile::getDefaultInstance(), gnash::RcInitFile::startStopped(), gnash::stringToStageAlign(), test::v, gnash::key::p, and gnash::fontlib::clear().

Referenced by playFile().

void gnash::Player::setAudioDumpfile ( const std::string &  filespec) [inline]
void gnash::Player::setBaseUrl ( const std::string &  baseurl) [inline]

Set the base url for this run.

The base url will be used to resolve relative urls on load requests.

void gnash::Player::setControlFD ( int  fd) [inline]
void gnash::Player::setDelay ( unsigned int  d) [inline]

References gnash::key::d.

void gnash::Player::setDoLoop ( bool  b) [inline]

References gnash::key::b.

void gnash::Player::setDoRender ( bool  b) [inline]

References gnash::key::b.

Referenced by main().

void gnash::Player::setDoSound ( bool  b) [inline]

References gnash::key::b.

Referenced by main().

float gnash::Player::setExitTimeout ( float  n) [inline]

References gnash::key::n.

void gnash::Player::setHeight ( size_t  h) [inline]

References gnash::key::h.

void gnash::Player::setHostFD ( int  fd) [inline]
void gnash::Player::setHWAccel ( const std::string &  x) [inline]

Set the hardware video accleration backend, none, vaapi, xv, or cairo. This is set in the users gnashrc file, or can be overridden with the --hwaccel option to gnash.

References x.

void gnash::Player::setMaxAdvances ( unsigned long  ul) [inline]
void gnash::Player::setMedia ( const std::string &  media) [inline]
void gnash::Player::setParam ( const std::string &  name,
const std::string &  value 
) [inline]
void gnash::Player::setRenderer ( const std::string &  x) [inline]

Set the renderer backend, agg, opengl, or cairo. This is set in the users gnashrc file, or can be overridden with the --renderer option to gnash.

References x.

float Player::setScale ( float  s)
void gnash::Player::setScreenShotFile ( const std::string &  file) [inline]

Set the filename for screenshot output.

A f in the filename will be replaced with the frame number.

void gnash::Player::setScreenShotQuality ( int  quality) [inline]

Set the quality for screenshot output.

A f in the filename will be replaced with the frame number.

void gnash::Player::setScreenShots ( const std::string &  screenshots) [inline]

This should be a comma-separated list of frames.

Only numbers and the word "last" are valid. We parse the string here rather than in gnash.cpp to avoid making the interface to Player more complicated than it is already.

void gnash::Player::setStartFullscreen ( bool  x) [inline]

References x.

void gnash::Player::setWidth ( size_t  w) [inline]

References test::w.

void gnash::Player::setWindowId ( unsigned long  x) [inline]

References x.

void gnash::Player::setXPosition ( int  xPos) [inline]
void gnash::Player::setYPosition ( int  yPos) [inline]

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