sig
exception Internal_error
exception Invalid_data
exception Unknown_error of int
val version_string : unit -> string
val version_number : unit -> 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 = {
width : int;
height : int;
frame_width : int;
frame_height : int;
offset_x : int;
offset_y : int;
fps_numerator : int;
fps_denominator : int;
aspect_numerator : int;
aspect_denominator : int;
colorspace : Theora.colorspace;
target_bitrate : int;
quality : int;
quick_p : bool;
version_major : int;
version_minor : int;
version_subminor : int;
dropframes_p : bool;
keyframe_auto_p : bool;
keyframe_frequency : int;
keyframe_frequency_force : int;
keyframe_data_target_bitrate : int;
keyframe_auto_threshold : int;
keyframe_mindistance : int;
noise_sensitivity : int;
sharpness : int;
pixelformat : Theora.pixelformat;
}
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;
uv_width : int;
uv_height : int;
uv_stride : int;
y : Theora.data_buffer;
u : Theora.data_buffer;
v : Theora.data_buffer;
}
module Encoder :
sig
type t
val create : Theora.info -> Theora.Encoder.t
val encode_header : Theora.Encoder.t -> Ogg.Stream.t -> unit
val encode_comments : Ogg.Stream.t -> (string * string) list -> unit
val encode_tables : 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 :
Ogg.Stream.packet ->
Ogg.Stream.packet ->
Ogg.Stream.packet ->
Theora.Decoder.t * 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