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

# OutChannel Class Reference

`#include <outchannels.h>`

Inherits Entry.

Inheritance diagram for OutChannel:

[legend]
Collaboration diagram for OutChannel:

[legend]
List of all members.

## Detailed Description

the Output Channel class

Instances of the OutChannel class can be crieated via the method create_enc method found in the Stream_mixer class.

Definition at line 58 of file outchannels.h.

## Public Member 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)
| FLOAT_SET (quality, _quality)
| VALUE from 0.1 to 9.0.
| INT_SET (lowpass, _lowpass)
| lowpass in Hz
| INT_SET (highpass, _highpass)
| highpass in Hz
char * | guess_bps ()
| setup the bps encoder value
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.
virtual bool | apply_profile ()=0
| apply changes to the parameters // INTERNAL USE, use Stream_mixer::apply_enc instead
virtual bool | init ()=0
| pure virtual function (INTERNAL)
virtual int | encode ()=0
| pure virtual function (INTERNAL)
virtual void | flush ()=0
| pure virtual function (INVERNAL)
int | shout ()
| strimma fuori l'encodato a tutti gli Shouter // INTERNAL USE by run()
bool | dump ()
| scrive fuori l'encodato nel file // INTERNAL USE by run()
void | push (void *data, int len)
| feeds the pipe for encoding // INTERNAL USE by jmixer.cpp carfudda()
void | start ()
| start OutChannel thread
void | run ()
| running loop called by start()
void | lock ()
void | unlock ()
void | wait ()
void | signal ()
void | lock_ice ()
void | unlock_ice ()
void | destroy ()
## Public Attributes
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
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
Pipe * | erbapipa
| Pipe instance to feed the encoder // INTERNAL USE by run().
bool | encoding
| flag checked by run, (streaming||fd) ? true : false // INTERNAL USE by run()
int16_t | buffer [ENC_BUFFER]
| buffer holding the encoded audio
## Protected Member Functions
bool | calc_bitrate (int enc)
| bitrate calculus
## Static Protected Member Functions
void * | kickoff (void *arg)
## Protected Attributes
int | encoded
| encoded buffer size in bytes
int | bitrate
| bits per second
double | now
| time now (for bitrate calculus)
double | prev
| time previous encoding (for bitrate calculus)
unsigned int | bytes_accu
| bytes accuracy

## Member Function Documentation

virtual bool OutChannel::apply_profile | ( |  | ) | `[pure virtual]`

| apply changes to the parameters // INTERNAL USE, use Stream_mixer::apply_enc instead Used to activate the settings, after every change. To be able to change the OutChannel settings on the fly while encoding thread is running you should never call this directly, but only thru the Stream_mixer::apply_enc method. This is a pure virtual function, the implementation is defined inside the codec classes inheriting OutChannel. Returns: true on success, false otherwise

void* OutChannel::kickoff | ( | void * | arg | ) | `[inline, static, protected]`

  | Parameters:
  arg | lock OutChannel main thread mutex
Definition at line 315 of file outchannels.h.

void OutChannel::push | ( | void * | data,
|  | int | len
| ) |

  | feeds the pipe for encoding // INTERNAL USE by jmixer.cpp carfudda() Parameters:
  data | audio buffer to be encoded
  len | length in bytes of audio buffer to encode
Returns: int>0 = quantity of data pushed into the pipe 0 = no need to feed in data: no encoding is configured -1 = pipe locked, wait a bit Definition at line 427 of file outchannels.cpp.

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

- outchannels.h
- outchannels.cpp