The JMF APIs that support RTP are found in the javax.media.rtp, javax.media.rtp.event, and javax.media.rtp.rtcp packages. The JMF RTP APIs enable you to:
The JMF 2.1 FCS Reference Implementation supports:
RTP Client Requirements
Commercial RTP server for Windows
Publically available audio and video RTP tools
Runs on most Unix systems & Windows
Publically available audio and video RTP tools
Runs on most Unix systems & Windows
RTP Server Requirements
Publically available audio and video RTP tools
Runs on most Unix systems & Windows
Publically available audio and video RTP tools
Runs on most Unix systems & Windows
Commercial RTP client for Solaris/SPARC
* These products were not tested with JMF for this release.
The RTPSessionManager is an interface. An implementation of this interface is provided in in com.sun.media.rtp.RTPSessionMgr. You can instantiate this class to access the functionality of the RTPSessionManager API.
JMF Controls for RTP Player
Users have control over the buffer maintained by the rtp receiver. The buffer has two parameters that can be controlled:
The Length is the length of the buffer. When the data in the buffer exceeds this length, the data at the head of the queue (earlier data) is dropped. The Minimum threshold is the jitter buffer before which no data will be forwarded on the rtp datasource. As long as data in the buffer is less than the minimum threshold, data will not be forwarded. The buffer length and minimum threshold are specified in milliseconds.
For RTP, the session manager maintains the following buffer defaults:
default 250ms
max1000ms
default 125ms
max500ms
default 135ms (2 frames worth of buffer assuming a 15fps stream)
max270ms (4 frames worth of buffer assuming a 15fps stream)
default 0ms
max0ms
For audio, these values translate to a specific number of audio samples or frames based on the format of the incoming audio stream. For video,the frame rate of the incoming stream is not known by the receiver. In this case, the receiver defaults to a 15fps value when calculating the number of complete video frames that correspond to the buffer and threshold values. For example, if you want the buffer to hold 3 frames of video, you would set the buffer length to 200ms--three frames of a 15fps stream--regardless of the actual stream rate.
In JMStudio, Buffer Control is an option when you select the "Open RTP Session" menu item. When you click on the "Buffer Control for RTP Session" tab, you will see the buffer control component. This control component has text fields that display the current buffer and threshold size on the LHS. You can update the buffer and threshold values by selecting options from the "Update" checkbox group. The 3 choices are "DEFAULT, MAX, User Defined". Selecting User defined enables the text field on the RHS, allowing you to enter specific buffer and threshold values.
Note: You can use the control component of the BufferControl in you own applications. You can get the BufferControl from the session manager by calling getControls("javax.media.control.BufferContr") on the RTPSessionMgr. You retrieve the component by calling BufferControl.getControlComponent().
Some of the JMF plugins used in packetizing the audio and video into smaller RTP packets export a PacketSizeControl. PacketSizeControl is defined in javax.media.control.PacketSizeControl. This control is used to alter the default packet sizes (packetization interval)of each outgoing RTP packet on the network. The packetization interval determines the minimum end-to-end delay; longer packets introduce less header overhead but higher delay and make packet loss more noticeable.
The default packetization interval for most of JMF's RTP depacketizers are 60ms for audio and about 1000 bytes for video.