4 Replies Latest reply: Jul 12, 2011 10:09 AM by captfoss RSS

    question  linux jmf

    869908
      code:

      stream = ((NewReceiveStreamEvent) evt).getReceiveStream();
      tmp_ds = stream.getDataSource();

      Player player = Manager.createRealizedPlayer(tmp_ds); //here exception

      FrameGrabbingControl fgc = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
      javax.media.Buffer buffer = fgc.grabFrame();           
      BufferToImage bufferToImage=new BufferToImage((VideoFormat)buffer.getFormat());
      Image image=bufferToImage.createImage(buffer);

      error message:
      javax.media.NoPlayerException: Error instantiating class: com.sun.media.content.unknown.Handler : java.awt.HeadlessException:
      No X11 DISPLAY variable was set, but this program performed an operation which requires it.
      at javax.media.Manager.createPlayerForSource(Manager.java:1502)
      at javax.media.Manager.createPlayer(Manager.java:500)
      at javax.media.Manager.createRealizedPlayer(Manager.java:579)
      at MulServerProcess.createTransmitter(MulServerProcess.java:374)
      at MulServerProcess.update(MulServerProcess.java:286)
      at com.sun.media.rtp.RTPEventHandler.processEvent(RTPEventHandler.java:62)
      at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:96)
      at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:115)

      add "export DISPLAY=localhost:0" to file " /etc/profile" ,but nothing happen!
        • 1. Re: question  linux jmf
          captfoss
          I'm not sure JMF will run in headless mode.
          • 2. Re: question  linux jmf
            869908
            System.setProperty("java.awt.headless", "true"); add code

            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            System.out.println("Headless mode: " + ge.isHeadless()); the answer is true;

            error message:
            javax.media.NoPlayerException: Error instantiating class: com.sun.media.content.unknown.Handler : java.awt.HeadlessException
            at javax.media.Manager.createPlayerForSource(Manager.java:1502)
            at javax.media.Manager.createPlayer(Manager.java:500)
            at MulServerProcess.createTransmitter(MulServerProcess.java:393)
            at MulServerProcess.update(MulServerProcess.java:292)
            at com.sun.media.rtp.RTPEventHandler.processEvent(RTPEventHandler.java:62)
            at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:96)
            at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:115)


            Re: Headless exception in AIX using JMF2.1.1
            This question is the same as me. But it is still not solved.


            Is this a bug of JMF in Linux ?
            • 3. Re: question  linux jmf
              869908
              http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6488424

              BUG ?
              • 4. Re: question  linux jmf
                captfoss
                866905 wrote:
                BUG ?
                Seems that way.

                As I said, I don't believe JMF will run in headless mode ;-)