Gnash
0.8.10
|
#include <MovieFactory.h>
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 |
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.
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::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.
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 assert, gnash::GNASH_FILETYPE_JPEG, gnash::GNASH_FILETYPE_PNG, gnash::GNASH_FILETYPE_GIF, _, gnash::GNASH_FILETYPE_SWF, and gnash::GNASH_FILETYPE_FLV.
Referenced by makeMovie(), and clear().