Static Public Member Functions | Static Public Attributes

gnash::MovieFactory Class Reference

#include <MovieFactory.h>

Collaboration diagram for gnash::MovieFactory:
Collaboration graph
[legend]

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=NULL, bool startLoaderThread=true, const std::string *postdata=NULL)
 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 Public Attributes

static MovieLibrary movieLibrary

Member Function Documentation

boost::intrusive_ptr< movie_definition > gnash::MovieFactory::makeMovie ( const URL url,
const RunResources runResources,
const char *  real_url = NULL,
bool  startLoaderThread = true,
const std::string *  postdata = NULL 
) [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:
url The URL to load the movie from.
runResources A RunResources containing resources needed for parsing, such as the base URL for the run, the sound::sound_handler, and a StreamProvider.
real_url The 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.
startLoaderThread If 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.
postdata If 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::MovieLibrary::add(), gnash::MovieLibrary::get(), movieLibrary, and gnash::URL::str().

Referenced by gnash::MovieTester::MovieTester().

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:
in The stream to load the movie from. Ownership is transferred to the returned object.
url The url to use as the _url member of the resulting movie definition. This is required as it can not be derived from the IOChannel.
runResources A RunResources containing resources needed for parsing, such as the base URL for the run, the sound::sound_handler, and a StreamProvider.
startLoaderThread If 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 _, gnash::GNASH_FILETYPE_FLV, gnash::GNASH_FILETYPE_GIF, gnash::GNASH_FILETYPE_JPEG, gnash::GNASH_FILETYPE_PNG, and gnash::GNASH_FILETYPE_SWF.


Member Data Documentation

Referenced by gnash::clear(), and makeMovie().


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