Java Second Get getFramesFromSeconds(Double seconds)

Here you can find the source of getFramesFromSeconds(Double seconds)

Description

Converts seconds to number of video frames.

License

Open Source License

Parameter

Parameter Description
seconds a parameter

Declaration

public static int getFramesFromSeconds(Double seconds) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final int FRAMES_PER_SECOND = Integer.parseInt(System.getProperty("olibbp.framerate", "30"));

    /**//from  w w  w. j av  a  2  s. com
     * Converts seconds to number of video frames.
     * @param seconds
     * @return 
     */
    public static int getFramesFromSeconds(Double seconds) {
        return (int) Math.floor(seconds * FRAMES_PER_SECOND);
    }
}

Related

  1. getCurrentSecondString()
  2. getCurrentSecondZeroFillString()
  3. getCurrentTimeInSeconds()
  4. getCurrentTimeSeconds()
  5. getDayFromSeconds(long seconds)
  6. getMSTimeInSeconds(final String timeStr)
  7. getMultiplierForCmPerSecondsFromSpeedUnits(String speedUnits)
  8. getNbSecondsFromHour(int hour)
  9. getNiceStringForSeconds(String timeInSeconds)