|
|
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 |
|
-
Download and compile the source files.
-
Run AVTransmit3 and specifies the RTP session address to send to.
-
Run AVReceive3 and specifies the RTP session addresses to receive from.
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
|