- -( dyne // software :: culture :: events :: planet :: discussion :: museum \\ freaknet )- -
 
Main Page | Modules | Class Hierarchy | Class List | File List | Class 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::OutChannel (char *myname)
 the OutChannel class constructor

virtual OutChannel::~OutChannel ()
 the OutChannel class destructor

int OutChannel::create_ice ()
 Create a Shouter instance.

bool OutChannel::delete_ice (int iceid)
 delete a Shouter with ID

ShouterOutChannel::get_ice (int iceid)
 get a Shouter instance with ID

bool OutChannel::apply_ice (int iceid)
 Applica la configurazione corrente.

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

 OutChannel::INT_SET (bps, _bps)
 Kbit/s.

 OutChannel::INT_SET (freq, _freq)
 samplerate in Hz

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

 OutChannel::INT_SET (lowpass, _lowpass)
 lowpass in Hz

 OutChannel::INT_SET (highpass, _highpass)
 highpass in Hz

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

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

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

bool OutChannel::dump_stop ()
 Stop encoding to a file.


Variables

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

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

enum codec OutChannel::tipo
 codec type (read only)

bool OutChannel::quit
 set to true to exit the OutChannel thread

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

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

Linklist OutChannel::icelist
 the Linklist of Shouter instances

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

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

char OutChannel::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::INT_SET highpass  ,
_highpass 
[inherited]
 

highpass in Hz

OutChannel::INT_SET lowpass  ,
_lowpass 
[inherited]
 

lowpass in Hz

OutChannel::INT_SET channels  ,
_channels 
[inherited]
 

channels (1 is mono, 2 is stereo)

OutChannel::INT_SET freq  ,
_freq 
[inherited]
 

samplerate in Hz

OutChannel::INT_SET bps  ,
_bps 
[inherited]
 

Kbit/s.

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 401 of file outchannels.cpp.

OutChannel::~OutChannel  )  [virtual, inherited]
 

the OutChannel class destructor

Definition at line 93 of file outchannels.cpp.


Variable Documentation

float OutChannel::_quality [inherited]
 

Definition at line 189 of file outchannels.h.

FILE* OutChannel::fd [inherited]
 

if non-zero a file is opened for dumping

Definition at line 222 of file outchannels.h.

char OutChannel::fd_name[MAX_PATH_SIZE] [inherited]
 

full path filename for dumping

Definition at line 223 of file outchannels.h.

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.

bool OutChannel::initialized [inherited]
 

if true all buffers have been allocated (read only)

Definition at line 106 of file outchannels.h.

char OutChannel::name[128] [inherited]
 

name string of the encoder type (read only)

Definition at line 100 of file outchannels.h.

char OutChannel::quality_desc[256] [inherited]
 

string rendered to describe the quality of encoding

Definition at line 190 of file outchannels.h.

bool OutChannel::quit [inherited]
 

set to true to exit the OutChannel thread

Definition at line 104 of file outchannels.h.

bool OutChannel::running [inherited]
 

if true the OutChannel thread is running (read only)

Definition at line 105 of file outchannels.h.

enum codec OutChannel::tipo [inherited]
 

codec type (read only)

Definition at line 102 of file outchannels.h.

char OutChannel::version[128] [inherited]
 

version string of the encoder type (read only)

Definition at line 101 of file outchannels.h.