xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Video::QuickTimeDecoder::QuickTimeAudioTrack Class Reference
Inheritance diagram for Video::QuickTimeDecoder::QuickTimeAudioTrack:
Inheritance graph
[legend]
Collaboration diagram for Video::QuickTimeDecoder::QuickTimeAudioTrack:
Collaboration graph
[legend]

Public Member Functions

 QuickTimeAudioTrack (QuickTimeDecoder *decoder, QuickTimeTrack *parentTrack)
 
size_t readBuffer (int16 *data, const size_t numSamples)
 Fill the given buffer with up to numSamples samples. More...
 
int getChannels () const
 Return the number channels in this stream. More...
 
int getRate () const
 Sample rate of the stream. More...
 
bool endOfData () const
 End of data reached? If this returns true, it means that at this time there is no data available in the stream. More...
 
bool endOfStream () const
 End of stream reached? If this returns true, it means that all data in this stream is used up and no additional data will appear in it in the future. More...
 
void queueAudio (const Common::Timestamp &length=Common::Timestamp())
 
- Public Member Functions inherited from Sound::AudioStream
virtual ~AudioStream ()
 

Private Member Functions

Common::SeekableReadStreamreadAudioChunk (uint chunk)
 
bool isOldDemuxing () const
 
uint32 getAudioChunkSampleCount (uint chunk) const
 
Common::Timestamp getChunkLength (uint chunk, bool skipAACPrimer=false) const
 
uint32 getAACSampleTime (uint32 totalSampleCount, bool skipAACPrimer=false) const
 
bool allAudioQueued () const
 

Private Attributes

QuickTimeDecoder_decoder
 
QuickTimeTrack_parentTrack
 
uint _curChunk
 
Common::Timestamp _curMediaPos
 
uint32 _samplesQueued
 
bool _skipAACPrimer
 
Common::ScopedPtr< Sound::PacketizedAudioStream_stream
 

Additional Inherited Members

- Static Public Attributes inherited from Sound::AudioStream
static const size_t kSizeInvalid = SIZE_MAX
 

Detailed Description

Definition at line 198 of file quicktime.h.

Constructor & Destructor Documentation

◆ QuickTimeAudioTrack()

Video::QuickTimeDecoder::QuickTimeAudioTrack::QuickTimeAudioTrack ( QuickTimeDecoder decoder,
QuickTimeTrack parentTrack 
)

Member Function Documentation

◆ allAudioQueued()

bool Video::QuickTimeDecoder::QuickTimeAudioTrack::allAudioQueued ( ) const
inlineprivate

◆ endOfData()

bool Video::QuickTimeDecoder::QuickTimeAudioTrack::endOfData ( ) const
inlinevirtual

End of data reached? If this returns true, it means that at this time there is no data available in the stream.

However there may be more data in the future. This is used by e.g. a rate converter to decide whether to keep on converting data or stop.

Implements Sound::AudioStream.

Definition at line 206 of file quicktime.h.

References _stream.

◆ endOfStream()

bool Video::QuickTimeDecoder::QuickTimeAudioTrack::endOfStream ( ) const
inlinevirtual

End of stream reached? If this returns true, it means that all data in this stream is used up and no additional data will appear in it in the future.

This is used by the mixer to decide whether a given stream shall be removed from the list of active streams (and thus be destroyed). By default this maps to endOfData()

Reimplemented from Sound::AudioStream.

Definition at line 207 of file quicktime.h.

References _stream.

◆ getAACSampleTime()

uint32 Video::QuickTimeDecoder::QuickTimeAudioTrack::getAACSampleTime ( uint32  totalSampleCount,
bool  skipAACPrimer = false 
) const
private

Definition at line 934 of file quicktime.cpp.

◆ getAudioChunkSampleCount()

uint32 Video::QuickTimeDecoder::QuickTimeAudioTrack::getAudioChunkSampleCount ( uint  chunk) const
private

Definition at line 914 of file quicktime.cpp.

◆ getChannels()

int Video::QuickTimeDecoder::QuickTimeAudioTrack::getChannels ( ) const
inlinevirtual

Return the number channels in this stream.

Implements Sound::AudioStream.

Definition at line 204 of file quicktime.h.

References _stream.

◆ getChunkLength()

Common::Timestamp Video::QuickTimeDecoder::QuickTimeAudioTrack::getChunkLength ( uint  chunk,
bool  skipAACPrimer = false 
) const
private

Definition at line 924 of file quicktime.cpp.

◆ getRate()

int Video::QuickTimeDecoder::QuickTimeAudioTrack::getRate ( ) const
inlinevirtual

Sample rate of the stream.

Implements Sound::AudioStream.

Definition at line 205 of file quicktime.h.

References _stream.

◆ isOldDemuxing()

bool Video::QuickTimeDecoder::QuickTimeAudioTrack::isOldDemuxing ( ) const
private

Definition at line 855 of file quicktime.cpp.

◆ queueAudio()

void Video::QuickTimeDecoder::QuickTimeAudioTrack::queueAudio ( const Common::Timestamp length = Common::Timestamp())

◆ readAudioChunk()

Common::SeekableReadStream * Video::QuickTimeDecoder::QuickTimeAudioTrack::readAudioChunk ( uint  chunk)
private

◆ readBuffer()

size_t Video::QuickTimeDecoder::QuickTimeAudioTrack::readBuffer ( int16 buffer,
const size_t  numSamples 
)
inlinevirtual

Fill the given buffer with up to numSamples samples.

Returns the actual number of samples read, or kSizeInvalid if a critical error occurred (note: you must check if this value is less than what you requested, this can happen when the stream is fully used up).

Data has to be in native endianness, 16 bit per sample, signed. For stereo stream, buffer will be filled with interleaved left and right channel samples, starting with a left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo stream, you will get a total of two left channel and two right channel samples.

The same holds true for more channels. Channel configurations recognized:

  • 5.1: front left, front right, front center, low frequency rear left, rear right

Implements Sound::AudioStream.

Definition at line 203 of file quicktime.h.

References _stream.

Member Data Documentation

◆ _curChunk

uint Video::QuickTimeDecoder::QuickTimeAudioTrack::_curChunk
private

Definition at line 217 of file quicktime.h.

Referenced by allAudioQueued().

◆ _curMediaPos

Common::Timestamp Video::QuickTimeDecoder::QuickTimeAudioTrack::_curMediaPos
private

Definition at line 218 of file quicktime.h.

◆ _decoder

QuickTimeDecoder* Video::QuickTimeDecoder::QuickTimeAudioTrack::_decoder
private

Definition at line 215 of file quicktime.h.

◆ _parentTrack

QuickTimeTrack* Video::QuickTimeDecoder::QuickTimeAudioTrack::_parentTrack
private

Definition at line 216 of file quicktime.h.

Referenced by allAudioQueued().

◆ _samplesQueued

uint32 Video::QuickTimeDecoder::QuickTimeAudioTrack::_samplesQueued
private

Definition at line 219 of file quicktime.h.

◆ _skipAACPrimer

bool Video::QuickTimeDecoder::QuickTimeAudioTrack::_skipAACPrimer
private

Definition at line 220 of file quicktime.h.

◆ _stream

Common::ScopedPtr<Sound::PacketizedAudioStream> Video::QuickTimeDecoder::QuickTimeAudioTrack::_stream
private

Definition at line 221 of file quicktime.h.

Referenced by endOfData(), endOfStream(), getChannels(), getRate(), and readBuffer().


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