EMIPLIB
1.2.1
|
Creates a video over IP session. More...
#include <mipvideosession.h>
Public Member Functions | |
bool | init (const MIPVideoSessionParams *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 MIPVideoSession::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... | |
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. | |
MIPQt5OutputComponent * | getQt5OutputComponent () |
If the Qt5 output component is being used, this retrieves the output component, which can be used to render the incoming video frames (do not delete this component yourself, it is managed internally). More... | |
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. 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... | |
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 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.
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 | ( | ) |
MIPQt5OutputComponent* MIPVideoSession::getQt5OutputComponent | ( | ) |
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
.
sourceID | The last frame of this source will be retrieved. |
pData | Will 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 . |
pWidth | Here, the width of the video frame is stored. |
pHeight | Used to store the height of the frame. |
minimalTime | Specifies 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 , |
||
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 video 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 MIPVideoSession::startChain is necessary. |
bool MIPVideoSession::joinMulticastGroup | ( | const jrtplib::RTPAddress & | addr | ) |
bool MIPVideoSession::leaveAllMulticastGroups | ( | ) |
bool MIPVideoSession::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 onOutputThreadExit().
|
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. |
References onInputThreadExit(), and onOutputThreadExit().
Referenced by onOutputThreadExit().
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::startChain | ( | ) |
bool MIPVideoSession::supportsMulticasting | ( | ) |