Search in sources :

Example 1 with FFInfo

use of org.fagu.fmv.ffmpeg.soft.FFInfo in project fmv by f-agu.

the class AutoRotate method isAutoRotateObsolete.

/**
 * @param soft
 * @return
 */
public static boolean isAutoRotateObsolete(Soft soft) {
    SoftFound softFound = soft.getFirstFound();
    FFInfo ffInfo = (FFInfo) softFound.getSoftInfo();
    // version
    Version version = ffInfo.getVersion();
    if (version != null) {
        return version.isUpperOrEqualsThan(new Version(2, 7));
    }
    // build number
    Integer builtVersion = ffInfo.getBuiltVersion();
    if (builtVersion != null) {
        return builtVersion.intValue() > 73010;
    }
    // build date
    Date builtDate = ffInfo.getBuiltDate();
    if (builtDate != null) {
        @SuppressWarnings("deprecation") Date minDate = new Date(2015 - 1900, 6 - 1, 12);
        return minDate.before(builtDate);
    }
    return false;
}
Also used : Version(org.fagu.version.Version) SoftFound(org.fagu.fmv.soft.find.SoftFound) FFInfo(org.fagu.fmv.ffmpeg.soft.FFInfo) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 FFInfo (org.fagu.fmv.ffmpeg.soft.FFInfo)1 SoftFound (org.fagu.fmv.soft.find.SoftFound)1 Version (org.fagu.version.Version)1