MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
AudioReencodeBuffer Class Reference

This class is to act as a fake audio output device to store the data for reencoding. More...

#include <audioreencodebuffer.h>

Inheritance diagram for AudioReencodeBuffer:
Inheritance graph
[legend]
Collaboration diagram for AudioReencodeBuffer:
Collaboration graph
[legend]

Public Member Functions

 AudioReencodeBuffer (AudioFormat audio_format, int audio_channels, bool passthru)
 
 ~AudioReencodeBuffer ()
 
virtual void Reconfigure (const AudioSettings &settings)
 reconfigure sound out for new params More...
 
virtual void SetEffDsp (int dsprate)
 
virtual void Reset (void)
 
virtual bool AddFrames (void *buffer, int frames, int64_t timecode)
 
virtual bool AddData (void *buffer, int len, int64_t timecode, int frames)
 
AudioBufferGetData (long long time)
 
long long GetSamples (long long time)
 
virtual void SetTimecode (int64_t timecode)
 
virtual bool IsPaused (void) const
 
virtual void Pause (bool paused)
 
virtual void PauseUntilBuffered (void)
 
virtual void Drain (void)
 
virtual int64_t GetAudiotime (void)
 
virtual int GetVolumeChannel (int) const
 
virtual void SetVolumeChannel (int, int)
 
virtual void SetVolumeAll (int)
 
virtual uint GetCurrentVolume (void) const
 
virtual void SetCurrentVolume (int)
 
virtual void AdjustCurrentVolume (int)
 
virtual void SetMute (bool)
 
virtual void ToggleMute (void)
 
virtual MuteState GetMuteState (void) const
 
virtual MuteState IterateMutedChannels (void)
 
virtual void SetSWVolume (int new_volume, bool save)
 
virtual int GetSWVolume (void)
 
virtual bool CanPassthrough (int, int, int, int) const
 
virtual void bufferOutputData (bool)
 
virtual int readOutputData (unsigned char *, int)
 
- Public Member Functions inherited from VolumeBase
 VolumeBase ()
 
virtual ~VolumeBase ()
 
void SWVolume (bool set)
 
bool SWVolume (void) const
 
virtual MuteState SetMuteState (MuteState)
 
- Public Member Functions inherited from OutputListeners
 OutputListeners ()
 
virtual ~OutputListeners ()
 
bool hasVisual (void)
 
void addVisual (MythTV::Visual *)
 
void removeVisual (MythTV::Visual *)
 
QMutex * mutex ()
 
void setBufferSize (unsigned int sz)
 
unsigned int bufferSize () const
 
- Public Member Functions inherited from MythObservable
 MythObservable ()
 
virtual ~MythObservable ()
 
void addListener (QObject *listener)
 Add a listener to the observable. More...
 
void removeListener (QObject *listener)
 Remove a listener to the observable. More...
 
void dispatch (const MythEvent &event)
 Dispatch an event to all listeners. More...
 
bool hasListeners (void)
 

Public Attributes

int m_channels
 
int m_bytes_per_frame
 
int m_eff_audiorate
 
long long m_last_audiotime
 
bool m_passthru
 
int m_audioFrameSize
 

Private Attributes

bool m_initpassthru
 
QMutex m_bufferMutex
 
QList< AudioBuffer * > m_bufferList
 
AudioBufferm_saveBuffer
 

Additional Inherited Members

- Static Public Member Functions inherited from VolumeBase
static MuteState NextMuteState (MuteState)
 
- Protected Member Functions inherited from AudioOutput
void Error (const QString &msg)
 
void SilentError (const QString &msg)
 
void Warn (const QString &msg)
 
void ClearError (void)
 
void ClearWarning (void)
 
- Protected Member Functions inherited from VolumeBase
void UpdateVolume (void)
 
void SyncVolume (void)
 
void SetChannels (int new_channels)
 
- Protected Member Functions inherited from OutputListeners
void error (const QString &e)
 
void dispatchVisual (uchar *b, unsigned long b_len, unsigned long written, int chan, int prec)
 
void prepareVisuals ()
 
- Protected Attributes inherited from AudioOutput
QString lastError
 
QString lastWarn
 
bool pulsewassuspended
 
- Protected Attributes inherited from VolumeBase
bool internal_vol
 
- Protected Attributes inherited from MythObservable
QMutex * m_lock
 
QSet< QObject * > m_listeners
 

Detailed Description

This class is to act as a fake audio output device to store the data for reencoding.

Definition at line 31 of file audioreencodebuffer.h.

Constructor & Destructor Documentation

AudioReencodeBuffer::AudioReencodeBuffer ( AudioFormat  audio_format,
int  audio_channels,
bool  passthru 
)

Definition at line 65 of file audioreencodebuffer.cpp.

AudioReencodeBuffer::~AudioReencodeBuffer ( )

Definition at line 75 of file audioreencodebuffer.cpp.

Member Function Documentation

void AudioReencodeBuffer::Reconfigure ( const AudioSettings settings)
virtual

reconfigure sound out for new params

Implements AudioOutput.

Definition at line 85 of file audioreencodebuffer.cpp.

Referenced by AudioReencodeBuffer().

void AudioReencodeBuffer::SetEffDsp ( int  dsprate)
virtual
Parameters
dsprateis in 100 * frames/second

Implements AudioOutput.

Definition at line 99 of file audioreencodebuffer.cpp.

void AudioReencodeBuffer::Reset ( void  )
virtual

Implements AudioOutput.

Definition at line 104 of file audioreencodebuffer.cpp.

Referenced by AudioReencodeBuffer(), and ~AudioReencodeBuffer().

bool AudioReencodeBuffer::AddFrames ( void buffer,
int  frames,
int64_t  timecode 
)
virtual
Parameters
timecodeis in milliseconds.

Implements AudioOutput.

Definition at line 117 of file audioreencodebuffer.cpp.

bool AudioReencodeBuffer::AddData ( void buffer,
int  len,
int64_t  timecode,
int  frames 
)
virtual
Parameters
timecodeis in milliseconds.

Implements AudioOutput.

Definition at line 125 of file audioreencodebuffer.cpp.

Referenced by AddFrames().

AudioBuffer * AudioReencodeBuffer::GetData ( long long  time)

Definition at line 190 of file audioreencodebuffer.cpp.

Referenced by Transcode::TranscodeFile().

long long AudioReencodeBuffer::GetSamples ( long long  time)

Definition at line 208 of file audioreencodebuffer.cpp.

Referenced by Transcode::TranscodeFile().

void AudioReencodeBuffer::SetTimecode ( int64_t  timecode)
virtual

Implements AudioOutput.

Definition at line 229 of file audioreencodebuffer.cpp.

virtual bool AudioReencodeBuffer::IsPaused ( void  ) const
inlinevirtual

Implements AudioOutput.

Definition at line 47 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::Pause ( bool  paused)
inlinevirtual

Implements AudioOutput.

Definition at line 48 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::PauseUntilBuffered ( void  )
inlinevirtual

Implements AudioOutput.

Definition at line 49 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::Drain ( void  )
inlinevirtual

Implements AudioOutput.

Definition at line 50 of file audioreencodebuffer.h.

virtual int64_t AudioReencodeBuffer::GetAudiotime ( void  )
inlinevirtual

Implements AudioOutput.

Definition at line 51 of file audioreencodebuffer.h.

virtual int AudioReencodeBuffer::GetVolumeChannel ( int  ) const
inlinevirtual

Implements VolumeBase.

Definition at line 52 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::SetVolumeChannel ( int  ,
int   
)
inlinevirtual

Implements VolumeBase.

Definition at line 53 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::SetVolumeAll ( int  )
inlinevirtual

Definition at line 54 of file audioreencodebuffer.h.

virtual uint AudioReencodeBuffer::GetCurrentVolume ( void  ) const
inlinevirtual

Reimplemented from VolumeBase.

Definition at line 55 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::SetCurrentVolume ( int  )
inlinevirtual

Reimplemented from VolumeBase.

Definition at line 56 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::AdjustCurrentVolume ( int  )
inlinevirtual

Reimplemented from VolumeBase.

Definition at line 57 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::SetMute ( bool  )
inlinevirtual

Definition at line 58 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::ToggleMute ( void  )
inlinevirtual

Reimplemented from VolumeBase.

Definition at line 59 of file audioreencodebuffer.h.

virtual MuteState AudioReencodeBuffer::GetMuteState ( void  ) const
inlinevirtual

Reimplemented from VolumeBase.

Definition at line 60 of file audioreencodebuffer.h.

virtual MuteState AudioReencodeBuffer::IterateMutedChannels ( void  )
inlinevirtual

Definition at line 61 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::SetSWVolume ( int  new_volume,
bool  save 
)
inlinevirtual

Implements VolumeBase.

Definition at line 62 of file audioreencodebuffer.h.

virtual int AudioReencodeBuffer::GetSWVolume ( void  )
inlinevirtual

Implements VolumeBase.

Definition at line 63 of file audioreencodebuffer.h.

virtual bool AudioReencodeBuffer::CanPassthrough ( int  ,
int  ,
int  ,
int   
) const
inlinevirtual

Reimplemented from AudioOutput.

Definition at line 64 of file audioreencodebuffer.h.

virtual void AudioReencodeBuffer::bufferOutputData ( bool  )
inlinevirtual

Implements AudioOutput.

Definition at line 68 of file audioreencodebuffer.h.

virtual int AudioReencodeBuffer::readOutputData ( unsigned char *  ,
int   
)
inlinevirtual

Implements AudioOutput.

Definition at line 69 of file audioreencodebuffer.h.

Member Data Documentation

int AudioReencodeBuffer::m_channels

Definition at line 71 of file audioreencodebuffer.h.

Referenced by Reconfigure(), and Transcode::TranscodeFile().

int AudioReencodeBuffer::m_bytes_per_frame

Definition at line 72 of file audioreencodebuffer.h.

Referenced by AddData(), AddFrames(), Reconfigure(), and Transcode::TranscodeFile().

int AudioReencodeBuffer::m_eff_audiorate

Definition at line 73 of file audioreencodebuffer.h.

Referenced by AddData(), Reconfigure(), SetEffDsp(), and Transcode::TranscodeFile().

long long AudioReencodeBuffer::m_last_audiotime

Definition at line 74 of file audioreencodebuffer.h.

Referenced by AddData(), GetAudiotime(), and SetTimecode().

bool AudioReencodeBuffer::m_passthru

Definition at line 75 of file audioreencodebuffer.h.

Referenced by Reconfigure(), and Transcode::TranscodeFile().

int AudioReencodeBuffer::m_audioFrameSize

Definition at line 76 of file audioreencodebuffer.h.

Referenced by AddData(), and Transcode::TranscodeFile().

bool AudioReencodeBuffer::m_initpassthru
private

Definition at line 79 of file audioreencodebuffer.h.

Referenced by CanPassthrough().

QMutex AudioReencodeBuffer::m_bufferMutex
private

Definition at line 80 of file audioreencodebuffer.h.

Referenced by AddData(), GetData(), GetSamples(), and Reset().

QList<AudioBuffer *> AudioReencodeBuffer::m_bufferList
private

Definition at line 81 of file audioreencodebuffer.h.

Referenced by AddData(), GetData(), GetSamples(), and Reset().

AudioBuffer* AudioReencodeBuffer::m_saveBuffer
private

Definition at line 82 of file audioreencodebuffer.h.

Referenced by AddData(), and ~AudioReencodeBuffer().


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