Menu

Cannot find a Player

user
2005-03-22
2013-05-09
  • Nobody/Anonymous

    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();
            }
        }

     
    • Nobody/Anonymous

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.