Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

OutChannel encoder


Detailed Description

The following methods and properties are publicly available to control the behaviour or a OutChannel instance.

OutChannel offers you:

uniformed settings for the parameters of each codec:

methods to create instances of the Shouter class (*_ice)

methods to start/stop the file dumping of the encoded audio to a certain file.

The codec parameters are declared thru defines like INT_SET or CHAR_SET or FLOAT_SET: they basically define two overloaded functions to set and get the named parameter.


Functions

 OutChannel (char *myname)
 the OutChannel class constructor

virtual ~OutChannel ()
 the OutChannel class destructor

int create_ice ()
 Create a Shouter instance.

bool delete_ice (int iceid)
 delete a Shouter with ID

Shouter * get_ice (int iceid)
 get a Shouter instance with ID

bool apply_ice (int iceid)
 Applica la configurazione corrente.

bool connect_ice (int iceid, bool on)
 Connette o disconnette il server ID a seconda del flag.

 INT_SET (bps, _bps)
 Kbit/s.

 INT_SET (freq, _freq)
 samplerate in Hz

 INT_SET (channels, _channels)
 channels (1 is mono, 2 is stereo)

 INT_SET (lowpass, _lowpass)
 lowpass in Hz

 INT_SET (highpass, _highpass)
 highpass in Hz

char * quality (float in)
 setup quality (wraps most useful modes)

unsigned int get_bitrate ()
 get the size of encoded audio in bytes

bool dump_start (char *file)
 Start encoding to a file.

bool dump_stop ()
 Stop encoding to a file.


Variables

char name [128]
 name string of the encoder type (read only)

char version [128]
 version string of the encoder type (read only)

enum codec tipo
 codec type (read only)

bool quit
 set to true to exit the OutChannel thread

bool running
 if true the OutChannel thread is running (read only)

bool initialized
 if true all buffers have been allocated (read only)

Linklist icelist
 the Linklist of Shouter instances

float _quality
char quality_desc [256]
 string rendered to describe the quality of encoding

FILE * fd
 if non-zero a file is opened for dumping

char fd_name [MAX_PATH_SIZE]
 full path filename for dumping


Function Documentation

bool OutChannel::apply_ice int  iceid  )  [inherited]
 

Applica la configurazione corrente.

Se gia' connesso, resta connesso

Parameters:
iceid Shouter ID
Returns:
true on success, false otherwise

Definition at line 255 of file outchannels.cpp.

bool OutChannel::connect_ice int  iceid,
bool  on
[inherited]
 

Connette o disconnette il server ID a seconda del flag.

Parameters:
iceid Shouter ID
on on/off flag
Returns:
true if connected, false otherwise

Definition at line 268 of file outchannels.cpp.

int OutChannel::create_ice  )  [inherited]
 

Create a Shouter instance.

Returns:
ID of the new Shouter instance, or -1 on error

Definition at line 191 of file outchannels.cpp.

bool OutChannel::delete_ice int  iceid  )  [inherited]
 

delete a Shouter with ID

Parameters:
iceid Shouter ID

Definition at line 231 of file outchannels.cpp.

bool OutChannel::dump_start char *  file  )  [inherited]
 

Start encoding to a file.

Starts to dump the encoded audio inside a local file. If the file is allready existing, it creates a new one with a slightly different name, without overwriting. If it was allready dumping, it keeps on: to change the filename to another file you must stop and then restart.

Parameters:
file full path to the encoded file, including extension
Returns:
true on success, false otherwise

Definition at line 318 of file outchannels.cpp.

bool OutChannel::dump_stop  )  [inherited]
 

Stop encoding to a file.

Returns:
true on success, false otherwise

Definition at line 349 of file outchannels.cpp.

unsigned int OutChannel::get_bitrate  )  [inline, inherited]
 

get the size of encoded audio in bytes

Returns:
the size of the encoded audio in bytes

Definition at line 196 of file outchannels.h.

Shouter * OutChannel::get_ice int  iceid  )  [inherited]
 

get a Shouter instance with ID

Parameters:
iceid Shouter ID
Returns:
il puntatore ad uno Shouter

Definition at line 251 of file outchannels.cpp.

OutChannel::OutChannel char *  myname  )  [inherited]
 

the OutChannel class constructor

Parameters:
myname given at creation by Stream_mixer

Definition at line 61 of file outchannels.cpp.

char * OutChannel::quality float  in  )  [inherited]
 

setup quality (wraps most useful modes)

This method guesses the bps and samplerate parameters of the encoder from quality value, then it renders the quality_desc string with a human readable description of the setting.

You can internally tweak this function to modify the mapping of quality values to bps and samplerate.

Returns:
pointer to quality desc

Definition at line 400 of file outchannels.cpp.


Variable Documentation

Linklist OutChannel::icelist [inherited]
 

the Linklist of Shouter instances

This is directly accessible: position operations on the Linklist class are thread safe.

Definition at line 156 of file outchannels.h.


Generated on Thu Dec 16 12:28:23 2004 for MuSE by doxygen1.3