#include <vxml.h>
Inheritance diagram for PVXMLChannel:
Public Member Functions | |
PVXMLChannel (unsigned frameDelay, PINDEX frameSize) | |
~PVXMLChannel () | |
virtual PBoolean | Open (PVXMLChannelInterface *vxml) |
virtual PBoolean | IsOpen () const |
Determine if the channel is currently open and read and write operations can be executed on it. | |
virtual PBoolean | Close () |
Close the channel. | |
virtual PBoolean | Read (void *buffer, PINDEX amount) |
Low level read from the file channel. | |
virtual PBoolean | Write (const void *buf, PINDEX len) |
Low level write to the file channel. | |
virtual PWAVFile * | CreateWAVFile (const PFilePath &fn, PBoolean recording=false) |
const PString & | GetMediaFormat () const |
PBoolean | IsMediaPCM () const |
virtual PString | AdjustWavFilename (const PString &fn) |
virtual PBoolean | WriteFrame (const void *buf, PINDEX len)=0 |
virtual PBoolean | IsSilenceFrame (const void *buf, PINDEX len) const =0 |
virtual PBoolean | QueueRecordable (PVXMLRecordable *newItem) |
PBoolean | StartRecording (const PFilePath &fn, unsigned finalSilence=3000, unsigned maxDuration=30000) |
PBoolean | EndRecording () |
PBoolean | IsRecording () const |
virtual PBoolean | ReadFrame (void *buffer, PINDEX amount)=0 |
virtual PINDEX | CreateSilenceFrame (void *buffer, PINDEX amount)=0 |
virtual void | GetBeepData (PBYTEArray &, unsigned) |
virtual PBoolean | QueueResource (const PURL &url, PINDEX repeat=1, PINDEX delay=0) |
virtual PBoolean | QueuePlayable (const PString &type, const PString &str, PINDEX repeat=1, PINDEX delay=0, PBoolean autoDelete=false) |
virtual PBoolean | QueuePlayable (PVXMLPlayable *newItem) |
virtual PBoolean | QueueData (const PBYTEArray &data, PINDEX repeat=1, PINDEX delay=0) |
virtual PBoolean | QueueFile (const PString &fn, PINDEX repeat=1, PINDEX delay=0, PBoolean autoDelete=false) |
virtual PBoolean | QueueCommand (const PString &cmd, PINDEX repeat=1, PINDEX delay=0) |
virtual void | FlushQueue () |
virtual PBoolean | IsPlaying () const |
void | SetPause (PBoolean pause) |
void | SetName (const PString &name) |
unsigned | GetSampleFrequency () const |
void | SetSilence (unsigned msecs) |
Protected Attributes | |
PVXMLChannelInterface * | vxmlInterface |
unsigned | sampleFrequency |
PString | mediaFormat |
PString | wavFilePrefix |
PMutex | channelWriteMutex |
PMutex | channelReadMutex |
PBoolean | closed |
PBoolean | recording |
PVXMLRecordable * | recordable |
unsigned | finalSilence |
unsigned | silenceRun |
PMutex | queueMutex |
PVXMLQueue | playQueue |
PVXMLPlayable * | currentPlayItem |
PBoolean | paused |
PTimer | m_silenceTimer |
int | totalData |
PString | channelName |
PVXMLChannel::PVXMLChannel | ( | unsigned | frameDelay, | |
PINDEX | frameSize | |||
) |
PVXMLChannel::~PVXMLChannel | ( | ) |
virtual PBoolean PVXMLChannel::Close | ( | ) | [virtual] |
Close the channel.
This will detach itself from the read and write channels and delete both of them if they are auto delete.
Reimplemented from PIndirectChannel.
virtual PINDEX PVXMLChannel::CreateSilenceFrame | ( | void * | buffer, | |
PINDEX | amount | |||
) | [pure virtual] |
virtual PWAVFile* PVXMLChannel::CreateWAVFile | ( | const PFilePath & | fn, | |
PBoolean | recording = false | |||
) | [virtual] |
PBoolean PVXMLChannel::EndRecording | ( | ) |
virtual void PVXMLChannel::FlushQueue | ( | ) | [virtual] |
virtual void PVXMLChannel::GetBeepData | ( | PBYTEArray & | , | |
unsigned | ||||
) | [inline, virtual] |
const PString& PVXMLChannel::GetMediaFormat | ( | ) | const [inline] |
unsigned PVXMLChannel::GetSampleFrequency | ( | ) | const [inline] |
PBoolean PVXMLChannel::IsMediaPCM | ( | ) | const [inline] |
virtual PBoolean PVXMLChannel::IsOpen | ( | ) | const [virtual] |
Determine if the channel is currently open and read and write operations can be executed on it.
For example, in the PFile
class it returns if the file is currently open.
Reimplemented from PIndirectChannel.
virtual PBoolean PVXMLChannel::IsPlaying | ( | ) | const [inline, virtual] |
PBoolean PVXMLChannel::IsRecording | ( | ) | const [inline] |
virtual PBoolean PVXMLChannel::IsSilenceFrame | ( | const void * | buf, | |
PINDEX | len | |||
) | const [pure virtual] |
virtual PBoolean PVXMLChannel::Open | ( | PVXMLChannelInterface * | vxml | ) | [virtual] |
virtual PBoolean PVXMLChannel::QueueCommand | ( | const PString & | cmd, | |
PINDEX | repeat = 1 , |
|||
PINDEX | delay = 0 | |||
) | [inline, virtual] |
virtual PBoolean PVXMLChannel::QueueData | ( | const PBYTEArray & | data, | |
PINDEX | repeat = 1 , |
|||
PINDEX | delay = 0 | |||
) | [virtual] |
virtual PBoolean PVXMLChannel::QueueFile | ( | const PString & | fn, | |
PINDEX | repeat = 1 , |
|||
PINDEX | delay = 0 , |
|||
PBoolean | autoDelete = false | |||
) | [inline, virtual] |
virtual PBoolean PVXMLChannel::QueuePlayable | ( | PVXMLPlayable * | newItem | ) | [virtual] |
virtual PBoolean PVXMLChannel::QueuePlayable | ( | const PString & | type, | |
const PString & | str, | |||
PINDEX | repeat = 1 , |
|||
PINDEX | delay = 0 , |
|||
PBoolean | autoDelete = false | |||
) | [virtual] |
virtual PBoolean PVXMLChannel::QueueRecordable | ( | PVXMLRecordable * | newItem | ) | [virtual] |
virtual PBoolean PVXMLChannel::QueueResource | ( | const PURL & | url, | |
PINDEX | repeat = 1 , |
|||
PINDEX | delay = 0 | |||
) | [virtual] |
virtual PBoolean PVXMLChannel::Read | ( | void * | buffer, | |
PINDEX | amount | |||
) | [virtual] |
Low level read from the file channel.
The read timeout is ignored for file I/O. The GetLastReadCount() function returns the actual number of bytes read.
The GetErrorCode() function should be consulted after Read() returns false to determine what caused the failure.
Reimplemented from PDelayChannel.
virtual PBoolean PVXMLChannel::ReadFrame | ( | void * | buffer, | |
PINDEX | amount | |||
) | [pure virtual] |
void PVXMLChannel::SetName | ( | const PString & | name | ) | [inline] |
void PVXMLChannel::SetPause | ( | PBoolean | pause | ) | [inline] |
void PVXMLChannel::SetSilence | ( | unsigned | msecs | ) |
PBoolean PVXMLChannel::StartRecording | ( | const PFilePath & | fn, | |
unsigned | finalSilence = 3000 , |
|||
unsigned | maxDuration = 30000 | |||
) |
virtual PBoolean PVXMLChannel::Write | ( | const void * | buf, | |
PINDEX | len | |||
) | [virtual] |
Low level write to the file channel.
The write timeout is ignored for file I/O. The GetLastWriteCount() function returns the actual number of bytes written.
The GetErrorCode() function should be consulted after Write() returns false to determine what caused the failure.
Reimplemented from PDelayChannel.
virtual PBoolean PVXMLChannel::WriteFrame | ( | const void * | buf, | |
PINDEX | len | |||
) | [pure virtual] |
PString PVXMLChannel::channelName [protected] |
Reimplemented from PChannel.
PMutex PVXMLChannel::channelReadMutex [protected] |
PMutex PVXMLChannel::channelWriteMutex [protected] |
PBoolean PVXMLChannel::closed [protected] |
PVXMLPlayable* PVXMLChannel::currentPlayItem [protected] |
unsigned PVXMLChannel::finalSilence [protected] |
PTimer PVXMLChannel::m_silenceTimer [protected] |
PString PVXMLChannel::mediaFormat [protected] |
PBoolean PVXMLChannel::paused [protected] |
PVXMLQueue PVXMLChannel::playQueue [protected] |
PMutex PVXMLChannel::queueMutex [protected] |
PVXMLRecordable* PVXMLChannel::recordable [protected] |
PBoolean PVXMLChannel::recording [protected] |
unsigned PVXMLChannel::sampleFrequency [protected] |
unsigned PVXMLChannel::silenceRun [protected] |
int PVXMLChannel::totalData [protected] |
PVXMLChannelInterface* PVXMLChannel::vxmlInterface [protected] |
PString PVXMLChannel::wavFilePrefix [protected] |