Next: , Previous: Standards Tracking, Up: Top

7 Upgrading

This chapter outlines the main steps required to upgrade applications written for old releases of ccRTP (0.6.x, 0.7.x and 0.9.x series) to the 1.0 series. It is written mostly as a recipe of replacements for old constructs.

Replace #include <cc++/rtp.h> with #include <ccrtp/rtp.h>1.

Changes that have to do more with Common C++ 2 than with ccRTP:

Replace with exit()
Replace with Thread::terminate()
Replace with sleep(timeout_t).
Replace with Thread::run()

Changes required by ccRTP itself:

Now SyncSource, and is a somewhat different concept. For instance, calls to RTPSource::getID() must be replaced with calls to SyncSource::getID(), which in most cases will not imply any change to this part of the code.
Replace with RTPQueueBase::getLocalSSRC()
Replace with defaultApplication().getSDESItem(SDESItemTypeSDES).
getPacket() has been removed and now there is only a getData() method in the RTP queues.
Replace calls to RTPQueue::setTimeout(microtimeout_t) with calls to OutgoingDataQueue(microtimeout_t), whose purpose and working is exactly the same.
putPacket() has been removed and now there is only a putData() method in the RTP queues. Note also that now the payload type is not specified for each outgoing RTP data block, instead use RTPQueueBase::setPayloadFormat each time the payload type changes.
The definition of payload types has deeply changed in order to allow all standard uses of dynamic payload negotiation. Refer to Payload Types and Formats, for an explanation of the new payload types and formats related classes.

For example, RTP_PAYLOAD_PCMU must be replaced with something like StaticPayloadFormat pcmu(sptPCMU), where pcmu is the name of a static payload object that binds an statically assigned PayloadType 2. to its corresponding RTP clock rate3.

The call connect has been removed. Now, in order to send packets to a destination OutgoingDataQueue::addDestination must be used. It allows for setting more than one destination. Any destination can actually be added more than one time with addDestination, which can be used a simple trick to perform redundant transmission: each packet -both RTP and RTCP- will be transmitted to the destination as many times as it has been added to the list of destinations through calling addDestination.
Replace with RTPQueueBase::getCurrentRTPClockRate().
Replace with RTPSession::startRunning.
Replace with QueueRTCPManager::onNewSyncSource.
Replace with QueueRTCPManager::onGotGoodbye.


[1] Note that unfortunately ccRTP 1.0pre0 used #include <cc++/rtp/rtp.h, which is now deprecated.

[2] The static payload type 0 corresponds to the audio format PCMU, see RFC 3550.

[3] 8 khz.