EMIPLIB
1.2.1
|
Creates a VoIP session. More...
#include <mipaudiosession.h>
Public Member Functions | |
bool | init (const MIPAudioSessionParams *pParams=0, MIPRTPSynchronizer *pSync=0, jrtplib::RTPSession *pRTPSession=0, bool autoStart=true) |
Initializes the session. More... | |
bool | startChain () |
Starts the component chain that was constructed in the MIPAudioSession::init function, and is necessary if the autoStart parameter of that function was set to false . More... | |
bool | destroy () |
Destroys the session. More... | |
bool | addDestination (const jrtplib::RTPAddress &addr) |
Add a destination. More... | |
bool | deleteDestination (const jrtplib::RTPAddress &addr) |
Delete a destination. More... | |
bool | clearDestinations () |
Clear the destination list. More... | |
bool | supportsMulticasting () |
Returns true if multicasting is supported, false otherwise. More... | |
bool | joinMulticastGroup (const jrtplib::RTPAddress &addr) |
Joins a multicast group. More... | |
bool | leaveMulticastGroup (const jrtplib::RTPAddress &addr) |
Leaves a multicast group. More... | |
bool | leaveAllMulticastGroups () |
Leaves all multicast groups. More... | |
bool | setReceiveMode (jrtplib::RTPTransmitter::ReceiveMode m) |
Set a receive mode. More... | |
bool | addToIgnoreList (const jrtplib::RTPAddress &addr) |
Adds an address to the ignore list. More... | |
bool | deleteFromIgnoreList (const jrtplib::RTPAddress &addr) |
Removes an address from the ignore list. More... | |
bool | clearIgnoreList () |
Clears the ignore list. More... | |
bool | addToAcceptList (const jrtplib::RTPAddress &addr) |
Adds an address to the accept list. More... | |
bool | deleteFromAcceptList (const jrtplib::RTPAddress &addr) |
Deletes an address from the accept list. More... | |
bool | clearAcceptList () |
Clears the accept list. More... | |
Public Member Functions inherited from MIPErrorBase | |
std::string | getErrorString () const |
Returns the last known error description. More... | |
Protected Member Functions | |
virtual void | onInputThreadExit (bool err, const std::string &compName, const std::string &errStr) |
By overriding this function, you can detect when the input thread has finished. More... | |
virtual void | onOutputThreadExit (bool err, const std::string &compName, const std::string &errStr) |
By overriding this function, you can detect when the output thread has finished. More... | |
virtual void | onIOThreadExit (bool err, const std::string &compName, const std::string &errStr) |
By overriding this function, you can detect when the input/output thread has finished. More... | |
Protected Member Functions inherited from MIPErrorBase | |
void | setErrorString (const std::string &str) const |
Stores an error description. More... | |
This wrapper class can be used to create a VoIP session. Transmitted data will be Speex encoded. Destinations are specified using subclasses of RTPAddress from the JRTPLIB library. Currently, only RTPIPv4Address instances can be specified.
bool MIPAudioSession::addDestination | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::addToAcceptList | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::addToIgnoreList | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::clearAcceptList | ( | ) |
bool MIPAudioSession::clearDestinations | ( | ) |
bool MIPAudioSession::clearIgnoreList | ( | ) |
bool MIPAudioSession::deleteDestination | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::deleteFromAcceptList | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::deleteFromIgnoreList | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::destroy | ( | ) |
bool MIPAudioSession::init | ( | const MIPAudioSessionParams * | pParams = 0 , |
MIPRTPSynchronizer * | pSync = 0 , |
||
jrtplib::RTPSession * | pRTPSession = 0 , |
||
bool | autoStart = true |
||
) |
Using this function, the session is initialized.
pParams | Session parameters. |
pSync | RTP stream synchronizer. |
pRTPSession | Supply your own RTPSession instance with this parameter. In this case, the RTPSession instance is not deleted when the audio session is destroyed. The session has to be initialized, but the timestamp unit will still be adjusted. |
autoStart | If true , the constructed chain is started before the function returns. If false is specified instead, a call to MIPAudioSession::startChain is necessary. |
bool MIPAudioSession::joinMulticastGroup | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPAudioSession::leaveAllMulticastGroups | ( | ) |
bool MIPAudioSession::leaveMulticastGroup | ( | const jrtplib::RTPAddress & | addr | ) |
|
inlineprotectedvirtual |
By overriding this function, you can detect when the input thread has finished.
err | Flag indicating if the thread stopped due to an error. |
compName | Contains the component in which the error occured. |
errStr | Contains a description of the error. |
Referenced by onIOThreadExit().
|
inlineprotectedvirtual |
By overriding this function, you can detect when the input/output thread has finished. A single input/output thread is used in the GNU/Linux version when input and output OSS device are the same.
err | Flag indicating if the thread stopped due to an error. |
compName | Contains the component in which the error occured. |
errStr | Contains a description of the error. |
References MIPMESSAGE_TYPE_ALL, onInputThreadExit(), onIOThreadExit(), and onOutputThreadExit().
Referenced by onIOThreadExit().
|
inlineprotectedvirtual |
By overriding this function, you can detect when the output thread has finished.
err | Flag indicating if the thread stopped due to an error. |
compName | Contains the component in which the error occured. |
errStr | Contains a description of the error. |
Referenced by onIOThreadExit().
bool MIPAudioSession::setReceiveMode | ( | jrtplib::RTPTransmitter::ReceiveMode | m | ) |
Using this function, a receive mode can be specified. Valid receive modes are RTPTransmitter::AcceptAll
, RTPTransmitter::AcceptSome
and RTPTransmitter::IgnoreSome
. In the last two cases, packets are accepted or ignored based upon information in the accept or ignore list. Note that changing the receive mode will cause such a list to be cleared.
bool MIPAudioSession::startChain | ( | ) |
bool MIPAudioSession::supportsMulticasting | ( | ) |