Package com.github.kokorin.jaffree.nut
Class Util
java.lang.Object
com.github.kokorin.jaffree.nut.Util
Different utility methods used in Nut format muxer and demuxer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareUnsigned(long x, long y) TODO replace withLong.compareUnsigned(long, long)static longconvertTimestamp(long pts, Rational timeBaseFrom, Rational timeBaseTo) Converts passed in PTS from one timebase to another.
-
Method Details
-
compareUnsigned
public static int compareUnsigned(long x, long y) TODO replace withLong.compareUnsigned(long, long)Method is a copy of
Long.compareUnsigned(long, long), which is available only since 1.8Compares two
longvalues numerically treating the values as unsigned.- Parameters:
x- the firstlongto comparey- the secondlongto compare- Returns:
- the value
0ifx == y; a value less than0ifx < yas unsigned values; and a value greater than0ifx > yas unsigned values
-
convertTimestamp
Converts passed in PTS from one timebase to another.This method is equivalent to (ln*sn)/(d1*d2)
- Parameters:
pts- pts in timeBaseFromtimeBaseFrom- pts timebasetimeBaseTo- timebase to switch to- Returns:
- converted PTS
-