Gnash  0.8.11dev
Classes | Public Member Functions | Public Attributes | List of all members
gnash::media::AudioInfo Class Reference

Information about an audio stream. More...

#include <MediaParser.h>

Classes

class  ExtraInfo
 Extra info about an audio stream. More...
 

Public Member Functions

 AudioInfo (int codeci, std::uint16_t sampleRatei, std::uint16_t sampleSizei, bool stereoi, std::uint64_t durationi, codecType typei)
 Construct an AudioInfo object. More...
 

Public Attributes

int codec
 Codec identifier. More...
 
std::uint16_t sampleRate
 
std::uint16_t sampleSize
 Size of each sample, in bytes. More...
 
bool stereo
 
std::uint64_t duration
 
codecType type
 
std::unique_ptr< ExtraInfoextra
 Extra info about audio stream, if when needed. More...
 

Detailed Description

Information about an audio stream.

The information stored is codec-id, samplerate, samplesize, stereo, duration and codec-type.

Additionally, an abstract ExtraInfo can be hold.

Constructor & Destructor Documentation

§ AudioInfo()

gnash::media::AudioInfo::AudioInfo ( int  codeci,
std::uint16_t  sampleRatei,
std::uint16_t  sampleSizei,
bool  stereoi,
std::uint64_t  durationi,
codecType  typei 
)
inline

Construct an AudioInfo object.

Parameters
codeciAudio codec id. To be interpreted as a media::audioCodecType if the typei parameter is CODEC_TYPE_FLASH; otherwise it's an opaque number to use for codec information transfer between a MediaParser and a AudioDecoder from the same media handler module.
sampleRateiNominal sample rate.
Todo:
document units.
Parameters
sampleSizeiSample size, in bytes.
stereoiSample type (stereo if true, mono otherwise).
Todo:
document if and how intepretation of sampleSizei changes
Parameters
durationiNominal audio stream duration, in milliseconds.
typeiChanges interpretation of the codeci parameter.

Member Data Documentation

§ codec

int gnash::media::AudioInfo::codec

Codec identifier.

This has to be interpreted as audioCodecType if codecType type is CODEC_TYPE_FLASH or interpretation is opaque and we rely on the assumption that the AudioInfo creator and the AudioInfo user have a way to get a shared interpretation

Referenced by gnash::media::ffmpeg::AudioDecoderFfmpeg::AudioDecoderFfmpeg(), gnash::media::gst::AudioDecoderGst::AudioDecoderGst(), gnash::media::gst::MediaHandlerGst::createAudioDecoder(), gnash::media::MediaHandler::createFlashAudioDecoder(), gnash::media::ffmpeg::AudioDecoderFfmpeg::~AudioDecoderFfmpeg(), and gnash::media::AudioDecoderSimple::~AudioDecoderSimple().

§ duration

std::uint64_t gnash::media::AudioInfo::duration

§ extra

std::unique_ptr<ExtraInfo> gnash::media::AudioInfo::extra

Extra info about audio stream, if when needed.

Could be ExtraVideoInfoFlv or a media-handler specific info

Referenced by gnash::media::gst::AudioDecoderGst::AudioDecoderGst(), and gnash::media::ffmpeg::AudioDecoderFfmpeg::~AudioDecoderFfmpeg().

§ sampleRate

std::uint16_t gnash::media::AudioInfo::sampleRate

§ sampleSize

std::uint16_t gnash::media::AudioInfo::sampleSize

§ stereo

bool gnash::media::AudioInfo::stereo

§ type

codecType gnash::media::AudioInfo::type

The documentation for this class was generated from the following file: