Module Avutil.Sample_format

Audio sample formats.

type t = [
  1. | `None
  2. | `U8
  3. | `S16
  4. | `S32
  5. | `Flt
  6. | `Dbl
  7. | `U8p
  8. | `S16p
  9. | `S32p
  10. | `Fltp
  11. | `Dblp
  12. | `S64
  13. | `S64p
]

The sample formats, as a variant generated from FFmpeg's headers at build time. `None is FFmpeg's "no format".

val get_name : t -> string option

FFmpeg's name of the format, such as "s16" or "fltp". None for `None and for a format FFmpeg does not name.

val find : string -> t

find name is the format FFmpeg names name.

  • raises Not_found

    when FFmpeg knows no format of that name.

val get_id : t -> int

The integer value of the format in FFmpeg's C enumeration.

val find_id : int -> t

find_id n is the format whose value in FFmpeg's C enumeration is n: the inverse of get_id.

  • raises Not_found

    when no constructor has that value.