#include <flv.h>
Classes | |
struct | flv_audio_t |
struct | flv_header_t |
struct | flv_tag_t |
struct | flv_video_t |
Public Types | |
enum | flv_type_e { FLV_VIDEO = 0x1, FLV_AUDIO = 0x4 } |
enum | flv_tag_type_e { TAG_VIDEO = 0x8, TAG_AUDIO = 0x9, TAG_METADATA = 0x12 } |
enum | flv_sound_type_e { AUDIO_MONO = 0x0, AUDIO_STEREO = 0x1 } |
enum | flv_sound_size_e { AUDIO_8BIT = 0x0, AUDIO_16BIT = 0x1 } |
enum | flv_sound_rate_e { AUDIO_55KHZ = 0x0, AUDIO_11KHZ = 0x1, AUDIO_22KHZ = 0x2, AUDIO_44KHZ = 0x3 } |
enum | flv_sound_format_e { AUDIO_UNCOMPRESSED = 0x0, AUDIO_ADPCM = 0x1, AUDIO_MP3 = 0x2, AUDIO_NELLYMOSER_8KHZ = 0x5, AUDIO_NELLYMOSER = 0x6, AUDIO_VORBIS = 0x7 } |
enum | flv_video_codec_e { VIDEO_NONE = 0x0, VIDEO_H263 = 0x2, VIDEO_SCREEN = 0x3, VIDEO_VP6 = 0x4, VIDEO_VP6_ALPHA = 0x5, VIDEO_SCREEN2 = 0x6, VIDEO_THEORA = 0x7, VIDEO_DIRAC = 0x8, VIDEO_SPEEX = 0x9 } |
enum | flv_video_frame_type_e { NO_FRAME = 0x0, KEYFRAME = 0x1, INTERFRAME = 0x2, DISPOSABLE = 0x3 } |
typedef boost::uint32_t | previous_size_t |
Public Member Functions | |
Flv () | |
~Flv () | |
boost::shared_ptr< cygnal::Buffer > | encodeHeader (boost::uint8_t type) |
Encode the file header into a Buffer. | |
boost::shared_ptr< flv_header_t > | decodeHeader (boost::shared_ptr< cygnal::Buffer > buf) |
Decode a Buffer into a header. | |
boost::shared_ptr< flv_header_t > | decodeHeader (boost::uint8_t *data) |
boost::shared_ptr < cygnal::Element > | decodeMetaData (boost::shared_ptr< cygnal::Buffer > buf) |
Decode a MetaData object. This is after the header, but before all the other tags usually. | |
boost::shared_ptr < cygnal::Element > | decodeMetaData (boost::uint8_t *data, size_t size) |
Decode a MetaData object. This is after the header, but before all the other tags usually. | |
boost::shared_ptr< flv_audio_t > | decodeAudioData (boost::uint8_t flags) |
Decode an Audio object. | |
boost::shared_ptr< flv_video_t > | decodeVideoData (boost::uint8_t flags) |
Decode an Video object. | |
boost::shared_ptr< flv_tag_t > | decodeTagHeader (boost::shared_ptr< cygnal::Buffer > &buf) |
Decode an MetaData object. | |
boost::shared_ptr< flv_tag_t > | decodeTagHeader (boost::uint8_t *data) |
boost::shared_ptr < cygnal::Element > | findProperty (const std::string &name) |
Find the named property for this Object. | |
void | setProperties (std::vector< boost::shared_ptr< cygnal::Element > > array) |
Set all the properties from an array of Element classes. | |
boost::uint32_t | convert24 (boost::uint8_t *) |
Convert a 24 bit integer to a 32 bit one so we can use it. | |
void | dump () |
Dump the internal data of this class in a human readable form. |
This class abstracts an FLV file into something usable by Gnash.
This is the size in bytes of the previous MetaTag.
cygnal::Flv::Flv | ( | ) |
cygnal::Flv::~Flv | ( | ) |
boost::uint32_t cygnal::Flv::convert24 | ( | boost::uint8_t * | num | ) |
Convert a 24 bit integer to a 32 bit one so we can use it.
Referenced by main().
boost::shared_ptr< Flv::flv_audio_t > cygnal::Flv::decodeAudioData | ( | boost::uint8_t | flags | ) |
Decode an Audio object.
flags | The data to deserialize. |
References AUDIO_11KHZ, AUDIO_16BIT, AUDIO_22KHZ, AUDIO_44KHZ, AUDIO_ADPCM, AUDIO_MP3, AUDIO_NELLYMOSER, AUDIO_NELLYMOSER_8KHZ, AUDIO_STEREO, and AUDIO_VORBIS.
Referenced by main().
boost::shared_ptr<flv_header_t> cygnal::Flv::decodeHeader | ( | boost::shared_ptr< cygnal::Buffer > | buf | ) | [inline] |
Decode a Buffer into a header.
buf | a smart pointer to a Buffer containing the data. |
References decodeHeader().
Referenced by decodeHeader(), and main().
boost::shared_ptr< Flv::flv_header_t > cygnal::Flv::decodeHeader | ( | boost::uint8_t * | data | ) |
References FLV_AUDIO, FLV_VIDEO, cygnal::swapBytes(), and cygnal::Flv::flv_header_t::version.
boost::shared_ptr< cygnal::Element > cygnal::Flv::decodeMetaData | ( | boost::shared_ptr< cygnal::Buffer > | buf | ) |
boost::shared_ptr< cygnal::Element > cygnal::Flv::decodeMetaData | ( | boost::uint8_t * | data, | |
size_t | size | |||
) |
Decode a MetaData object. This is after the header, but before all the other tags usually.
data | The data to serialize into big endian format | |
size | The size of the data in bytes |
References cygnal::AMF::extractAMF(), name, cygnal::SANE_STR_SIZE, cygnal::Element::STRING_AMF0, and cygnal::AMF::totalsize().
boost::shared_ptr< Flv::flv_tag_t > cygnal::Flv::decodeTagHeader | ( | boost::uint8_t * | data | ) |
References data, and cygnal::swapBytes().
boost::shared_ptr<flv_tag_t> cygnal::Flv::decodeTagHeader | ( | boost::shared_ptr< cygnal::Buffer > & | buf | ) | [inline] |
Decode an MetaData object.
flags | The data to deserialize. |
References decodeTagHeader().
Referenced by decodeTagHeader(), and main().
boost::shared_ptr< Flv::flv_video_t > cygnal::Flv::decodeVideoData | ( | boost::uint8_t | flags | ) |
Decode an Video object.
flags | The data to deserialize. |
References DISPOSABLE, INTERFRAME, KEYFRAME, VIDEO_DIRAC, VIDEO_H263, VIDEO_SCREEN, VIDEO_SCREEN2, VIDEO_SPEEX, VIDEO_THEORA, VIDEO_VP6, and VIDEO_VP6_ALPHA.
Referenced by main().
void cygnal::Flv::dump | ( | ) |
Dump the internal data of this class in a human readable form.
Referenced by main().
boost::shared_ptr< cygnal::Buffer > cygnal::Flv::encodeHeader | ( | boost::uint8_t | type | ) |
boost::shared_ptr< cygnal::Element > cygnal::Flv::findProperty | ( | const std::string & | name | ) |
Find the named property for this Object.
name | An ASCII string that is the name of the property to search for. |
void cygnal::Flv::setProperties | ( | std::vector< boost::shared_ptr< cygnal::Element > > | array | ) | [inline] |
Set all the properties from an array of Element classes.
array |
References _properties.