sig
exception Internal_error
exception Invalid_data
exception Unknown_error of int
exception Duplicate_frame
exception Done
exception Not_initialized
val version_string : string
val version_number : int * int * int
val is_keyframe : Ogg.Stream.packet -> bool
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
type settings = {
keyframe_frequency : int option;
vp3_compatible : bool option;
soft_target : bool option;
buffer_delay : int option;
speed : int option;
}
val create :
Theora.info ->
Theora.Encoder.settings -> (string * string) list -> Theora.Encoder.t
val encode_header : Theora.Encoder.t -> Ogg.Stream.stream -> unit
val encode_page :
Theora.Encoder.t ->
Ogg.Stream.stream -> (unit -> Theora.yuv_buffer) -> Ogg.Page.t
val encode_buffer :
Theora.Encoder.t -> Ogg.Stream.stream -> Theora.yuv_buffer -> unit
val frames_of_granulepos :
Theora.Encoder.t -> Stdlib.Int64.t -> Stdlib.Int64.t
val eos : Theora.Encoder.t -> Ogg.Stream.stream -> unit
end
module Decoder :
sig
type decoder
type t
val check : Ogg.Stream.packet -> bool
val create : unit -> Theora.Decoder.decoder
val headerin :
Theora.Decoder.decoder ->
Ogg.Stream.packet ->
Theora.Decoder.t * Theora.info * string * (string * string) list
val get_yuv :
Theora.Decoder.t -> Ogg.Stream.stream -> Theora.yuv_buffer
val frames_of_granulepos :
Theora.Decoder.t -> Stdlib.Int64.t -> Stdlib.Int64.t
end
module Skeleton :
sig
val fisbone :
?start_granule:Stdlib.Int64.t ->
?headers:(string * string) list ->
serialno:Stdlib.Nativeint.t ->
info:Theora.info -> unit -> Ogg.Stream.packet
end
end