|
|
Program main object.
static const unsigned int maxOutput | maxOutput |
[private]
typedef struct -- | -- |
[private]
Type describing each lame library output.
Output audioOuts[maxOutput] | audioOuts[maxOutput] |
[private]
unsigned int noAudioOuts | noAudioOuts |
[private]
unsigned int duration | duration |
[private]
Ref<AudioSource> dsp | dsp |
[private]
Ref<Connector> encConnector | encConnector |
[private]
int origSchedPolicy | origSchedPolicy |
[private]
int origSchedPriority | origSchedPriority |
[private]
void
init ( const Config & config )
throw ( Exception ) | init |
[private]
Initialize the object.
Parameters:
config | the config Object to read initialization information from. |
Throws: Exception
void
configIceCast ( const Config & config,
unsigned int bufferSecs )
throw ( Exception ) | configIceCast |
[private]
Look for the icecast stream outputs from the config file. Called from init()
Parameters:
config | the config Object to read initialization information from. |
bufferSecs | number of seconds to buffer audio for |
Throws: Exception
void
configIceCast2 ( const Config & config,
unsigned int bufferSecs )
throw ( Exception ) | configIceCast2 |
[private]
Look for the icecast2 stream outputs from the config file. Called from init()
Parameters:
config | the config Object to read initialization information from. |
bufferSecs | number of seconds to buffer audio for |
Throws: Exception
void
configShoutCast ( const Config & config,
unsigned int bufferSecs )
throw ( Exception ) | configShoutCast |
[private]
Look for the shoutcast stream outputs from the config file. Called from init()
Parameters:
config | the config Object to read initialization information from. |
bufferSecs | number of seconds to buffer audio for |
Throws: Exception
void
configFileCast ( const Config & config )
throw ( Exception ) | configFileCast |
[private]
Look for file outputs from the config file. Called from init()
Parameters:
config | the config Object to read initialization information from. |
Throws: Exception
void
setRealTimeScheduling ( void )
throw ( Exception ) | setRealTimeScheduling |
[private]
Set POSIX real-time scheduling for the encoding process, if user permissions enable it.
Throws: Exception
void
setOriginalScheduling ( void )
throw ( Exception ) | setOriginalScheduling |
[private]
Set the scheduling that was before setting real-time scheduling. This function must be called _only_ after setRealTimeScheduling.
Throws: Exception
bool
encode ( void )
throw ( Exception ) | encode |
[private]
Start encoding. Spawns all encoders, opens the dsp and starts sending data to the encoders.
Returns: if encoding was successful.
Throws: Exception
bool
shout ( unsigned int )
throw ( Exception ) | shout |
[private]
Start shouting. fork()-s a process for each output, reads the output of the encoders and sends them to an IceCast server.
Returns: if shouting was successful.
Throws: Exception
inline
DarkIce ( void )
throw ( Exception ) | DarkIce |
[protected]
Default constructor. Always throws an Exception.
Throws: Exception
inline
DarkIce ( const Config & config )
throw ( Exception ) | DarkIce |
Constructor based on a configuration object.
Parameters:
config | the config Object to read initialization information from. |
Throws: Exception
inline
~DarkIce ( void )
throw ( Exception ) | ~DarkIce |
[virtual]
Destructor.
Throws: Exception
int
run ( void )
throw ( Exception ) | run |
[virtual]
Run the process of recording / encoding / sending to the servers.
Returns: 0 on success
Throws: Exception