JMF 2.0 CHANGE REQUESTS

Description

Maintenance revision for the JavaTM Media Framework Specification, version 2.0.

This document is dated 01-Dec-00.

Maintenance Lead

Marc Owerfeldt, Sun Microsystems, Inc.

Feedback

Feedback should be sent to jmf-comments@sun.com

Proposed RTP Changes

We are introducing a number of changes to the RTP interface in order to simplify the API and address issues that have been brought forward by our licensees.

The new RTPManager eliminates the need to distinguish between multicast, multi-unicast and unicast sessions. As a result a number of methods only intended for multi-peered sessions could be removed. Further changes include improved naming conventions, eliminating c-like return values from the init and start calls and hiding unnecessary complexity like cname and ssrc values from the API as they can be handled internally. Also, support for multi-homed systems (i.e. with more than one IP interface) has been added.

  1. javax.media.rtp.SessionManager
  2. This interface has been deprecated. Future implementations should extend from javax.media.rtp.RTPManager instead.

  3. javax.media.rtp.RTPManager
  4. This is the new proposed RTP interface. For detailed information please refer to the javadoc-generated API documentation.

    Please note that the former SessionManager interface has been replaced with the abstract class RTPManager. Implementations need to extend RTPManager rather than implement the SessionManager interface.
    A static method called newInstance() has been added. It takes no parameters and returns an RTPManager object.

    /**
     * Creates an RTPManager object from the underlying
     * implementation class.
     */
    public static RTPManager newInstance() {
        // ...
    }
    This method allows the creation of an RTPManager in a style similar to how Players and Processors are created. The algorithm tries to locate an implementation of the RTPManager and returns it as the result. It searches for each of the content registered prefixes a class of the form <content-prefix>.media.rtp.RTPSessionMgr.

    Sun ships an implementation of the RTPManager as com.sun.media.rtp.RTPSessionMgr. It is returned from the newInstance() call as default.

  5. javax.media.rtp.rtcp.SourceDescription
  6. A method called generateCNAME() has been added to the SourceDescription class since SourceDescription requires the specification of canonical names (CNAME).

    /** 
     * This function can be used to generate a CNAME using the scheme 
     * described in RFC 1889. This function is provided in order to facilitate
     * CNAME generation prior to actual stream creation. 
     * 
     * @return The generated CNAME. 
     */ 
    public static String generateCNAME() { 
        // ... 
    }
  7. javax.media.rtp.SessionAddress
  8. A new private variable has been added called ttl, the time-to-live parameter used in multicast sessions.

    Also, a new constructor has been added to SessionAddress which only requires dataAddress and dataPort parameters. By convention, the controlPort is computed as the dataPort + 1, the controlAddress is assumed to be identical to the dataAddress.

    /** 
     * Constructor to create an SessionAddress given the data internet 
     * address and data port. 
     * 
     * @param dataAddress The data address. 
     * 
     * @param dataPort The data port. If this value is passed as the 
     * constant ANY_PORT, the object 
     * will not represent a specific data port. 
     */ 
    public 
    SessionAddress( InetAddress dataAddress, int dataPort) { 
        //... 
    }
    A second constructor has been added to SessionAddress. Its parameters are dataAddress, dataPort and timeToLive, which is used for multicast sessions.
    /** 
     * Constructor to create an SessionAddress given the data internet 
     * address and data port. 
     * 
     * @param dataAddress The data address. 
     * 
     * @param dataPort The data port. If this value is passed as the 
     * constant ANY_PORT, the object 
     * will not represent a specific data port. 
     * 
     * @param timeToLive The time-to-live parameter for mutlicast sessions 
     */ 
    public 
    SessionAddress( InetAddress dataAddress, int dataPort, int timeToLive) { 
        //... 
    }
  9. javax.media.rtp.RTPSocket
  10. This class has been deprecated. Future implementations should extend from javax.media.rtp.RTPConnector instead.
     

  11. javax.media.rtp.RTPConnector
  12. A programmer may abstract the underlying transport mechanism for RTP control and data from the RTPManager. This is done via the RTPConnector object.  An implementation of the RTPConnector must be created and handed over to RTPManager during initialization.  The RTPManager will then use it to handle the sending and receiving of the data and control packets.This replaces the deprecated RTPSocket interface.

    Please note: the methods addTarget(), removeTarget() and removeTargets() from the RTPManager interface may not be used in conjunction with the RTPConnector.