Problem How to transmit media over the network using JMF and JMF-RTP. You may
want to transmit media from one computer to another. Or you may want to
broadcast a live feed to your company's intranet. The source of the
media can be a file, live capture using a capture device or any
other source supported by JMF.
Solution Two simple wrapper classes, VideoTransmit and AVTransmit,
are provided that can be programmed
to take media input from a source of your choice and transmit the media
to a destination computer or network in a format acceptable for RTP
The JMF API is used to read the source and convert it to packetized
RTP data. The RTP API implementation included in JMF will then transmit
the media using the RTP protocol.
The two sample classes are very similar in structure. But each
include a little twist of its own to provide a broader perspective
for the readers.
The VideoTransmit program transmits only video regardless of the
input source. It always transcodes the media to JPEG/RTP for transmission.
It uses the RTP DataSink API to transmit the media. AVTransmit
will transmit all available media tracks from the input. It will
attempt to use the default supported RTP format for each track. It
then uses the RTP SessionManager API for the transmission. For JMF 2.1.1
users, there is also an alternative sample that make use of the new