Gnash  0.8.10
Namespaces | Classes | Typedefs | Enumerations | Functions
gnash::media Namespace Reference

Gnash media handling subsystem (libmedia) More...

Namespaces

namespace  ffmpeg
 

FFMPEG-based media handler module.


namespace  gst
 

Gstreamer-based media handler module.


namespace  haiku
 

Haiku media kit based media handler module.


Classes

class  AudioDecoder
 Audio decoding base class. More...
class  AudioDecoderSimple
 Audio decoding using "simple" internal decoders. More...
class  AudioDecoderSpeex
 Audio decoder for the speex codec. More...
class  AudioInput
 A class representing a single AudioInput device. More...
class  AudioResampler
 VERY crude audio resampler. More...
class  ExtraVideoInfoFlv
 Extra video info found in some FLV embedded streams. More...
class  ExtraAudioInfoFlv
 Extra audoi info found in some FLV embedded streams. More...
class  FLVParser
 The FLVParser class parses FLV streams. More...
struct  Id3Info
 Contains ID3 data. More...
struct  RegisterAllHandlers
class  MediaHandler
 The MediaHandler class acts as a factory to provide parser and decoders. More...
class  AudioInfo
 Information about an audio stream. More...
class  VideoInfo
 Information about a video stream. More...
class  EncodedExtraData
class  EncodedVideoFrame
 An encoded video frame. More...
class  EncodedAudioFrame
 An encoded audio frame. More...
class  MediaParser
 The MediaParser class provides cursor-based access to encoded media frames. More...
class  SoundInfo
 Class containing information about an embedded sound definition. More...
struct  ImgBuf
 Image buffer wrapper. More...
class  VideoConverter
 Abstract base class for video image space conversion. More...
class  VideoDecoder
 Abstract base class for embedded video decoders. More...
class  VideoInput
 This is the interface for video input devices. More...

Typedefs

typedef GnashFactory
< MediaHandler,
RegisterAllHandlers
MediaFactory

Enumerations

enum  videoFrameType { KEY_FRAME = 1, INTER_FRAME = 2, DIS_INTER_FRAME = 3 }
 Video frame types. More...
enum  codecType { CODEC_TYPE_FLASH, CODEC_TYPE_CUSTOM }
 The type of the codec id passed in the AudioInfo or VideoInfo class. More...
enum  videoCodecType {
  VIDEO_CODEC_H263 = 2, VIDEO_CODEC_SCREENVIDEO = 3, VIDEO_CODEC_VP6 = 4, VIDEO_CODEC_VP6A = 5,
  VIDEO_CODEC_SCREENVIDEO2 = 6, VIDEO_CODEC_H264 = 7
}
 Video codec ids as defined in flash. More...
enum  audioCodecType {
  AUDIO_CODEC_RAW = 0, AUDIO_CODEC_ADPCM = 1, AUDIO_CODEC_MP3 = 2, AUDIO_CODEC_UNCOMPRESSED = 3,
  AUDIO_CODEC_NELLYMOSER_8HZ_MONO = 5, AUDIO_CODEC_NELLYMOSER = 6, AUDIO_CODEC_AAC = 10, AUDIO_CODEC_SPEEX = 11
}
 Audio codec ids as defined in flash. More...

Functions

template<typename T >
void setId3Info (boost::optional< T > Id3Info::*member, T const &val, boost::optional< Id3Info > &obj)
 Set a field of the optional Id3Info.
std::ostream & operator<< (std::ostream &os, const VideoInfo &vi)
std::ostream & operator<< (std::ostream &os, const videoCodecType &t)
std::ostream & operator<< (std::ostream &os, const audioCodecType &t)

Detailed Description

Gnash media handling subsystem (libmedia)

The core Gnash lib will delegate any parsing decoding and encoding of media files to the media subsystem.

The subsystem's entry point is a MediaHandler instance, which acts as a factory for parsers, decoders and encoders.

Todo:
fix http://wiki.gnashdev.org/wiki/index.php/Libmedia, is obsoleted

Typedef Documentation


Enumeration Type Documentation

Audio codec ids as defined in flash.

For some encodings, audio data is organized in logical frames. The structure of such frames (header/payload) is codec dependent. The actual size of each frame may not be known w/out parsing the encoded stream, as it might be specified in the header of each frame.

Other encodings are loosier on frames. For these you can define a frame any way you want, as long as a frame doesn't contain partial samples.

For FFMPEG, you can NOT construct a parser for the loosy-framed codecs.

Parser-needing codecs will be documented as such.

Enumerator:
AUDIO_CODEC_RAW 

Signed Linear PCM, unspecified byte order.

Use of this codec is deprecated (but still supported) due to the unspecified byte order (you can only play >8bit samples in a sane way when the endiannes of encoding and decoding hosts match).

90% of the times the actual encoder did run on windows, so it is a good bet to guess for little-endian. SampleSize may be 8 or 16 bits.

AUDIO_CODEC_ADPCM 

ADPCM format.

SWF support 2, 3, 4, and 5 bits / sample. ADPCM "frames" consits of 4096 ADPCM codes per channel.

For streaming there is no concept of "seekSamples" like MP3 streaming implements. Thus ADPCM ist suboptimal for streaming as it is difficult to match sound frames with movie frames. Uncompressed SampleSize is always 16 bit.

AUDIO_CODEC_MP3 

MP3 format.

MP3 is supported for SWF4 and later. MP3 sound is structured in frames consiting of a fixed sized header (32Bit) and compressed sound data. Compressed sound data always contains a fixed number of sound samples (576 or 1152). For streaming sound an additional field is necessary (seekSamples) to keep track of samples exceeding movie frame border.

MP3 header contains all necessary information to decode a single frame. From this information one can derive the number of samples and the frame's size. Uncompressed SampleSize is always 16 bit.

AUDIO_CODEC_UNCOMPRESSED 

Linear PCM, strictly little-endian.

AUDIO_CODEC_NELLYMOSER_8HZ_MONO 

Proprietary simple format. Always 5Khz mono ?

SWF6 and later. Data is organized in frames of 256 samples.

AUDIO_CODEC_NELLYMOSER 

Proprietary simple format.

SWF6 and later. Data is organized in frames of 256 samples.

AUDIO_CODEC_AAC 

Advanced Audio Coding.

AUDIO_CODEC_SPEEX 

Always 16kHz mono.

The type of the codec id passed in the AudioInfo or VideoInfo class.

Enumerator:
CODEC_TYPE_FLASH 

The internal flash codec ids.

CODEC_TYPE_CUSTOM 

Custom codecs ids.

Video codec ids as defined in flash.

Enumerator:
VIDEO_CODEC_H263 

H263/SVQ3 video codec.

VIDEO_CODEC_SCREENVIDEO 

Screenvideo codec.

VIDEO_CODEC_VP6 

On2 VP6 video codec.

VIDEO_CODEC_VP6A 

On2 VP6 Alpha video codec.

VIDEO_CODEC_SCREENVIDEO2 

Screenvideo2 codec.

VIDEO_CODEC_H264 

MPEG-4 Part 10, or Advanced Video Coding.

Video frame types.

Enumerator:
KEY_FRAME 

Key frames.

INTER_FRAME 

Interlaced frames.

DIS_INTER_FRAME 

Disposable interlaced frames.


Function Documentation

DSOEXPORT std::ostream & gnash::media::operator<< ( std::ostream &  os,
const VideoInfo &  vi 
)
DSOEXPORT std::ostream & gnash::media::operator<< ( std::ostream &  os,
const videoCodecType &  t 
)
DSOEXPORT std::ostream & gnash::media::operator<< ( std::ostream &  os,
const audioCodecType &  t 
)
template<typename T >
void gnash::media::setId3Info ( boost::optional< T > Id3Info::*  member,
T const &  val,
boost::optional< Id3Info > &  obj 
) [inline]

Set a field of the optional Id3Info.

The object is created if it doesn't already exist.

Parameters:
memberThe member to set, e.g. &Id3Info::name
valThe value for the member.
AnId3Info object.