Sorry to bother everyone with this, but I am clueless as to why this simple player doesn't work. Below is the source code, the file is there, the movie works perfectly in JMStudio (with plugin) and I can't seem to understand why it doesn't work.
public SampleRTSPPlayer() {
//create a new player and stream RTSP
try{
File f = new File("surf.mp4");
System.out.println(f.toURL().toString());
MediaLocator ml = new MediaLocator(f.toURL());
com.omnividea.media.protocol.file.DataSource ds = new com.omnividea.media.protocol.file.DataSource(ml);
System.out.println(ds.getContentType() + " " + ds.getLocator().getProtocol() + " " + ds.getDuration().getSeconds());
player = Manager.createPlayer(ds);
PlayerWindow pl= new PlayerWindow(player);
Typical -- spent a long time trying to figure out why it didn't work, then realized it had to do with the OpenError Message. Removed the com.omnividea..DataSource and it works now. However, the com.omnividea..DataSource with latest fob-0.3pre2 is still an issue though.
Please disregard my post.
With kind regards,
Al
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
Sorry to bother everyone with this, but I am clueless as to why this simple player doesn't work. Below is the source code, the file is there, the movie works perfectly in JMStudio (with plugin) and I can't seem to understand why it doesn't work.
public SampleRTSPPlayer() {
//create a new player and stream RTSP
try{
File f = new File("surf.mp4");
System.out.println(f.toURL().toString());
MediaLocator ml = new MediaLocator(f.toURL());
com.omnividea.media.protocol.file.DataSource ds = new com.omnividea.media.protocol.file.DataSource(ml);
System.out.println(ds.getContentType() + " " + ds.getLocator().getProtocol() + " " + ds.getDuration().getSeconds());
player = Manager.createPlayer(ds);
PlayerWindow pl= new PlayerWindow(player);
}catch (Exception e){
System.out.println("Exception caught: " + e.getMessage());
e.printStackTrace();
}
}
Typical -- spent a long time trying to figure out why it didn't work, then realized it had to do with the OpenError Message. Removed the com.omnividea..DataSource and it works now. However, the com.omnividea..DataSource with latest fob-0.3pre2 is still an issue though.
Please disregard my post.
With kind regards,
Al