I have downloaded the code of - Experiments in Streaming Content in Java ME by Vikram Goyal
But when trying to run the application, with emulator, after running the Darwin Stream Server I get the following error -
Midlet->startApp
StreamingDataSource->StreamingDataSource
StreamingDataSource->getContentType
StreamingDataSource->getLocator (locator = rtsp://127.0.0.1/sample_100kbit.avi)
javax.microedition.media.MediaException: Player cannot be created for video/avi
at javax.microedition.media.Manager.createPlayer(), bci=135
- com.iprs.test.Midlet.startApp(Midlet.java:14)
at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
at com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
at com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=261
at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
at com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=144
at com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
Midlet->destroyApp
This is the StartApp method -
public void startApp() {
try {
System.out.println("Midlet->startApp");
// create Player instance, realize it and then try to start it
Player player = Manager.createPlayer(new StreamingDataSource("rtsp://127.0.0.1/sample_100kbit.avi")); //(new StreamingDataSource("rtsp://localhost:554/tuner1.wav")); //sample.mp3")); //sample_100kbit.mp4"));
player.realize();
player.start();
} catch(Exception e) {
e.printStackTrace();
}
}
I have tried with some media types but i got the error. How it can be solved? Thanks, Eyal.