Creates a VoIP session.
More...
#include <mipaudiosession.h>
List of all members.
Public Member Functions |
bool | init (const MIPAudioSessionParams *pParams=0, MIPRTPSynchronizer *pSync=0, jrtplib::RTPSession *pRTPSession=0) |
| Initializes the session.
|
bool | destroy () |
| Destroys the session.
|
bool | addDestination (const jrtplib::RTPAddress &addr) |
| Add a destination.
|
bool | deleteDestination (const jrtplib::RTPAddress &addr) |
| Delete a destination.
|
bool | clearDestinations () |
| Clear the destination list.
|
bool | supportsMulticasting () |
| Returns true if multicasting is supported, false otherwise.
|
bool | joinMulticastGroup (const jrtplib::RTPAddress &addr) |
| Joins a multicast group.
|
bool | leaveMulticastGroup (const jrtplib::RTPAddress &addr) |
| Leaves a multicast group.
|
bool | leaveAllMulticastGroups () |
| Leaves all multicast groups.
|
bool | setReceiveMode (jrtplib::RTPTransmitter::ReceiveMode m) |
| Set a receive mode.
|
bool | addToIgnoreList (const jrtplib::RTPAddress &addr) |
| Adds an address to the ignore list.
|
bool | deleteFromIgnoreList (const jrtplib::RTPAddress &addr) |
| Removes an address from the ignore list.
|
bool | clearIgnoreList () |
| Clears the ignore list.
|
bool | addToAcceptList (const jrtplib::RTPAddress &addr) |
| Adds an address to the accept list.
|
bool | deleteFromAcceptList (const jrtplib::RTPAddress &addr) |
| Deletes an address from the accept list.
|
bool | clearAcceptList () |
| Clears the accept list.
|
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.
|
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.
|
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.
|
Detailed Description
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.
Member Function Documentation
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 |
( |
| ) |
|
Using this function, the session is initialized.
- Parameters:
-
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. |
bool MIPAudioSession::joinMulticastGroup |
( |
const jrtplib::RTPAddress & |
addr | ) |
|
bool MIPAudioSession::leaveAllMulticastGroups |
( |
| ) |
|
bool MIPAudioSession::leaveMulticastGroup |
( |
const jrtplib::RTPAddress & |
addr | ) |
|
virtual void MIPAudioSession::onInputThreadExit |
( |
bool |
err, |
|
|
const std::string & |
compName, |
|
|
const std::string & |
errStr |
|
) |
| [inline, protected, virtual] |
By overriding this function, you can detect when the input thread has finished.
- Parameters:
-
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. |
virtual void MIPAudioSession::onIOThreadExit |
( |
bool |
err, |
|
|
const std::string & |
compName, |
|
|
const std::string & |
errStr |
|
) |
| [inline, protected, virtual] |
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.
- Parameters:
-
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. |
virtual void MIPAudioSession::onOutputThreadExit |
( |
bool |
err, |
|
|
const std::string & |
compName, |
|
|
const std::string & |
errStr |
|
) |
| [inline, protected, virtual] |
By overriding this function, you can detect when the output thread has finished.
- Parameters:
-
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. |
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::supportsMulticasting |
( |
| ) |
|
The documentation for this class was generated from the following file: