Struct Rational

Struct Documentation

struct Rational

Rational number representation (numerator/denominator). Used for time bases and frame rates.

The layout matches FFmpeg’s AVRational, but the type is defined here so that public headers do not depend on FFmpeg.

Public Functions

bool operator==(const Rational&) const = default

Compare numerators and denominators, so 1/2 != 2/4.

Public Members

int num

Numerator.

int den

Denominator.