EMIPLIB
Public Member Functions | Protected Member Functions

MIPVideoSession Class Reference

Creates a video over IP session. More...

#include <mipvideosession.h>

Inheritance diagram for MIPVideoSession:
Inheritance graph
[legend]
Collaboration diagram for MIPVideoSession:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool init (const MIPVideoSessionParams *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.
bool getSourceIDs (std::list< uint64_t > &sourceIDs)
 If the video frame storage component is being used, this function retrieves the list of source IDs of which video frames are currently stored.
bool getVideoFrame (uint64_t sourceID, uint8_t **pData, int *pWidth, int *pHeight, MIPTime minimalTime=MIPTime(0))
 If the video frame storage component is being used, this function retrieves the last received video frame of a specific source.

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.

Detailed Description

This wrapper class can be used to create a video over IP session. Transmitted data will be H.263+ encoded. Destinations are specified using subclasses of RTPAddress from the JRTPLIB library. Currently, only RTPIPv4Address instances can be specified.


Member Function Documentation

bool MIPVideoSession::addDestination ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::addToAcceptList ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::addToIgnoreList ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::clearAcceptList ( )
bool MIPVideoSession::clearDestinations ( )
bool MIPVideoSession::clearIgnoreList ( )
bool MIPVideoSession::deleteDestination ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::deleteFromAcceptList ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::deleteFromIgnoreList ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::destroy ( )
bool MIPVideoSession::getVideoFrame ( uint64_t  sourceID,
uint8_t **  pData,
int *  pWidth,
int *  pHeight,
MIPTime  minimalTime = MIPTime(0) 
)

If the video frame storage component is being used, this function retrieves the last received video frame of the source corresponding to sourceID.

Parameters:
sourceIDThe last frame of this source will be retrieved.
pDataWill contain the video frame in YUV420P format. If the content of this pointer is NULL, that the video frame is not more recent than the time specified in minimalTime.
pWidthHere, the width of the video frame is stored.
pHeightUsed to store the height of the frame.
minimalTimeSpecifies that frame data should only be returned if the associated time is more recent than minimalTime.
bool MIPVideoSession::init ( const MIPVideoSessionParams pParams = 0,
MIPRTPSynchronizer pSync = 0,
jrtplib::RTPSession *  pRTPSession = 0 
)

Using this function, the session is initialized.

Parameters:
pParamsSession parameters.
pSyncRTP stream synchronizer.
pRTPSessionSupply your own RTPSession instance with this parameter. In this case, the RTPSession instance is not deleted when the video session is destroyed. The session has to be initialized, but the timestamp unit will still be adjusted.
bool MIPVideoSession::joinMulticastGroup ( const jrtplib::RTPAddress &  addr)
bool MIPVideoSession::leaveAllMulticastGroups ( )
bool MIPVideoSession::leaveMulticastGroup ( const jrtplib::RTPAddress &  addr)
virtual void MIPVideoSession::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:
errFlag indicating if the thread stopped due to an error.
compNameContains the component in which the error occured.
errStrContains a description of the error.
virtual void MIPVideoSession::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:
errFlag indicating if the thread stopped due to an error.
compNameContains the component in which the error occured.
errStrContains a description of the error.
bool MIPVideoSession::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 MIPVideoSession::supportsMulticasting ( )

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