sig
exception Internal_error
exception Invalid_data
exception Unknown_error of int
exception Duplicate_frame
exception Not_enough_data
exception Done
exception Not_initialized
val version_string : string
val version_number : int * int * int
type colorspace =
CS_unspecified
| CS_ITU_REC_470M
| CS_ITU_REC_470BG
| CS_NSPACES
type pixelformat = PF_420 | PF_reserved | PF_422 | PF_444
type info = {
frame_width : int;
frame_height : int;
picture_width : int;
picture_height : int;
picture_x : int;
picture_y : int;
colorspace : Theora.colorspace;
pixel_fmt : Theora.pixelformat;
target_bitrate : int;
quality : int;
keyframe_granule_shift : int;
version_major : int;
version_minor : int;
version_subminor : int;
fps_numerator : int;
fps_denominator : int;
aspect_numerator : int;
aspect_denominator : int;
}
val default_granule_shift : int
type data_buffer =
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
type yuv_buffer = {
y_width : int;
y_height : int;
y_stride : int;
y : Theora.data_buffer;
u_width : int;
u_height : int;
u_stride : int;
u : Theora.data_buffer;
v_width : int;
v_height : int;
v_stride : int;
v : Theora.data_buffer;
}
module Encoder :
sig
type t
val create : Theora.info -> (string * string) list -> Theora.Encoder.t
val encode_header : Theora.Encoder.t -> Ogg.Stream.t -> unit
val encode_page :
Theora.Encoder.t ->
Ogg.Stream.t -> (unit -> Theora.yuv_buffer) -> Ogg.Page.t
val encode_buffer :
Theora.Encoder.t -> Ogg.Stream.t -> Theora.yuv_buffer -> unit
val time_of_granulepos : Theora.Encoder.t -> Int64.t -> Nativeint.t
val frames_of_granulepos : Theora.Encoder.t -> Int64.t -> Int64.t
val eos : Theora.Encoder.t -> Ogg.Stream.t -> unit
end
module Decoder :
sig
type t
val check : Ogg.Stream.packet -> bool
val create : unit -> Theora.Decoder.t
val is_ready : Theora.Decoder.t -> bool
val headerin :
Theora.Decoder.t ->
Ogg.Stream.packet -> Theora.info * string * (string * string) list
val get_yuv : Theora.Decoder.t -> Ogg.Stream.t -> Theora.yuv_buffer
end
module Skeleton :
sig
val fisbone :
?start_granule:Int64.t ->
?headers:(string * string) list ->
serialno:Nativeint.t -> info:Theora.info -> unit -> Ogg.Stream.packet
end
end