Initiating RTP sessions with ccRTP involves the construction
of an object of the class
RTPSession and calling some optional
RTPSession constructors take two
mandatory arguments: local network address and local transport port
(where incoming packets are expected). There are two constructors, one
of them takes a host address as first parameter, while the other takes
a multicast address. In the latter case, the application will join to
a multicast group.
General purpose RTP stacks of ccRTP, such as
RTPSession objects, must be signaled to start execution. This
is done calling the
startRunning() method. Note there is also a
enableStack() method, this only activates the stack but does not
start the execution of the stack thread.
After the steps above, the application can receive data, but will not transmit to any destination. This and other session parameters can be set as follows:
setPayloadFormat. By default, the static payload type 0 is assumed (PCMU format at 8Khz).
setPRIVPrefixmethods over the object returned by the
setSessionBandwidthmethod of the session object. If not called, a default bandwidth of 64Kbps is assumed, and 5% of this bandwidth is used for RTCP. This percentage can be changed through the setControlBandwidth method.