Gnash  0.8.10
Static Public Member Functions | Static Public Attributes
gnash::MovieFactory Class Reference

#include <MovieFactory.h>

List of all members.

Static Public Member Functions

static DSOEXPORT
boost::intrusive_ptr
< movie_definition
makeMovie (const URL &url, const RunResources &runResources, const char *real_url=0, bool startLoaderThread=true, const std::string *postdata=0)
 Create a gnash::movie_definition from the given URL.
static DSOEXPORT
boost::intrusive_ptr
< movie_definition
makeMovie (std::auto_ptr< IOChannel > in, const std::string &url, const RunResources &runResources, bool startLoaderThread)
 Load a movie from an already opened stream.
static DSOEXPORT void clear ()
 Clear the MovieFactory resources.

Static Public Attributes

static MovieLibrary movieLibrary

Member Function Documentation

void gnash::MovieFactory::clear ( ) [static]

Clear the MovieFactory resources.

This should be in the dtor.

References movieLibrary, and gnash::MovieLibrary::clear().

boost::intrusive_ptr< movie_definition > gnash::MovieFactory::makeMovie ( const URL url,
const RunResources runResources,
const char *  real_url = 0,
bool  startLoaderThread = true,
const std::string *  postdata = 0 
) [static]

Create a gnash::movie_definition from the given URL.

The URL can correspond to either a JPEG or SWF file.

This is just like create_movie(), except that it checks the "library" to see if a movie of this name has already been created, and returns that movie if so. Also, if it creates a new movie, it adds it back into the library.

The "library" is used when importing symbols from external movies, so this call might be useful if you want to explicitly load a movie that you know exports symbols (e.g. fonts) to other movies as well.

@ this explanation/functionality could be clearer!

If real_url is given, the movie's url will be set to that value.

Parameters:
urlThe URL to load the movie from.
runResourcesA RunResources containing resources needed for parsing, such as the base URL for the run, the sound::sound_handler, and a StreamProvider.
real_urlThe url to encode as the _url member of the resulting movie definition. Use NULL if it is not different from the actual url (default). This is used to simulate a run from the official publication url.
startLoaderThreadIf false only the header will be read, and you'll need to call completeLoad on the returned movie_definition to actually start it. This is typically used to postpone parsing until a VirtualMachine is initialized. Initializing the VirtualMachine requires a target SWF version, which can be found in the SWF header.
postdataIf not NULL, use POST method (only valid for HTTP). NOTE: when POSTing, the movies library won't be used.

Now complete the load if the movie is an SWF movie

This is a no-op except for SWF movies.

References gnash::URL::str(), movieLibrary, gnash::MovieLibrary::get(), _, and gnash::MovieLibrary::add().

boost::intrusive_ptr< movie_definition > gnash::MovieFactory::makeMovie ( std::auto_ptr< IOChannel in,
const std::string &  url,
const RunResources runResources,
bool  startLoaderThread 
) [static]

Load a movie from an already opened stream.

The movie can be both an SWF or JPEG, the url parameter will be used to set the _url member of the resulting object.

Parameters:
inThe stream to load the movie from. Ownership is transferred to the returned object.
urlThe url to use as the _url member of the resulting movie definition. This is required as it can not be derived from the IOChannel.
runResourcesA RunResources containing resources needed for parsing, such as the base URL for the run, the sound::sound_handler, and a StreamProvider.
startLoaderThreadIf false only the header will be read, and you'll need to call completeLoad on the returned movie_definition to actually start it. This is typically used to postpone parsing until a VirtualMachine is initialized. Initializing the VirtualMachine requires a target SWF version, which can be found in the SWF header.

References assert, gnash::GNASH_FILETYPE_JPEG, gnash::GNASH_FILETYPE_PNG, gnash::GNASH_FILETYPE_GIF, _, gnash::GNASH_FILETYPE_SWF, and gnash::GNASH_FILETYPE_FLV.


Member Data Documentation

Referenced by makeMovie(), and clear().


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