Module rsmpeg::avutil

source ·
Expand description

Everything related to libavutil.

Structs§

Functions§

  • Add two rationals. Returns b+c.
  • Compare two rationals.
  • Convert a double precision floating point number to a rational. In case of infinity, the returned value is expressed as {1, 0} or {-1, 0} depending on the sign.
  • Divide one rational by another. Returns b/c.
  • Return the best rational so that a and b are multiple of it. If the resulting denominator is larger than max_den, return def.
  • Setup the data pointers and linesizes based on the specified image parameters and the provided array.
  • Invert a rational. @param q value @return 1 / q
  • Create an AVRational.
  • Multiply two rationals. Returns b*c.
  • Find which of the two rationals is closer to another rational.
  • Convert an AVRational to a double. @param a AVRational to convert @return a in floating-point form @see av_d2q()
  • Convert an AVRational to a IEEE 32-bit float expressed in fixed-point format.
  • Rescale a 64-bit integer by 2 rational numbers.
  • Rescale a 64-bit integer by 2 rational numbers with specified rounding.
  • Subtract one rational from another. Returns b-c.
  • Return a description of the AVERROR code errnum.
  • Return number of bytes per sample, return None when sample format is unknown.
  • Return a string describing the media_type enum, NULL if media_type is unknown.
  • Get the packed alternative form of the given sample format, return None on error.
  • Get the planar alternative form of the given sample format. return None on error.
  • Return a sample format corresponding to name, or None on error.
  • Return the name of given sample_fmt, or None if sample_fmt is not recognized.
  • name: the name of the field to setval: if the field is not of a string type, then the given string is parsed. SI postfixes and some named scalars are supported. If the field is of a numeric type, it has to be a numeric or named scalar. Behavior with more than one scalar and +- infix operators is undefined. If the field is of a flags type, it has to be a sequence of numeric scalars or named flags separated by ‘+’ or ‘-’. Prefixing a flag with ‘+’ causes it to be set without affecting the other flags; similarly, ‘-’ unsets a flag. If the field is of a dictionary type, it has to be a ‘:’ separated list of key=value parameters. Values containing ‘:’ special characters must be escaped.search_flags: flags passed to av_opt_find2. I.e. if `AV_OPT_SEARCH_CHILDREN`` is passed here, then the option may be set on a child of obj.
  • Note: if val.len() exceeds i32::MAX, this function returns [RsmpegError::TryFromIntError].
  • Safety
  • Safety
  • Safety
  • Safety
  • Safety
  • Safety
  • Safety
  • return AVRational: num / den;
  • Check if the sample format is planar.
  • Get a string containing a timestamp representation.
  • Get a string containing a timestamp time representation.

Type Aliases§