JMF video while in Fullscreen Exclusive

I am trying to show a video (using JMF) in my window while in fullscreen exclusive mode. Its for a game. It works occasionally. What I've done is turned of the repetitive rendering (from the game loop), and just added the visual component to the window (it can do its own painting). Sometimes it works fine, other times you just hear the sound, and other times its just grey or black.
Does anybody have any idea how to get the current frame, and draw it so that I can keep the repetitive rendering (from the game loop) running.
Any other ideas are appreciated too.

Never written a fullscreen exclusive application. In fact, I've never even heard of such a thing.
http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html
"In full-screen exclusive applications, painting is usually done actively by the program itself"
Ah. So no, I don't think JMF would support that because it's not going to be actively rendering, only passively rendering in response to paint requests. It's AWT/Swing based, after all...
But, the fact that JMF doesn't support it does not mean JMF can't support it. JMF provides a custom Renderer interface which you could implement to actively render the stuff. It'll essentially give you a copy of the video frame in a Buffer object which you can then turn into an image using the BufferToImage class and then render that however you'd render an image for a full screen exclusive application...

Similar Messages

  • JMF In Fullscreen Exclusive Mode

    Hello,
    I was wondering if anyone could let me know if JMF is supported inside a Fullscreen Exclusive Application? I seem to have no problem setting up JMF Video output for a standard JFrame/Frame, but when setting a "fullscreenWindow" the Player turns black. I cannot seem to find any posts on whether this is supported or if there are bugs when in Fullscreen Exclusive Mode.
    Thanks
    -Michael Morris

    Never written a fullscreen exclusive application. In fact, I've never even heard of such a thing.
    http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html
    "In full-screen exclusive applications, painting is usually done actively by the program itself"
    Ah. So no, I don't think JMF would support that because it's not going to be actively rendering, only passively rendering in response to paint requests. It's AWT/Swing based, after all...
    But, the fact that JMF doesn't support it does not mean JMF can't support it. JMF provides a custom Renderer interface which you could implement to actively render the stuff. It'll essentially give you a copy of the video frame in a Buffer object which you can then turn into an image using the BufferToImage class and then render that however you'd render an image for a full screen exclusive application...

  • Event Handling in Fullscreen Exclusive Mode???????

    WIndows XP SP2
    ATI 8500 All-In-Wonder
    JDK 1.6
    800x600 32dpi 200 refresh
    1-6 buffer strategy.
    the graphic rendering thread DOESN'T sleep.
    Here's my problem. I have a bad trade off. In fullscreen exclusive mode my animation runs <30 fps and jerks when rendering. i.e. stop and go movement (not flickering/jittering just hesitant motion) when the animation is running. I solved this problem by raising the thread priority of the rendering (7-8). . . this resulted in latency/no activity for my input events both key and mouse. For instance closing the program alt-f4 will arbitrarily fail or be successful when the thread priority is raised above 6.
    How does one accomplish a >30 fps and Instant event handling simultaneously in Fullscreen Exclusive Mode?
    Is there a way to raise thread priority for event handling?
    Ultimately I want to be able to perform my animations and handle key and mouse input events without having a visible 'hiccups' on the screen.
    Much Appreciated!

    If I remember correctly the processor is a 1.4(or)6ghz AMD Duron
    Total = 1048048kb
    Available = 106084kb
    Sys Cache = 211788kb
    PF Usage = 1.01 GB
    I solved some of the problem after posting this thread. . . .
    I inserted a thread.sleep(1) and my alt-f4 operation worked unhindered with the elevated thread priority.
    I haven't tested it with mouse event or any other key event but at the moment it looks I may have solved the problem.
    If so, my next question will be is there a way to reduce the amount of cpu power needed to run the program.
    I'm afraid that the other classes that I'm adding will actually become even more process consuming than the actually rendering thread.
    public class RenderScreen extends Thread
      // Screen Rendering status code
      protected final static int RUNNING = 0,
                                 PAUSED = -1;
      // frames per second and process time counters
      protected long now = 0, fps = 0, fpsCount = 0, cycTime = 0;
      // thread status
      protected int status = 0;
      protected Screen screen;
      public void setStatus(int i){ status = i; };
      public void setTarget(Screen screen){ this.screen=screen; };
      public void run()
        setName("Screen Render");
        screen.createBufferStrategy(1);
        screen.strategy = screen.getBufferStrategy();
        for(;;)
          if(status == RUNNING)
            now = System.currentTimeMillis();
            while(System.currentTimeMillis() <= now+1000)
              // call system processes
              // fps increment / repaint interface
              fpsCount++;
              screen.renderView();
              try { Thread.sleep(1);}catch(InterruptedException ie){ ie.printStackTrace(); }
            fps = fpsCount;
            cycTime = System.currentTimeMillis() - (now + 1000);
            fpsCount=0;
      public RenderScreen(){};
      public RenderScreen(Screen screen){ this.screen=screen; };
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class Screen extends Window
      BufferedImage image = new BufferedImage(800,600,BufferedImage.TYPE_INT_RGB);
      Graphics2D gdd = image.createGraphics();
      MediaTracker tracker = new MediaTracker(this);
      Image bground = getToolkit().getImage("MajorityRule.jpg"),
            bawl = getToolkit().getImage("bawl.gif");
      RenderScreen rScreen = new RenderScreen(this);
      BufferStrategy strategy;
      Graphics g;
      Rectangle rect = new Rectangle(400,0,150,150);
      //Game game = new Game();
      public void renderView()
        g = strategy.getDrawGraphics();
        //--------- Game Procedures [start]
        gdd.drawImage(bground,0,0,this);
        gdd.drawString("fps: ["+rScreen.fps+"] Cycle Time: ["+rScreen.cycTime+"]",0,10);
        //--------- Game Procedures [end]
        //---------test
        gdd.drawImage(bawl,rect.x,rect.y,rect.width,rect.height,this);
        rect.translate(0,1);
        g.drawImage(image,0,0,this);
        //g.dispose();
        strategy.show();
      public Screen(JFrame frame)
        super(frame);
        try
          tracker.addImage(bground,0);
          tracker.addImage(bawl,1);
          tracker.waitForAll();
        catch(InterruptedException ie){ ie.printStackTrace(); }
        setBackground(Color.black);
        setForeground(Color.white);
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MajorityRule extends JFrame
      // Graphic System Handlers
      GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
      GraphicsDevice gd = ge.getDefaultScreenDevice();
      GraphicsConfiguration gc = gd.getDefaultConfiguration();
      Screen screen = new Screen(this);
      Paper paper = new Paper();
      public void windowed()
        paper.setSize(getWidth(),getHeight());
        getContentPane().add(paper);
        setResizable(false);
        setVisible(true);
      public void fullscreen()
        DisplayMode dMode = new DisplayMode(800,600,32,200);
        screen.setBounds(0,0,800,600);
        if (gd.isFullScreenSupported()) gd.setFullScreenWindow(screen);
        if (gd.isDisplayChangeSupported()){ gd.setDisplayMode(dMode); };
        screen.setIgnoreRepaint(true);
        screen.setVisible(true);
        screen.rScreen.setPriority(Thread.MAX_PRIORITY);
        screen.rScreen.start();
        screen.requestFocus();
      public MajorityRule(String args[])
        setTitle("Majority Rule [Testing Block]");
        setBounds(0,0,410,360);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        getContentPane().setLayout(null);
        if (args.length > 0 && args[0].equals("-window")) windowed();
        else fullscreen();
      public static void main(String args[])
        new MajorityRule(args);
    };

  • Swing Components and Fullscreen Exclusive

    Hi, I am trying to write a program that can switch between full screen and windowed mode seamlessly, while still being able to use standard swing components. I have never worked with the full screen exclusive mode before and am having trouble getting the components to repaint properly.
    The following code works fine in the windowed and undecorated modes, however when I switch to fullscreen exclusive mode all components disappear and only repaint upon mouseover or other interaction. Calls to repaint do not make any difference.
    import java.awt.Dimension;
    import java.awt.DisplayMode;
    import java.awt.FlowLayout;
    import java.awt.GraphicsDevice;
    import java.awt.GraphicsEnvironment;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.WindowConstants;
    public class FullscreenTests {
         private static boolean hwlast = false;
         private static GraphicsDevice dev = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
         public static void main(String[] args) {
              final JFrame fMain = new JFrame("Title");
              fMain.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              fMain.getRootPane().setLayout(new FlowLayout());
              JButton win = new JButton("Windowed");
              win.addActionListener(new ActionListener () {
                   public void actionPerformed (ActionEvent e) {
                        setWindowed(fMain);
              fMain.getRootPane().add(win);
              JButton ful = new JButton("Fullscreen");
              ful.addActionListener(new ActionListener () {
                   public void actionPerformed (ActionEvent e) {
                        setFullscreen(fMain);
              fMain.getRootPane().add(ful);
              JButton hw = new JButton("HW Fullscreen");
              hw.addActionListener(new ActionListener () {
                   public void actionPerformed (ActionEvent e) {
                        setHWFullscreen(fMain);
              fMain.getRootPane().add(hw);
              setWindowed(fMain);
         public static void setWindowed(JFrame f) {
              if (hwlast == true) {
                   dev.setFullScreenWindow(null);
                   hwlast = false;
              f.dispose();
              f.setIgnoreRepaint(false);
              f.setUndecorated(false);
              Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
              f.setSize(new Dimension(808,634));
              f.setMinimumSize(new Dimension(808,634));
              f.setLocation((d.width-f.getWidth())/2, (d.height-f.getHeight())/2);
              f.setVisible(true);
         public static void setHWFullscreen(JFrame f) {
              hwlast = true;
              f.dispose();
              f.setUndecorated(true);
              f.setIgnoreRepaint(true);
              f.setVisible(true);
              dev.setFullScreenWindow(f);
              dev.setDisplayMode(new DisplayMode(800, 600, 32, DisplayMode.REFRESH_RATE_UNKNOWN));
         public static void setFullscreen(JFrame f) {
              if (hwlast == true) {
                   dev.setFullScreenWindow(null);
                   hwlast = false;
              f.dispose();
              f.setIgnoreRepaint(false);
              f.setUndecorated(true);
              f.setSize(Toolkit.getDefaultToolkit().getScreenSize());
              f.setLocation(0,0);
              f.setVisible(true);
    }On the same note, if there are better ways of doing this I would be glad to know. This is just a quick test so I haven't done any checks etc when switching to fullscreen exclusive.

       public static void setHWFullscreen (JFrame f) {
          hwlast = true;
          f.dispose ();
          f.setUndecorated (true);
          f.setIgnoreRepaint (true);
          // add this
          Graphics g = f.getGraphics ();
          f.paintAll (g);
          f.setVisible (true);
          dev.setFullScreenWindow (f);
          dev.setDisplayMode (new DisplayMode (800, 600, 32, DisplayMode.REFRESH_RATE_UNKNOWN));
       }db

  • AWT Popup Menu in Fullscreen Exclusive + JOGL

    Our application runs in Fullscreen Exclusive mode and uses JOGL. We want the user to be able to access right-click Popup menus like in other applications. (Obviously, this isn't a game; but I figured I'd post here because game developers are the only ones likely to be familiar with Fullscreen Exclusive.)
    On Windows, I was pleasantly suprised to find that popupMenu.show() just works when I'm in Fullscreen Exclusive. The menu appears, works correctly, etc.
    On Mac OS X 10.3+, the menu does not appear. I've developed a clumsy workaround (basically, go out of fullscreen exclusive to show the menu, and then go back in when mouse events start coming again). Frankly, the way it works on a Mac is what I expected on the PC. I wouldn't expect a Popup Menu (being another window) to be able to appear over a fullscreen exclusive window.
    My question is this: Is the Windows behavior a bug? Is it video driver dependent? (It seems to work OK with all the machines we've tested on... ATI, NVIDIA, Intel) Should I be doing my Mac hack on the Windows platform to avoid some unforseen problem?
    Also, any idea what Linux or other platforms would do?

    I am not sure why that works in one OS and not the others.
    All I can say is that if it was a game, we would draw the popup menu ourself within the frame in our rendering loop, that is garunteed to work in all OS's. But your probably using AWT or SWING components. Sounds like it may be a compadibility issue, I would check the bug lists to see if that is a known issue that is being worked on.

  • Flash Video Jerky / Choppy Fullscreen Chrome

    I've been having this problem for a couple of years using Flash video across ALL websites.  When I play a full screen flash video, the video gets choppy or jerky.  The audio continues perfectly.  I'm a pretty tech and computer savvy person, so I have tried a lot of the fixes I could think of.  I ended up finding one SOLUTION to the jerky video that works EVERY SINGLE TIME.  If I right-click the full-screen video, and allow the settings menu to remain on top of the video while it plays, I NEVER have issues with jerky or choppy video.  If I cancel the settings menu, the jerkiness returns immediately and remains throughout the video duration.  To help diagnose this, here's my specs and stuff I have tried.
    Dell 1764 running Win 7 x64 on a Core i5 processor, 4Gig RAM.
    all builds of chrome in the last couple of years, w/ and w/out the included flash (i.e. disabling in about:plugins).
    24mbps cable connection, with no buffering issues noted
    Cleared cookies, history, temp files, ran anti-virus and spyware.
    Have always been up-to-date w/ windows updates.
    Fullscreen videos that do work flawlessly:
    Netflix using the Silverlight plugin.  Youtube HTML5 videos.  Any DVD's or downloaded videos play perfectly in VLC and MPC.
    So, in summation:  Flash vidoes in fullscreen are Jerky/choppy using Chrome browser.  When I right-click and allow that menu to remain on top, jerkiness goes away.  Cancel the right-click menu, problems return.

    No worries.  I appreciate the feedback, and just want to make sure I'm understanding the data that I'm collecting clearly. 
    We're aware that there are random short-lived problems that happen during transitions in and out of full-screen and scrubbing.  We have a number of bugs open on the engineering team around it.  In general, these are usually complex timing-related problem with a bunch of interrelated, moving parts (codec, network latency, buffering, stream quality, hardware, browser, etc).  They're really hard to debug.  It continues to be a big area of focus for both the dev and quality engineering teams, and something we're investing a lot of time and energy into improving. 
    Also, it's worth pointing out that we test a pretty large matrix of graphics cards, and we partner directly with many of the GPU vendors -- but there's a ton of fragmentation and we can't check every single card that's out there in the world.  If we see a bunch of bugs coming in about a particular configuration, we do our best to track the card down and take a look. 
    If you find instances where you're able to reproduce playback problems consistently, please file a bug.  Include a direct link to the video/videos that you can consistently reproduce the video problems with, and include the output of dxdiag (or the graphics card info from the System Information tool on Mac).  OS and Browser versions are also very useful.
    I'm not personally involved in the work around PPAPI for Flash Player, but we have a whole team working on building a great experience for Chrome and Pepper.  Disabling PepperFlash where it's enabled will generally cause Chrome to fall back to the stanadard NPAPI-based Flash Player instead.  Keep an eye out for announcements about preview releases for Flash Player on PPAPI -- I'm sure the team will appreciate your feedback once they become available.  

  • HT4623 lost all my pictures and videos while updating ios7.1.1. i dont have backup to restore. how can i recover the data back?

    lost all my pictures and videos while updating ios7.1.1.
    i dont have backup to restore. how can i recover the data back?

    You should never update without making sure that you have saved everything on your computer first.
    You should import all pics and vids before attempting any update.
    If you have failed to save the data, then it is gone

  • I want to buy a wireless headset for my iPad that will allow me to lissen to a video while blocking out any other sounds in the room yet is comfortable. I do not have any experience with headsets so I do not know what to expect.

    I want to buy a wireless Bluetooth headset for my iPad that will allow me to listen to a video while blocking out any other sound in the room. I tried a philips 6000 earplugs but it was not good at blocking out sound. Can anyone give me some suggestions. I see lots advertised but do not know which one to chose.

    Take a look at HeadRoom (headphone.com). It's a fabulous resource for all types of headphones, with great guides and useful reviews.
    http://www.headphone.com/

  • I can't get my player to play videos while other apps are open IPAD 4gen

    I can't get my player to play videos while other apps are open IPAD 4gen
    Whenever, I have pages open or any other app I press the home button twice, and then I swipe to the right and obtain the menu that allows me to alter brightness or sound. At this point I press play and nothing works. However, once I go back to my youtube page, and press the play button then it works. If anyone could help me that would be greatly appreciated. Thank you so much.

    just click the serial number in itunes ... geeze... just kidding
    you might be able to find it on the mac...
    in finder do your username under places then library then application support then MobileSync then Backups
    the shortest folder name should be the UDID
    of course that assumes it ever made a backup...
    if it made more than one there will be some -date-blah on the end...

  • Popups in fullscreen exclusive?

    My game is running in fullscreen exclusive mode but I need to open the occasional dialog box which new shows in front of the fullscreen main frame. Is there any way of making popups such as Dialogs or other frames appear in fullscreen exclusive mode?

    Since when did any game you ever played written in even the most powerful languages and 2d/3d api's ever display a popup during the programs run in fullscreen exclusive mode? (Error popup dialogs that end the game dont count. Unless you 'wanted' your app to end after a popup of course... o_O)
    Now, as for a more efficient/robust/intuitive/cooler etc way to display important information to the user, perhaps your game (I'm assuming its a game due to where this is posted) should draw its own frame lookalike that could function just like a popup, only it resided in the game, and had its own look and feel. ( a look that should undoubtly be way more apealing to your audience than a standard dialog...)

  • Java 3D and fullscreen exclusive mode

    Hello all. I have the following problem: if I try to set fullscreen exclusive mode by calling
    device.setFullScreenWindow(window);
    then Java renders nothing. If I remove this line of code, everything works perfectly. Any ideas?
    Thanks in advance!

    you can't do that like that! it's a bit more conplicated. if you haven't,take a look at that:
    http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html

  • How can I continue listening to a YouTube video while using another app?

    How can I continue listening to a YouTube video while using another app?

    How can I continue listening to a YouTube video while using another app?

  • When i try to watch a video in youtube fullscreen the video gets slow and its cuts off. it happens only in firefox Help me please.

    Hello
    since this morning when i try to watch a video in youtube fullscreen the video gets slow and its cuts off. it happens only in firefox Help me please.if i watch the video in you tube normal size its correct the problem is just in fullscreen mode.

    You can check for problems caused by recent Flash updates and try these:
    *disable protected mode in Flash 11.3 and later
    *disable hardware acceleration in the Flash plugin
    *http://kb.mozillazine.org/Flash#Flash_Player_11.3_Protected_Mode_-_Windows

  • Flash Player freezes on 2nd monitor while playing fullscreen game on 1st one

    Flash Player freezes (shows something like slideshow with frame rate near 1-2 per sec, everything is ok with sound) on 2nd monitor while playing fullscreen game on 1st one.
    Windows 8, flash player 12, chrome.
    Tried to use other versions of flashplaers, other browsers - didnt help me.
    SOLVED: my computer for some reason didnt want to download updates. that was the reason of this problem.
    Thanks in advance.
    Philip

    Ok, Have just finished re-starting comp and have installed 10.3 & much to my suprise the games on Kongregat and Facebook are working. Have also, just to be safe checked the Firefox plug-in to make sure it was running the correct plug-in
    Shockwave Flash
    Shockwave Flash 10.3 r183
    I imagine this is it...I would have thought it should've been adobe flash but???  I will proccede to put it through the normal paces and pray it doesn't  die on me   will update as needed on this page.

  • Capture video while playing audio in WP8 or WP81

    Hi,
    Whenever I try to record a video using the CaptureSource it stops whatever audio was playing. How do I prevent recording video from stopping the audio being played?
    Thank you

    Hi Baracat,
    Could you explain any scenario why you want to capture the video while playing the audio? You want to record the audio played from your device to your video?
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Line Item dimension

    Hi friends! The auditor suggest us "flag the line item option in the dimensions with high cardinality, ie: document number, material number" In my cubes  have 0customer in dimension C toghether with other other characteristics, and 0material in dimen

  • How can I sync my iphone from itunes? It seems to be "blocked"

    Hi! I bought my iphone on march in NY & when I came back to argentina and configured it, I discovered it isn't able to sync music, videos or photos from itunes. I also have an Ipad but I've never had problems with it. I don't know what to do. When I

  • How do I change the number of picture columns in a folder

    how do I change the number of picture columns in a folder

  • Reporting the cost side of an AP transaction

    Hello, I was wondering if anyone could share their best practice for marrying AP, FI, and CO data.  For instance, I have data from a FI_AP_4 extractor, a FI_GL_4 extractor, and a CO_OM_WBS_6 extractor.  But there doesn't seem to be a common link betw

  • Nike+ -- Biking and Elliptical

    Will either the free Nike+ (iPod) app on the iPhone 4S, or the paid Nike+ GPS app on the iPhone 4S, allow me to track and upload exercise details while working out on a real versus stationary bicycle, and/or an elliptical machine that is NOT setup fo