examples.rtp
Class CaptureAndPlay

java.lang.Object
  |
  +--examples.rtp.CaptureAndPlay

public class CaptureAndPlay
extends java.lang.Object

This class opens two RTP steams - one receives audio data from the url "rtp://:12346/audio" and plays it to the local output device, and the other sends audio data (captured from the local audio capture device) to the url "rtp://:12344/audio".

This class should generally be started before running any of the other classes in this package, since the other classes either send data to the url "rtp://:12346/audio" or receive data from the url "rtp://:12346/audio", or do both.

You can also use JMFStudio to send to/receive from these urls.


Constructor Summary
CaptureAndPlay(java.lang.String encoding, double sampleRate, int sampleSizeInBite, int channels, java.lang.String outgoingUrl, java.lang.String incomingUrl)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptureAndPlay

public CaptureAndPlay(java.lang.String encoding,
                      double sampleRate,
                      int sampleSizeInBite,
                      int channels,
                      java.lang.String outgoingUrl,
                      java.lang.String incomingUrl)
               throws java.io.IOException,
                      javax.media.NoDataSinkException,
                      javax.media.NoDataSourceException,
                      javax.media.NoProcessorException,
                      javax.media.NoPlayerException,
                      javax.media.CannotRealizeException
Method Detail

main

public static void main(java.lang.String[] args)

start

public void start()
           throws java.io.IOException

stop

public void stop()
          throws java.io.IOException