Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

clStreamDist Class Reference

Audio stream distributor. More...

#include <StreamDist.hh>

Collaboration diagram for clStreamDist:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clStreamDist ()
 ~clStreamDist ()
int Main (int, char **)
void * AudioInThread (void *)
void * ServeClientThread (void *)
void Stop ()

Public Attributes

clLogFile Log

Private Member Functions

void CopyChannel (GDT *, const GDT *, int)
bool InitCompress (int)

Private Attributes

volatile bool bRun
volatile int iFragmentSize
volatile int iAudioBufSize
volatile int iBlockCntr
stRawDataFirst sHdr
clCfgFile Cfg
clAlloc AudioBuf
clMutex MtxAudio
clCondition CndAudio

Detailed Description

Audio stream distributor.

Note:
See soundsrv2 for architecture description.

Definition at line 55 of file StreamDist.hh.


Constructor & Destructor Documentation

clStreamDist::clStreamDist  ) 
 

Definition at line 182 of file StreamDist.cc.

References clLogFile::Add(), bRun, Cfg, iAudioBufSize, iBlockCntr, Log, clLogFile::Open(), SD_CFGFILE, SD_LOGFILE, and clCfgFile::SetFileName().

clStreamDist::~clStreamDist  ) 
 

Definition at line 196 of file StreamDist.cc.

References clLogFile::Add(), and Log.


Member Function Documentation

void clStreamDist::CopyChannel GDT *  ,
const GDT *  ,
int 
[inline, private]
 

Definition at line 127 of file StreamDist.cc.

References _stRawDataFirst::iChannels, iFragmentSize, and sHdr.

Referenced by ServeClientThread().

bool clStreamDist::InitCompress int   )  [private]
 

Definition at line 141 of file StreamDist.cc.

References clLogFile::Add(), Log, and MSG_SOUND_COMPRESS_FLAC.

Referenced by AudioInThread().

int clStreamDist::Main int  ,
char ** 
 

Definition at line 208 of file StreamDist.cc.

References clLogFile::Add(), bDaemon, clSockServ::Bind(), bRun, Cfg, clSockServ::GetErrno(), clCfgFile::GetStr(), GLOBAL_VERSMAJ, GLOBAL_VERSMIN, GLOBAL_VERSPL, Log, SD_CONNECT_TIMEOUT, SD_SHUTDOWNFILE, SigHandler(), Stop(), clSockServ::WaitForConnect(), WrapAudioInThread(), and WrapServeClientThread().

Referenced by main().

void * clStreamDist::AudioInThread void *   ) 
 

Definition at line 288 of file StreamDist.cc.

References clLogFile::Add(), AudioBuf, bRun, Cfg, CndAudio, clSockClie::Connect(), _stRawDataFirst::dSampleRate, _stSoundStart::dSampleRate, GDT, clSoundMsg::GetData(), clSockOp::GetErrno(), clSockClie::GetErrno(), clCfgFile::GetInt(), clSoundMsg::GetStart(), clCfgFile::GetStr(), GLOBAL_HEADER_LEN, iAudioBufSize, iBlockCntr, _stRawDataFirst::iChannels, _stSoundStart::iChannels, _stSoundStart::iCompress, iFragmentSize, _stSoundStart::iFragmentSize, InitCompress(), Log, MSG_SOUND_COMPRESS_FLAC, MtxAudio, clSockOp::ReadN(), SD_HOSTADDR_MAX, SD_INTHREAD_PRIORITY, SD_LOGENTRY_SIZE, clSockOp::SetHandle(), sHdr, and SOp.

Referenced by WrapAudioInThread().

void * clStreamDist::ServeClientThread void *   ) 
 

Definition at line 415 of file StreamDist.cc.

References clLogFile::Add(), AudioBuf, bRun, CndAudio, CopyChannel(), iAudioBufSize, iBlockCntr, _stRawDataReq::iChannel, _stRawDataFirst::iChannels, Log, MtxAudio, clSockOp::ReadN(), SD_OUTTHREAD_PRIORITY, sHdr, SOp, and clSockOp::WriteN().

Referenced by WrapServeClientThread().

void clStreamDist::Stop  )  [inline]
 

Definition at line 84 of file StreamDist.hh.

References bRun.

Referenced by Main(), and SigHandler().


Member Data Documentation

volatile bool clStreamDist::bRun [private]
 

Definition at line 57 of file StreamDist.hh.

Referenced by AudioInThread(), clStreamDist(), Main(), ServeClientThread(), and Stop().

volatile int clStreamDist::iFragmentSize [private]
 

Definition at line 58 of file StreamDist.hh.

Referenced by AudioInThread(), and CopyChannel().

volatile int clStreamDist::iAudioBufSize [private]
 

Definition at line 59 of file StreamDist.hh.

Referenced by AudioInThread(), clStreamDist(), and ServeClientThread().

volatile int clStreamDist::iBlockCntr [private]
 

Definition at line 60 of file StreamDist.hh.

Referenced by AudioInThread(), clStreamDist(), and ServeClientThread().

stRawDataFirst clStreamDist::sHdr [private]
 

Definition at line 61 of file StreamDist.hh.

Referenced by AudioInThread(), CopyChannel(), and ServeClientThread().

clCfgFile clStreamDist::Cfg [private]
 

Definition at line 65 of file StreamDist.hh.

Referenced by AudioInThread(), clStreamDist(), and Main().

clAlloc clStreamDist::AudioBuf [private]
 

Definition at line 66 of file StreamDist.hh.

Referenced by AudioInThread(), and ServeClientThread().

clMutex clStreamDist::MtxAudio [private]
 

Definition at line 67 of file StreamDist.hh.

Referenced by AudioInThread(), and ServeClientThread().

clCondition clStreamDist::CndAudio [private]
 

Definition at line 74 of file StreamDist.hh.

Referenced by AudioInThread(), and ServeClientThread().

clLogFile clStreamDist::Log
 

Definition at line 78 of file StreamDist.hh.

Referenced by AudioInThread(), clStreamDist(), InitCompress(), Main(), ServeClientThread(), SigHandler(), and ~clStreamDist().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:27 2003 for HASAS by doxygen 1.3.3