Module Theora.Encoder


module Encoder: sig .. end

type t 
val create : Theora.info -> (string * string) list -> t
Initialize a state handle for decoding.
val encode_header : t -> Ogg.Stream.t -> unit
Fills the given stream with the header packets.
val encode_page : t -> Ogg.Stream.t -> (unit -> Theora.yuv_buffer) -> Ogg.Page.t
Encode data until a page is filled.
val encode_buffer : t -> Ogg.Stream.t -> Theora.yuv_buffer -> unit
Encode a buffer.
val time_of_granulepos : t -> Int64.t -> Nativeint.t
Convert a granulepos to absolute time in seconds. The granulepos is interpreted in the context of a given theora_state handle, and gives the end time of a frame's presentation as used in Ogg mux ordering.
val frames_of_granulepos : t -> Int64.t -> Int64.t
Convert a granulepos to an absolute frame index, starting at 0. The granulepos is interpreted in the context of a given theora_state handle.
val eos : t -> Ogg.Stream.t -> unit
Set end of stream