Gnash  0.8.11dev
SWFMovieDefinition.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 // The SWFMovieDefinition is the 'root' definition of a SWF movie, including
20 // movies loaded into another SWF file. Each self-contained SWF file has exactly
21 // one SWFMovieDefinition.
22 
23 #ifndef GNASH_SWF_MOVIE_DEFINITION_H
24 #define GNASH_SWF_MOVIE_DEFINITION_H
25 
26 #ifdef HAVE_CONFIG_H
27 #include "gnashconfig.h" // for USE_SWFTREE
28 #endif
29 
30 #include <boost/intrusive_ptr.hpp>
31 
32 #include <atomic>
33 #include <vector>
34 #include <map>
35 #include <set>
36 #include <string>
37 #include <memory>
38 #include <mutex>
39 #include <thread>
40 #include <condition_variable>
41 
42 #include "movie_definition.h" // for inheritance
43 #include "StringPredicates.h"
44 #include "SWFRect.h"
45 #include "GnashNumeric.h"
46 #include "dsodefs.h" // for DSOTEXPORT
47 
48 // Forward declarations
49 namespace gnash {
50  namespace image {
51  class JpegInput;
52  }
53  class IOChannel;
54  class SWFMovieDefinition;
55  class SWFStream;
56  class movie_root;
57  class MovieClip;
58  class SWFMovie;
59  class RunResources;
60  class Font;
61  namespace SWF {
62  class DefinitionTag;
63  }
64 }
65 
66 namespace gnash {
67 
70 {
71 public:
72 
74 
76 
78  //
83  bool start();
84 
86  bool started() const;
87 
89  bool isSelfThread() const;
90 
91 private:
92 
93  SWFMovieDefinition& _movie_def;
94 
95  mutable std::mutex _mutex;
96  std::thread _thread;
97 };
98 
100 //
105 {
106 public:
107 
109  //
112  typedef std::map<int, boost::intrusive_ptr<SWF::DefinitionTag> >
114 
115  typedef CharacterContainer::iterator CharacterIterator;
116 
117  typedef CharacterContainer::const_iterator CharacterConstIterator;
118 
120  //
123  boost::intrusive_ptr<SWF::DefinitionTag> getDisplayObject(int id) const;
124 
126  //
129  DSOTEXPORT void addDisplayObject(int id, boost::intrusive_ptr<SWF::DefinitionTag> c);
130 
132  CharacterIterator begin() { return _map.begin(); }
133 
135  CharacterConstIterator begin() const { return _map.begin(); }
136 
138  CharacterIterator end() { return _map.end(); }
139 
141  CharacterConstIterator end() const { return _map.end(); }
142 
143  friend std::ostream& operator<<(std::ostream& o,
144  const CharacterDictionary& cd);
145 
146 private:
147 
148  CharacterContainer _map;
149 
150 };
151 
152 
154 //
159 {
160 public:
161 
163  //
166  SWFMovieDefinition(const RunResources& runResources);
167 
169 
171  size_t get_frame_count() const {
172  return m_frame_count;
173  }
174 
176  float get_frame_rate() const {
177  return m_frame_rate;
178  }
179 
181  const SWFRect& get_frame_size() const {
182  return m_frame_size;
183  }
184 
185  size_t get_width_pixels() const {
186  return std::ceil(twipsToPixels(m_frame_size.width()));
187  }
188 
189  size_t get_height_pixels() const {
190  return std::ceil(twipsToPixels(m_frame_size.height()));
191  }
192 
194  void setAS3() {
195  _as3 = true;
196  }
197 
199  bool isAS3() const {
200  return _as3.load();
201  }
202 
204  //
207  virtual int get_version() const { return m_version; }
208 
210  //
216  virtual size_t get_loading_frame() const;
217 
219  size_t get_bytes_loaded() const {
220  return _bytes_loaded.load();
221  }
222 
224  size_t get_bytes_total() const {
225  return m_file_length;
226  }
227 
228  DSOTEXPORT virtual void importResources(boost::intrusive_ptr<movie_definition> source,
229  const Imports& imports);
230 
231  virtual void addDisplayObject(std::uint16_t id, SWF::DefinitionTag* c);
232 
234  DSOTEXPORT SWF::DefinitionTag* getDefinitionTag(std::uint16_t id) const;
235 
236  // See dox in movie_definition
237  //
238  // locks _namedFramesMutex
239  DSOTEXPORT bool get_labeled_frame(const std::string& label, size_t& frame_number)
240  const;
241 
242  DSOTEXPORT void add_font(int font_id, boost::intrusive_ptr<Font> f);
243 
244  DSOTEXPORT Font* get_font(int font_id) const;
245 
246  Font* get_font(const std::string& name, bool bold, bool italic) const;
247 
248  // See dox in movie_definition.h
249  DSOTEXPORT CachedBitmap* getBitmap(int DisplayObject_id) const;
250 
251  // See dox in movie_definition.h
252  void addBitmap(int DisplayObject_id, boost::intrusive_ptr<CachedBitmap> im);
253 
254  // See dox in movie_definition.h
255  sound_sample* get_sound_sample(int DisplayObject_id) const;
256 
257  // See dox in movie_definition.h
258  virtual void add_sound_sample(int DisplayObject_id, sound_sample* sam);
259 
260  // See dox in movie_definition.h
261  virtual void set_loading_sound_stream_id(int id) {
262  m_loading_sound_stream = id;
263  }
264 
265  // See dox in movie_definition.h
267  return m_loading_sound_stream;
268  }
269 
270  // See dox in movie_definition.h
271  void addControlTag(boost::intrusive_ptr<SWF::ControlTag> tag) {
272  assert(tag);
273  size_t frames_loaded = get_loading_frame();
274  m_playlist[frames_loaded].push_back(tag);
275  }
276 
277  // See dox in movie_definition.h
278  //
279  // locks _namedFramesMutex
280  //
281  DSOTEXPORT void add_frame_name(const std::string& name);
282 
285  DSOTEXPORT void set_jpeg_loader(std::unique_ptr<image::JpegInput> j_in);
286 
287  // See dox in movie_definition.h
289  return m_jpeg_in.get();
290  }
291 
292  virtual const PlayList* getPlaylist(size_t frame_number) const {
293 
294 #ifndef NDEBUG
295  assert(frame_number <= _frames_loaded.load());
296 #endif
297 
298  PlayListMap::const_iterator it = m_playlist.find(frame_number);
299  if ( it == m_playlist.end() ) return nullptr;
300  else return &(it->second);
301  }
302 
304  //
312  bool readHeader(std::unique_ptr<IOChannel> in, const std::string& url);
313 
315  //
321  bool completeLoad();
322 
326  bool ensure_frame_loaded(size_t framenum) const;
327 
329  //
334  void read_all_swf();
335 
337  //
345  Movie* createMovie(Global_as& gl, DisplayObject* parent = nullptr);
346 
348  const {
349  return nullptr;
350  }
351 
352  virtual const std::string& get_url() const { return _url; }
353 
355  //
357  //
362  std::uint16_t exportID(const std::string& symbol) const;
363 
365  //
367  //
371  void registerExport(const std::string& symbol, std::uint16_t id);
372 
373 
374 #ifdef USE_SWFTREE
375 
376  // These methods attach the contents of the METADATA tag
377  // to a movie_definition.
378  virtual void storeDescriptiveMetadata(const std::string& data) {
379  _metadata = data;
380  }
381 
382  virtual const std::string& getDescriptiveMetadata() const {
383  return _metadata;
384  }
385 
386 #endif
387 
388 private:
389 
390 #ifdef USE_SWFTREE
391  // For storing descriptive metadata (information only)
392  std::string _metadata;
393 #endif
394 
396  CharacterDictionary _dictionary;
397 
399  mutable std::mutex _dictionaryMutex;
400 
401  typedef std::map<int, boost::intrusive_ptr<Font> > FontMap;
402  FontMap m_fonts;
403 
404  typedef std::map<int, boost::intrusive_ptr<CachedBitmap> > Bitmaps;
405  Bitmaps _bitmaps;
406 
407  typedef std::map<int, boost::intrusive_ptr<sound_sample> > SoundSampleMap;
408  SoundSampleMap m_sound_samples;
409 
410  typedef std::map<size_t, PlayList> PlayListMap;
411 
413  PlayListMap m_playlist;
414 
416  typedef std::map<std::string, size_t, StringNoCaseLessThan> NamedFrameMap;
417  NamedFrameMap _namedFrames;
418 
419  // Mutex protecting access to _namedFrames
420  mutable std::mutex _namedFramesMutex;
421 
423  typedef std::map<std::string, std::uint16_t,
424  StringNoCaseLessThan> Exports;
425 
427  Exports _exportTable;
428 
429  // Mutex protecting access to the export map.
430  mutable std::mutex _exportedResourcesMutex;
431 
434  typedef std::vector<boost::intrusive_ptr<movie_definition> > ImportVect;
435  ImportVect m_import_source_movies;
436 
437  SWFRect m_frame_size;
438  float m_frame_rate;
439  size_t m_frame_count;
440  int m_version;
441 
443  std::atomic<size_t> _frames_loaded;
444 
446  mutable std::condition_variable _frame_reached_condition;
447 
449  mutable std::atomic<size_t> _waiting_for_frame;
450 
452  std::atomic<unsigned long> _bytes_loaded;
453 
454  int m_loading_sound_stream;
455 
456  std::uint32_t m_file_length;
457 
458  std::unique_ptr<image::JpegInput> m_jpeg_in;
459 
460  std::string _url;
461 
463  std::unique_ptr<SWFStream> _str;
464 
465  std::unique_ptr<IOChannel> _in;
466 
468  // This is set by readHeader, and used in the parsing thread, which starts
469  // after readHeader() runs.
470  size_t _swf_end_pos;
471 
473  SWFMovieLoader _loader;
474 
478  DSOTEXPORT virtual void incrementLoadedFrames();
479 
481  void setBytesLoaded(unsigned long bytes)
482  {
483  _bytes_loaded=bytes;
484  }
485 
487  mutable std::mutex _loadingCanceledMutex;
488  bool _loadingCanceled;
489 
491  std::set< boost::intrusive_ptr<movie_definition> > _importSources;
492 
493 private:
494 
497  //
501  const RunResources& _runResources;
502 
503  std::atomic<bool> _as3;
504 
505 };
506 
507 } // namespace gnash
508 
509 #endif
gnash::NSV::CLASS_MOVIE_CLIP
@ CLASS_MOVIE_CLIP
Definition: namedStrings.h:227
gnash::SWFMovieDefinition::readHeader
bool readHeader(std::unique_ptr< IOChannel > in, const std::string &url)
Read the header of the SWF file.
Definition: SWFMovieDefinition.cpp:246
SWFParser.h
gnash::SWFMovieDefinition::~SWFMovieDefinition
DSOTEXPORT ~SWFMovieDefinition()
Definition: SWFMovieDefinition.cpp:150
TypesParser.h
name
std::string name
Definition: LocalConnection_as.cpp:149
ControlTag.h
gnash::log_swferror
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
gnash::SWFMovieDefinition::createDisplayObject
virtual DisplayObject * createDisplayObject(Global_as &, DisplayObject *) const
Create a DisplayObject with the given parent.
Definition: SWFMovieDefinition.h:347
gnash::CharacterDictionary::end
CharacterIterator end()
Return an iterator to one-past last dictionary element.
Definition: SWFMovieDefinition.h:138
gnash::as_object
The base class for all ActionScript objects.
Definition: as_object.h:162
gnash::SWFMovieDefinition::set_jpeg_loader
DSOTEXPORT void set_jpeg_loader(std::unique_ptr< image::JpegInput > j_in)
Definition: SWFMovieDefinition.cpp:585
gnash::CharacterDictionary::getDisplayObject
boost::intrusive_ptr< SWF::DefinitionTag > getDisplayObject(int id) const
Get the Character with the given id.
Definition: SWFMovieDefinition.cpp:412
gnash::SWFMovieDefinition::setAS3
void setAS3()
Call this to inform callers that tags should be executed using AVM2.
Definition: SWFMovieDefinition.h:194
gnash::SWFMovieDefinition::read_all_swf
void read_all_swf()
Read and parse all the SWF stream (blocking until load is finished)
Definition: SWFMovieDefinition.cpp:435
dsodefs.h
gnash::SWF::DefinitionTag
Immutable data representing the definition of a movie display element.
Definition: DefinitionTag.h:48
gnash::SWFMovieDefinition::importResources
virtual DSOTEXPORT void importResources(boost::intrusive_ptr< movie_definition > source, const Imports &imports)
Import resources.
Definition: SWFMovieDefinition.cpp:611
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
gnash::SWFMovieDefinition::getPlaylist
virtual const PlayList * getPlaylist(size_t frame_number) const
Return the list of execute tags for given frame number.
Definition: SWFMovieDefinition.h:292
gnash::CharacterDictionary::begin
CharacterConstIterator begin() const
Return a const_iterator to the first dictionary element.
Definition: SWFMovieDefinition.h:135
gnash::SWFMovieDefinition::SWFMovieDefinition
SWFMovieDefinition(const RunResources &runResources)
Construct a SWF movie.
Definition: SWFMovieDefinition.cpp:131
_
#define _(String)
Definition: log.h:44
gnash::SWFMovieDefinition::get_loading_frame
virtual size_t get_loading_frame() const
Get the number of fully loaded frames.
Definition: SWFMovieDefinition.cpp:515
gnash::CharacterDictionary::CharacterIterator
CharacterContainer::iterator CharacterIterator
Definition: SWFMovieDefinition.h:115
gnash::SWFMovieDefinition
Immutable definition of a SWF movie's contents.
Definition: SWFMovieDefinition.h:159
SWFMovie.h
gnash::SWFMovieLoader
Helper class handling start and execution of a loading thread.
Definition: SWFMovieDefinition.h:70
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::SWFRect::is_null
bool is_null() const
returns true if this is a NULL rectangle
Definition: SWFRect.h:75
gnash::SWFMovieDefinition::addBitmap
void addBitmap(int DisplayObject_id, boost::intrusive_ptr< CachedBitmap > im)
Add a bitmap DisplayObject in the dictionary, with the specified DisplayObject id.
Definition: SWFMovieDefinition.cpp:215
gnash::SWFMovieDefinition::registerExport
void registerExport(const std::string &symbol, std::uint16_t id)
Register a symbol to refer to a character id.
Definition: SWFMovieDefinition.cpp:552
zlib_adapter.h
gnash::SWFMovieDefinition::get_labeled_frame
DSOTEXPORT bool get_labeled_frame(const std::string &label, size_t &frame_number) const
Get 0-based index of the frame with given label.
Definition: SWFMovieDefinition.cpp:574
gnash::key::n
@ n
Definition: GnashKey.h:160
Global_as.h
gnash::movie_definition::Imports
std::vector< ImportSpec > Imports
Definition: movie_definition.h:166
SWFRect.h
gnash::zlib_adapter::make_inflater
std::unique_ptr< IOChannel > make_inflater(std::unique_ptr< IOChannel >)
Returns a read-only IOChannel stream that inflates the remaining content of the given input stream,...
Definition: zlib_adapter.cpp:28
gnash::twipsToPixels
double twipsToPixels(int i)
Definition: GnashNumeric.h:97
gnash::SWFMovieDefinition::ensure_frame_loaded
bool ensure_frame_loaded(size_t framenum) const
Ensure that frame number 'framenum' (1-based offset) has been loaded (load on demand).
Definition: SWFMovieDefinition.cpp:361
gnash::SWFMovieDefinition::get_bytes_loaded
size_t get_bytes_loaded() const
Get number of bytes loaded from input stream.
Definition: SWFMovieDefinition.h:219
as_function.h
gnash::movie_definition
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
gnash::SWFParser::bytesRead
size_t bytesRead() const
The number of bytes processed by this SWFParser.
Definition: SWFParser.h:69
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
gnash::SWFMovieLoader::start
bool start()
Start loading thread.
Definition: SWFMovieDefinition.cpp:110
gnash::SWFParser::read
bool read(std::streamsize bytes)
Parse a specified number of bytes from the stream.
Definition: SWFParser.cpp:51
gnash::SWFMovieDefinition::completeLoad
bool completeLoad()
Complete load of the SWF file.
Definition: SWFMovieDefinition.cpp:328
CachedBitmap.h
gnash::CharacterDictionary::CharacterConstIterator
CharacterContainer::const_iterator CharacterConstIterator
Definition: SWFMovieDefinition.h:117
IF_VERBOSE_MALFORMED_SWF
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
gnash::SWFRect
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:45
gnash::SWFMovieDefinition::add_frame_name
DSOTEXPORT void add_frame_name(const std::string &name)
Labels the frame currently being loaded with the given name.
Definition: SWFMovieDefinition.cpp:566
gnash::image::JpegInput
Class for reading JPEG image data.
Definition: GnashImageJpeg.h:50
gnash::sound_sample
An identifier for a sound sample managed by a sound_handler.
Definition: sound_definition.h:62
gnash::SWFMovieDefinition::addDisplayObject
virtual void addDisplayObject(std::uint16_t id, SWF::DefinitionTag *c)
Definition: SWFMovieDefinition.cpp:158
gnash::CharacterDictionary::addDisplayObject
DSOTEXPORT void addDisplayObject(int id, boost::intrusive_ptr< SWF::DefinitionTag > c)
Add a Character assigning it the given id.
Definition: SWFMovieDefinition.cpp:427
GnashSleep.h
gnash::fontlib::get_font
Font * get_font(const std::string &name, bool bold, bool italic)
Definition: fontlib.cpp:50
gnash::SWFMovieDefinition::get_loading_sound_stream_id
int get_loading_sound_stream_id() const
Get the currently being loaded sound stream, if any.
Definition: SWFMovieDefinition.h:266
gnash::SWF::DefinitionTag::id
std::uint16_t id() const
The immutable id of the DefinitionTag.
Definition: DefinitionTag.h:76
StringPredicates.h
GnashAlgorithm.h
gnash::SWFMovieDefinition::get_frame_rate
float get_frame_rate() const
Return frame rate advertised for the SWFMovie.
Definition: SWFMovieDefinition.h:176
gnash::movie_definition::PlayList
std::vector< boost::intrusive_ptr< SWF::ControlTag > > PlayList
Definition: movie_definition.h:98
gnash::SWFMovieDefinition::isAS3
bool isAS3() const
Check whether tags should be executed using AVM2.
Definition: SWFMovieDefinition.h:199
gnash::CharacterDictionary::end
CharacterConstIterator end() const
Return a const_iterator to one-past last dictionary element.
Definition: SWFMovieDefinition.h:141
GnashNumeric.h
Font.h
gnash::ParserException
An SWF parsing exception.
Definition: GnashException.h:90
gnash::RunResources
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
gnash::sound_sample::m_sound_handler_id
int m_sound_handler_id
Definition: sound_definition.h:65
gnash::SWFMovieDefinition::set_loading_sound_stream_id
virtual void set_loading_sound_stream_id(int id)
Set the currently being loaded sound stream.
Definition: SWFMovieDefinition.h:261
gnash::SWFMovieDefinition::get_font
DSOTEXPORT Font * get_font(int font_id) const
Return the font with given DisplayObject id.
Definition: SWFMovieDefinition.cpp:183
gnash::Movie
A top-level, standalone Movie that can be loaded and played.
Definition: Movie.h:47
gnash::SWFMovieDefinition::get_bytes_total
size_t get_bytes_total() const
Get total number of bytes as parsed from the SWF header.
Definition: SWFMovieDefinition.h:224
gnash::SWFMovieDefinition::get_sound_sample
sound_sample * get_sound_sample(int DisplayObject_id) const
Get the sound sample with given ID.
Definition: SWFMovieDefinition.cpp:222
VM.h
gnash::SWFMovieDefinition::createMovie
Movie * createMovie(Global_as &gl, DisplayObject *parent=nullptr)
Create an instance of this movie.
Definition: SWFMovieDefinition.cpp:386
SWFMovieDefinition.h
IF_VERBOSE_PARSE
#define IF_VERBOSE_PARSE(x)
Definition: log.h:378
GnashImageJpeg.h
gnash::log_parse
void log_parse(StringType msg, Args... args)
Definition: log.h:313
log.h
gnash::SWFMovieDefinition::getDefinitionTag
DSOTEXPORT SWF::DefinitionTag * getDefinitionTag(std::uint16_t id) const
Return a DisplayObject from the dictionary.
Definition: SWFMovieDefinition.cpp:167
gnash::gnashSleep
void gnashSleep(time_t useconds)
Sleep compatibly for the specified number of microseconds.
Definition: GnashSleep.h:35
gnash::SWFMovieDefinition::get_height_pixels
size_t get_height_pixels() const
Frame height in pixels.
Definition: SWFMovieDefinition.h:189
gnash::SWFMovie
Stateful Movie object (a special kind of sprite)
Definition: SWFMovie.h:51
gnash::SWFMovieDefinition::get_frame_size
const SWFRect & get_frame_size() const
Return dimensions of the SWFMovie.
Definition: SWFMovieDefinition.h:181
url
std::string url
Definition: gnash.cpp:59
gnash::SWFMovieDefinition::add_font
DSOTEXPORT void add_font(int font_id, boost::intrusive_ptr< Font > f)
Add a font DisplayObject with given ID to the CharacterDictionary.
Definition: SWFMovieDefinition.cpp:176
sound_definition.h
gnash::key::f
@ f
Definition: GnashKey.h:152
gnashconfig.h
gnash::Font
A Font resource.
Definition: Font.h:90
DSOTEXPORT
#define DSOTEXPORT
Definition: dsodefs.h:63
namedStrings.h
gnash::Global_as
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:50
gnash::SWFMovieLoader::isSelfThread
bool isSelfThread() const
Return true if called from the loader thread.
Definition: SWFMovieDefinition.cpp:99
RunResources.h
gnash::key::c
@ c
Definition: GnashKey.h:149
gnash::SWFMovieLoader::~SWFMovieLoader
~SWFMovieLoader()
Definition: SWFMovieDefinition.cpp:79
gnash::getObjectWithPrototype
as_object * getObjectWithPrototype(Global_as &gl, const ObjectURI &c)
Definition: as_object.cpp:1109
gnash::SWFMovieDefinition::get_jpeg_loader
image::JpegInput * get_jpeg_loader() const
Get the jpeg input loader, to load a DefineBits image (one without table info).
Definition: SWFMovieDefinition.h:288
gnash::SWFMovieDefinition::get_version
virtual int get_version() const
Return the advertised version for the SWFMovie.
Definition: SWFMovieDefinition.h:207
gnash::SWFMovieDefinition::exportID
std::uint16_t exportID(const std::string &symbol) const
Get the id that corresponds to a symbol.
Definition: SWFMovieDefinition.cpp:602
gnash::SWFMovieDefinition::getBitmap
DSOTEXPORT CachedBitmap * getBitmap(int DisplayObject_id) const
Get a bitmap from the bitmap dictionary.
Definition: SWFMovieDefinition.cpp:207
gnash::CharacterDictionary
The Characters dictionary associated with each SWF file.
Definition: SWFMovieDefinition.h:105
gnash::SWFMovieDefinition::get_width_pixels
size_t get_width_pixels() const
Frame width in pixels.
Definition: SWFMovieDefinition.h:185
gnash::SWFMovieDefinition::add_sound_sample
virtual void add_sound_sample(int DisplayObject_id, sound_sample *sam)
Add a sound sample DisplayObject in the dictionary, with the specified DisplayObject id.
Definition: SWFMovieDefinition.cpp:233
movie_definition.h
gnash::DisplayObject
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
gnash::SWFParser
The SWFParser parses tags from a SWFStream.
Definition: SWFParser.h:51
gnash::CharacterDictionary::begin
CharacterIterator begin()
Return an iterator to the first dictionary element.
Definition: SWFMovieDefinition.h:132
source
@ source
Definition: klash_part.cpp:329
gnash::SWFMovieLoader::SWFMovieLoader
SWFMovieLoader(SWFMovieDefinition &md)
Definition: SWFMovieDefinition.cpp:74
gnash::SWFStream
SWF stream wrapper class.
Definition: SWFStream.h:59
gnash::fontlib::add_font
void add_font(Font *f)
Definition: fontlib.cpp:67
gnash::SWFMovieDefinition::addControlTag
void addControlTag(boost::intrusive_ptr< SWF::ControlTag > tag)
Add an ControlTag to this movie_definition's playlist.
Definition: SWFMovieDefinition.h:271
gnash::readRect
SWFRect readRect(SWFStream &in)
Read a bit-packed rectangle from an SWF stream.
Definition: TypesParser.cpp:130
gnash::key::o
@ o
Definition: GnashKey.h:161
gnash::key::SWF
@ SWF
Definition: GnashKey.h:331
gnash::key::u
@ u
Definition: GnashKey.h:167
gnash::CachedBitmap
A CachedBitmap is created by the renderer in a format of its choosing.
Definition: CachedBitmap.h:38
GnashException.h
SWFStream.h
data
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
IOChannel.h
gnash::key::e
@ e
Definition: GnashKey.h:151
gnash::CharacterDictionary::CharacterContainer
std::map< int, boost::intrusive_ptr< SWF::DefinitionTag > > CharacterContainer
The container used by this dictionary.
Definition: SWFMovieDefinition.h:113
gnash::SWFMovieLoader::started
bool started() const
Return true if the loader thread was started.
Definition: SWFMovieDefinition.cpp:91
gnash::CharacterDictionary::operator<<
friend std::ostream & operator<<(std::ostream &o, const CharacterDictionary &cd)
Definition: SWFMovieDefinition.cpp:398
gnash::SWFMovieDefinition::get_url
virtual const std::string & get_url() const
Return the URL of the SWF stream this definition has been read from.
Definition: SWFMovieDefinition.h:352
gnash::operator<<
std::ostream & operator<<(std::ostream &o, const URL &u)
Definition: URL.cpp:447
gnash::SWFMovieDefinition::get_frame_count
size_t get_frame_count() const
Return total number of frames advertised for the SWFMovie.
Definition: SWFMovieDefinition.h:171