Package javax.media.control

Examples of javax.media.control.FrameRateControl


//        final int currentFrame = fpc.mapTimeToFrame( mp.getMediaTime() );
//        if( currentFrame != FramePositioningControl.FRAME_UNKNOWN ) {
//          System.err.println( "currentFrame = "+currentFrame+" so delta is " + (frameIdx - currentFrame) );
//          skip( frameIdx - currentFrame );
//        } else { // ok, try the cheesy way
          final FrameRateControl frc = getFrameRateCtrl();
          if( frc != null ) {
            float fps;
            fps = frc.getPreferredFrameRate();
            if( fps <= 0f ) {
              fps = frc.getFrameRate() / mp.getRate();
            }
            if( fps > 0f ) {  // sucky fobs returns 0f instead of -1f!!!
              System.err.println( "frameIdx " + frameIdx + "; fps = "+fps+ "; frameIdx / fps = "+(frameIdx / fps));
              mp.setMediaTime( new Time( frameIdx / fps ));
            }
View Full Code Here

TOP

Related Classes of javax.media.control.FrameRateControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.