package speex

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. id : string;
  2. version : string;
  3. version_id : int;
  4. header_size : int;
  5. rate : int;
  6. mode : mode;
  7. mode_bitstream_version : int;
  8. nb_channels : int;
  9. bitrate : int;
  10. frame_size : int;
  11. vbr : bool;
  12. frames_per_packet : int;
  13. extra_headers : int;
}

Type for speex header.

val header_string_length : int
val header_version_length : int
val init : ?frames_per_packet:int -> ?mode:mode -> ?vbr:bool -> nb_channels:int -> rate:int -> unit -> t

Initiate a new speex header.

val encode_header_packetout : t -> (string * string) list -> Ogg.Stream.packet * Ogg.Stream.packet

encode_header_packetout header metadata: output ogg packets containing the header. * First packet contains speex audio codec settings, second the metadata.

val encode_header : t -> (string * string) list -> Ogg.Stream.stream -> unit

Output ogg packets containing the header and put them into the given stream.

val header_of_packet : Ogg.Stream.packet -> t

Decode the speex header contained in the given packet. * * Raises Invalid_argument if the packet does not contain speex audio codec data.

val comments_of_packet : Ogg.Stream.packet -> string * (string * string) list

Decode the metadata contained in the given packet. * * Raises Invalid_argument if the packet does not contain speex metadata.

OCaml

Innovation. Community. Security.