ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack Class Reference

#include <quicktime_intern.h>

Inheritance diagram for Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack:
Collaboration diagram for Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack:

List of all members.

Public Member Functions

 QuickTimeAudioTrack (QuickTimeAudioDecoder *decoder, Track *parentTrack)
 ~QuickTimeAudioTrack ()
int readBuffer (int16 *buffer, const int numSamples)
 Fill the given buffer with up to numSamples samples.
bool isStereo () const
 Is this a stereo stream?
int getRate () const
 Sample rate of the stream.
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.
bool seek (const Timestamp &where)
 Seeks to a given offset in the stream.
Timestamp getLength () const
 Returns the length of the stream.
void queueAudio (const Timestamp &length=Timestamp())
TrackgetParent () const
void queueRemainingAudio ()
bool hasDataInQueue () const

Private Member Functions

QueuingAudioStreamcreateStream () const
AudioStreamreadAudioChunk (uint chunk)
bool isOldDemuxing () const
void skipSamples (const Timestamp &length, AudioStream *stream)
void findEdit (const Timestamp &position)
bool allDataRead () const
void enterNewEdit (const Timestamp &position)
void queueStream (AudioStream *stream, const Timestamp &length)
uint32 getAudioChunkSampleCount (uint chunk) const
Timestamp getChunkLength (uint chunk, bool skipAACPrimer=false) const
uint32 getAACSampleTime (uint32 totalSampleCount, bool skipAACPrimer=false) const
Timestamp getCurrentTrackTime () const

Private Attributes

uint _curChunk
Timestamp _curMediaPos
Timestamp _skipSamples
uint32 _curEdit
uint32 _samplesQueued
bool _skipAACPrimer

Detailed Description

Definition at line 66 of file quicktime_intern.h.

Constructor & Destructor Documentation

Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::QuickTimeAudioTrack ( QuickTimeAudioDecoder decoder,
Track parentTrack 

Definition at line 188 of file quicktime.cpp.

Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::~QuickTimeAudioTrack (  ) 

Definition at line 210 of file quicktime.cpp.

Member Function Documentation

bool Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::allDataRead (  )  const [private]

Definition at line 301 of file quicktime.cpp.

QueuingAudioStream * Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::createStream (  )  const [private]

Definition at line 336 of file quicktime.cpp.

bool Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::endOfData (  )  const [virtual]

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 Audio::AudioStream.

Definition at line 305 of file quicktime.cpp.

void Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::enterNewEdit ( const Timestamp position  )  [private]

Definition at line 438 of file quicktime.cpp.

void Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::findEdit ( const Timestamp position  )  [private]

Definition at line 424 of file quicktime.cpp.

uint32 Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getAACSampleTime ( uint32  totalSampleCount,
bool  skipAACPrimer = false 
) const [private]

Definition at line 547 of file quicktime.cpp.

uint32 Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getAudioChunkSampleCount ( uint  chunk  )  const [private]

Definition at line 527 of file quicktime.cpp.

Timestamp Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getChunkLength ( uint  chunk,
bool  skipAACPrimer = false 
) const [private]

Definition at line 537 of file quicktime.cpp.

Timestamp Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getCurrentTrackTime (  )  const [private]

Definition at line 283 of file quicktime.cpp.

Timestamp Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getLength (  )  const [virtual]

Returns the length of the stream.

length as Timestamp.

Implements Audio::SeekableAudioStream.

Definition at line 332 of file quicktime.cpp.

Track* Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getParent (  )  const [inline]

Definition at line 85 of file quicktime_intern.h.

int Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::getRate (  )  const [inline, virtual]

Sample rate of the stream.

Implements Audio::AudioStream.

Definition at line 74 of file quicktime_intern.h.

bool Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::hasDataInQueue (  )  const [inline]

Definition at line 87 of file quicktime_intern.h.

bool Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::isOldDemuxing (  )  const [private]

Definition at line 341 of file quicktime.cpp.

bool Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::isStereo (  )  const [inline, virtual]

Is this a stereo stream?

Implements Audio::AudioStream.

Definition at line 73 of file quicktime_intern.h.

void Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::queueAudio ( const Timestamp length = Timestamp()  ) 

Definition at line 214 of file quicktime.cpp.

void Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::queueRemainingAudio (  ) 

Definition at line 291 of file quicktime.cpp.

void Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::queueStream ( AudioStream stream,
const Timestamp length 
) [private]

Definition at line 516 of file quicktime.cpp.

AudioStream * Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::readAudioChunk ( uint  chunk  )  [private]

Definition at line 345 of file quicktime.cpp.

int Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::readBuffer ( int16 buffer,
const int  numSamples 
) [virtual]

Fill the given buffer with up to numSamples samples.

Returns the actual number of samples read, or -1 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 endianess, 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.

Implements Audio::AudioStream.

Definition at line 295 of file quicktime.cpp.

bool Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::seek ( const Timestamp where  )  [virtual]

Seeks to a given offset in the stream.

where offset as timestamp
true on success, false on failure.

Implements Audio::SeekableAudioStream.

Definition at line 309 of file quicktime.cpp.

void Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack::skipSamples ( const Timestamp length,
AudioStream stream 
) [private]

Definition at line 405 of file quicktime.cpp.

Member Data Documentation

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

Generated on Sat Aug 8 2020 05:03:03 for ResidualVM by doxygen 1.7.1
curved edge   curved edge