Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transmitting files sequentially over RTP

Status
Not open for further replies.

azrael808

Programmer
Jan 21, 2004
6
GB
Hello,

I have been using a modified version of the AVTransmit2.java program from the sun website to transmit mp2 files across a LAN. I have changed the constructor to accept an array of MediaLocator objects that should be transmitted sequentially. My current method is to prepare two processors, one for the first track, the other for the second. The transmitter is created and uses the first processor as a DataSource. The program then listens for an EndofMediaEvent, and then changes the DataSource from processor1 to processor2. However, the program does not begin transmitting the new file.
I have posted below the code that deals with the EndOfMediaEvent. It swaps the processor for the DataSource outputSource from mediaPrep[0] (the first file) to mediaPrep[1] (the second file):

mediaPrep[1].addControllerListener(sl);
mediaPrep[1].start();
outputSource = mediaPrep[1].getDataOutput();
mediaPrep[0].stop();
mediaPrep[0].close();
mediaPrep[0] = null;


The mediaPrep[0] is then used to provide a DataSource for the 3rd file, if necessary.
Does anybody know whether I am heading in the right direction with this? I thought that it would be fairly simple to change the underlying DataSource that the RTP stream is transmitting.

Thank you in advance.

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top