Gnash  0.8.11dev
tag_loaders.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 
20 #ifndef GNASH_SWF_TAG_LOADERS_H
21 #define GNASH_SWF_TAG_LOADERS_H
22 
23 #include "SWF.h"
24 
25 // Forward declarations
26 namespace gnash {
27  class movie_definition;
28  class RunResources;
29  class SWFStream;
30 }
31 
32 namespace gnash {
33 namespace SWF {
34 
36 //
37 void reflex_loader(SWFStream&, TagType, movie_definition&,
38  const RunResources&);
39 
41 //
44 void sprite_loader(SWFStream&, TagType, movie_definition&, const RunResources&);
45 
47 void frame_label_loader(SWFStream&, TagType, movie_definition&,
48  const RunResources&);
49 
51 void define_sound_loader(SWFStream&, TagType, movie_definition&,
52  const RunResources&);
53 
54 void
55 file_attributes_loader(SWFStream& in, TagType tag, movie_definition& m,
56  const RunResources& r);
57 
58 void
59 metadata_loader(SWFStream& in, TagType tag, movie_definition& m,
60  const RunResources& r);
61 
63 void
64 serialnumber_loader(SWFStream& in, TagType tag, movie_definition& /*m*/,
65  const RunResources& /*r*/);
66 
67 
68 } // namespace gnash::SWF
69 } // namespace gnash
70 
71 
72 #endif // GNASH_SWF_TAG_LOADERS_H
73 
74 
75 // Local Variables:
76 // mode: C++
77 // indent-tabs-mode: t
78 // End:
sound_handler.h
gnash::SWFStream::read_uint
unsigned read_uint(unsigned short bitcount)
Reads a bit-packed unsigned integer from the stream and returns it. The given bitcount determines the...
Definition: SWFStream.cpp:102
SoundInfo.h
name
std::string name
Definition: LocalConnection_as.cpp:149
gnash::log_swferror
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
SimpleBuffer.h
gnash::sprite_definition
Holds the immutable data for a sprite, as read from as SWF stream. @ should not derive from movie_def...
Definition: sprite_definition.h:50
tag_loaders.h
gnash::SWF::TagType
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:31
gnash::media::SoundInfo
Class containing information about an embedded sound definition.
Definition: SoundInfo.h:34
gnash::arraySize
size_t arraySize(T(&)[N])
Get the size of an array without passing a pointer by mistake.
Definition: GnashAlgorithm.h:58
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
TagLoadersTable.h
_
#define _(String)
Definition: log.h:44
gnash::SWFStream::read_string
void read_string(std::string &to)
Reads a null-terminated string from the given file and assigns it to the given std::string,...
Definition: SWFStream.cpp:395
MediaHandler.h
gnash::SWFMovieDefinition
Immutable definition of a SWF movie's contents.
Definition: SWFMovieDefinition.h:159
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::SWF::define_sound_loader
void define_sound_loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &r)
Sample rate table for DEFINESOUNDHEAD tags.
Definition: tag_loaders.cpp:151
gnash::SWF::DEFINESOUND
@ DEFINESOUND
Definition: SWF.h:46
gnash::SWF::FRAMELABEL
@ FRAMELABEL
Definition: SWF.h:73
gnash::key::m
@ m
Definition: GnashKey.h:159
utility.h
second
std::int32_t second
Definition: Date_as.cpp:93
gnash::SWFStream::read
unsigned read(char *buf, unsigned count)
Read <count> bytes from the source stream and copy that data to <buf>.
Definition: SWFStream.cpp:68
gnash::SWF::reflex_loader
void reflex_loader(SWFStream &in, TagType tag, movie_definition &, const RunResources &)
SWF Tags Reflex (777)
Definition: tag_loaders.cpp:378
gnash::movie_definition
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
sprite_definition.h
gnash::media::AUDIO_CODEC_MP3
@ AUDIO_CODEC_MP3
MP3 format.
Definition: MediaParser.h:164
gnash::SWF::SERIALNUMBER
@ SERIALNUMBER
Definition: SWF.h:71
gnash::SWFStream::read_s16
std::int16_t read_s16()
Read a aligned signed 16-bit value from the stream.
Definition: SWFStream.cpp:355
IF_VERBOSE_MALFORMED_SWF
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
gnash::media::MediaHandler
The MediaHandler class acts as a factory to provide parser and decoders.
Definition: MediaHandler.h:70
gnash::sound_sample
An identifier for a sound sample managed by a sound_handler.
Definition: sound_definition.h:62
gnash::key::r
@ r
Definition: GnashKey.h:164
gnash::SWF::frame_label_loader
void frame_label_loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &)
Label the current frame (SWF::FRAMELABEL)
Definition: tag_loaders.cpp:58
GnashAlgorithm.h
gnash::SWFStream::tell
unsigned long tell()
Return our current (byte) position in the input stream.
Definition: SWFStream.cpp:447
gnash::media::audioCodecType
audioCodecType
Audio codec ids as defined in flash.
Definition: MediaParser.h:123
gnash::SWFStream::read_u32
std::uint32_t read_u32()
Read a aligned unsigned 32-bit value from the stream.
Definition: SWFStream.cpp:361
URL.h
gnash::SWF::METADATA
@ METADATA
Definition: SWF.h:107
gnash::sound::sound_handler::create_sound
virtual int create_sound(std::unique_ptr< SimpleBuffer > data, const media::SoundInfo &sinfo)
Event sound functions:
Definition: sound_handler.cpp:455
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::SWF::FILEATTRIBUTES
@ FILEATTRIBUTES
Definition: SWF.h:99
gnash::SWF::DEFINESPRITE
@ DEFINESPRITE
Definition: SWF.h:69
gnash::SWFStream::get_tag_end_position
unsigned long get_tag_end_position()
Return the file position of the end of the current tag.
Definition: SWFStream.cpp:497
SWFMovieDefinition.h
IF_VERBOSE_PARSE
#define IF_VERBOSE_PARSE(x)
Definition: log.h:378
gnash::log_parse
void log_parse(StringType msg, Args... args)
Definition: log.h:313
log.h
gnash::SWF::sprite_loader
void sprite_loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &r)
Create and initialize a sprite, and add it to the movie.
Definition: tag_loaders.cpp:99
gnash::SWF::metadata_loader
void metadata_loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &)
Definition: tag_loaders.cpp:301
gnash::sound::sound_handler
Sound mixer.
Definition: sound_handler.h:88
sound_definition.h
gnashconfig.h
gnash::SWF::serialnumber_loader
void serialnumber_loader(SWFStream &in, TagType tag, movie_definition &, const RunResources &)
Load a SWF::SERIALNUMBER tag.
Definition: tag_loaders.cpp:343
SWF.h
gnash::SWFStream::read_u16
std::uint16_t read_u16()
Read a aligned unsigned 16-bit value from the stream.
Definition: SWFStream.cpp:332
RunResources.h
gnash::media::MediaHandler::getInputPaddingSize
virtual size_t getInputPaddingSize() const
Return the number of bytes padding needed for input buffers.
Definition: MediaHandler.h:141
gnash::SWFStream::read_u8
std::uint8_t read_u8()
Read a aligned unsigned 8-bit value from the stream.
Definition: SWFStream.cpp:319
gnash::SWFStream::read_bit
bool read_bit()
Reads a single bit off the stream and returns it.
Definition: SWFStream.cpp:88
gnash::SWF::file_attributes_loader
void file_attributes_loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &)
Definition: tag_loaders.cpp:247
gnash::SWFStream
SWF stream wrapper class.
Definition: SWFStream.h:59
gnash::SWFStream::ensureBytes
void ensureBytes(unsigned long needed)
Ensure the requested number of bytes are available for an aligned read in the currently opened tag.
Definition: SWFStream.cpp:50
gnash::key::SWF
@ SWF
Definition: GnashKey.h:331
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
GnashException.h
SWFStream.h
data
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
gnash::SWF::REFLEX
@ REFLEX
Definition: SWF.h:117
gnash::SimpleBuffer
A simple buffer of bytes.
Definition: SimpleBuffer.h:38