JMF on linux issues
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Philip_Craven
Posted On:   Sunday, November 4, 2001 03:56 PM

I am trying to develop a JMF application. I have two items, a transmitter and a reciever. The transmitter seems to work in both environments. The reciever on the other hand works fine in windows, but fails under Linux with the following error message: Cannot create the RTP Session: Can't open local dataport 20000. I would greatly appreciate any ideas. The reciever source is: import java.net.URL; import java.net.MalformedURLException; import java.io.IOException; import java.util.Properties; import javax.media.*; import javax.media.control.*; public class reciever implements ControllerLis   More>>

I am trying to develop a JMF application. I have two items, a transmitter and a reciever. The transmitter seems to work in both environments. The reciever on the other hand works fine in windows, but fails under Linux with the following error message:


Cannot create the RTP Session: Can't open local dataport 20000.


I would greatly appreciate any ideas.


The reciever source is:


			
import java.net.URL;

import java.net.MalformedURLException;

import java.io.IOException;

import java.util.Properties;

import javax.media.*;

import javax.media.control.*;


public class reciever implements
ControllerListener{


static Player player = null;


public synchronized void
controllerUpdate(ControllerEvent ce)
}


public void recieve(String url, String port){

Player player = null;

MediaLocator mrl = new MediaLocator("rtp://" + url + ":" + port + "/audio/1");

if(mrl == null){

System.err.println("Can't build url for RTP");

return;

}

try{

//player = Manager.createPlayer(mrl);

System.out.println("before realize");

player = Manager.createRealizedPlayer(mrl);

System.out.println("after realize");

}

catch(Exception e){

System.err.println("Error: " + e.toString());

return;

}

if(player != null){

if(reciever.player==null){

reciever.player = player;

player.addControllerListener(this);

player.prefetch();

player.start();

}

}

}


public reciever() {

}

}

   <<Less
About | Sitemap | Contact