Sun Java Solaris Communities My SDN Account Join SDN
 
Code sample

Transmitting and Receiving RTP over Custom Transport Layer

 

JMF Solutions

Transmitting and Receiving RTP over Custom Transport Layer [RTPConnector]

Problem
The default implementation of RTPManager uses UDP/IP for transport. This sample shows how you can override that and use RTP over your own custom transport mechanism.

Solution
An implementation of RTPConnector, RTPSocketAdapter is built to support a custom transport mechanism. For simplicity, UDP sockets are used in this example to illustrate the concepts. The AVTransmit and AVReceive samples were modified to make use of RTPSocketAdapter for sending and receiving of the RTP data.
 
Requirements
Platform: JDK 1.1.6 or later
JMF API: 2.1.1 or later.
Implementation: AJ, WPP, SPP *
Hardware: [optional] Capture card required for live capture.


* AJ = All Java, WPP = Windows Performance Pack, SPP = Solaris Performance Pack
Related Classes
How to run this sample
  1. Download and compile the source files.
  2. Run AVTransmit3 and specifies the RTP session address to send to.
  3. Run AVReceive3 and specifies the RTP session addresses to receive from.

  4. For example,

    java AVTransmit3 224.1.2.3 42050 file:/temp/foo.mov

    java AVReceive3 224.1.2.3/42050 224.1.2.3/42052

    The above example assumes that foo.mov contains 2 different tracks and so 2 sessions were created on the client side to receive both streams.
     
Source Code
See Also
  • JMF 2.0 Programmer's Guide