Public Member Functions

gnash::RunResources Class Reference

Class to group together per-run and external resources for Gnash. More...

#include <RunResources.h>

List of all members.

Public Member Functions

 RunResources (const std::string &baseURL)
 Constructs a RunResources instance with an immutable base URL.
const std::string & baseURL () const
 Get the base URL for the run.
void setStreamProvider (boost::shared_ptr< StreamProvider > sp)
 Set the StreamProvider.
const StreamProviderstreamProvider () const
 Get a StreamProvider instance.
void setSoundHandler (boost::shared_ptr< sound::sound_handler > s)
 Set the sound::sound_handler.
sound::sound_handlersoundHandler () const
 Get a pointer to a sound::sound_handler set by a hosting application.
void setMediaHandler (boost::shared_ptr< media::MediaHandler > s)
media::MediaHandlermediaHandler () const
void setRenderer (boost::shared_ptr< Renderer > r)
Rendererrenderer () const
void setTagLoaders (boost::shared_ptr< const SWF::TagLoadersTable > loaders)
 Set the loader functions for SWF parsing.
const SWF::TagLoadersTabletagLoaders () const
 Get the loader function table for parsing a SWF.
void setRenderBackend (const std::string &x)
std::string & getRenderBackend ()
std::string & getHWAccelBackend ()
void setHWAccelBackend (const std::string &x)

Detailed Description

Class to group together per-run and external resources for Gnash.

This holds the following resources:


Constructor & Destructor Documentation

gnash::RunResources::RunResources ( const std::string &  baseURL  )  [inline]

Constructs a RunResources instance with an immutable base URL.

Parameters:
baseURL The base URL for the run. This cannot be changed after construction.

Member Function Documentation

const std::string& gnash::RunResources::baseURL (  )  const [inline]

Get the base URL for the run.

Returns:
The base URL set at construction.

Referenced by gnash::NetConnection_as::getStream(), gnash::MovieLoader::loadMovie(), and gnash::Gui::takeScreenShot().

std::string& gnash::RunResources::getHWAccelBackend (  )  [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 --render-mode option to gnash.

std::string& gnash::RunResources::getRenderBackend (  )  [inline]

Referenced by gnash::Kde4Gui::init().

media::MediaHandler* gnash::RunResources::mediaHandler (  )  const [inline]

Referenced by gnash::Video::Video().

Renderer* gnash::RunResources::renderer (  )  const [inline]
void gnash::RunResources::setHWAccelBackend ( const std::string &  x  )  [inline]
void gnash::RunResources::setMediaHandler ( boost::shared_ptr< media::MediaHandler s  )  [inline]

Referenced by main().

void gnash::RunResources::setRenderBackend ( 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 --hwaccel option to gnash.

void gnash::RunResources::setRenderer ( boost::shared_ptr< Renderer r  )  [inline]
void gnash::RunResources::setSoundHandler ( boost::shared_ptr< sound::sound_handler s  )  [inline]

Set the sound::sound_handler.

Parameters:
s A pointer to the sound::sound_handler for use by Gnash core. This may also be NULL. This is cached in various places, so changing it during a run will lead to unexpected behaviour.

Referenced by main(), and cygnal::vm_main().

void gnash::RunResources::setStreamProvider ( boost::shared_ptr< StreamProvider sp  )  [inline]

Set the StreamProvider.

This can probably be changed during a run without ill effects.

Referenced by main().

void gnash::RunResources::setTagLoaders ( boost::shared_ptr< const SWF::TagLoadersTable loaders  )  [inline]

Set the loader functions for SWF parsing.

This must be present before parsing. It is a pointer to const so that the same table can be shared between simultaneous runs if desired.

Referenced by main().

sound::sound_handler* gnash::RunResources::soundHandler (  )  const [inline]
const StreamProvider& gnash::RunResources::streamProvider (  )  const [inline]

Get a StreamProvider instance.

This isn't optional. It must always be available, or nothing can be loaded.

Returns:
A StreamProvider (presently a global singleton).

Referenced by gnash::NetConnection_as::getStream().

const SWF::TagLoadersTable& gnash::RunResources::tagLoaders (  )  const [inline]

Get the loader function table for parsing a SWF.

Referenced by gnash::SWFParser::read().


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