sig
module Video :
sig
exception Invalid_frame
exception Invalid_conversion
exception Not_implemented
type interlace_mode = No_interlace | Top_first | Bottom_first | Mixed
type pixel_format =
Gray_8
| Gray_16
| Gray_float
| Graya_16
| Graya_32
| Graya_float
| Rgb_15
| Bgr_15
| Rgb_16
| Bgr_16
| Rgb_24
| Bgr_24
| Rgb_32
| Bgr_32
| Rgba_32
| Rgb_48
| Rgba_64
| Rgb_float
| Rgba_float
| Yuy2
| Yuvy
| Yuva_32
| Yuva_64
| Yuv_float
| Yuva_float
| Yuv_420_p
| Yuv_422_p
| Yuv_444_p
| Yuv_411_p
| Yuv_410_p
| Yuvj_420_p
| Yuvj_422_p
| Yuvj_444_p
| Yuv_444_p_16
| Yuv_422_p_16
type framerate_mode = Constant | Variable | Still
type chroma_placement = Default | Mpeg2 | Dvpal
type format = {
frame_width : int;
frame_height : int;
image_width : int;
image_height : int;
pixel_width : int;
pixel_height : int;
pixelformat : Gavl.Video.pixel_format;
frame_duration : int;
timescale : int;
framerate_mode : Gavl.Video.framerate_mode;
chroma_placement : Gavl.Video.chroma_placement;
interlace_mode : Gavl.Video.interlace_mode;
}
type plane =
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout)
Bigarray.Array1.t
type frame = {
planes : (Gavl.Video.plane * int) array;
timestamp : Stdlib.Int64.t;
duration : Stdlib.Int64.t;
frame_interlace_mode : Gavl.Video.interlace_mode;
}
val new_frame : Gavl.Video.format -> Gavl.Video.frame
val clear_frame : Gavl.Video.format -> Gavl.Video.frame -> unit
type t
val create_converter :
Gavl.Video.format -> Gavl.Video.format -> Gavl.Video.t
val init :
Gavl.Video.t -> Gavl.Video.format -> Gavl.Video.format -> unit
val get_formats : Gavl.Video.t -> Gavl.Video.format * Gavl.Video.format
val get_quality : Gavl.Video.t -> int
val set_quality : Gavl.Video.t -> int -> unit
type int_rect = int * int * int * int
type float_rect = float * float * float * float
val get_rect :
Gavl.Video.t -> Gavl.Video.float_rect * Gavl.Video.int_rect
val set_rect :
Gavl.Video.t -> Gavl.Video.float_rect -> Gavl.Video.int_rect -> unit
type conversion_flags =
[ `Convolve_chroma
| `Convolve_normalize
| `Force_deinterlace
| `Resample_chroma ]
val set_flags :
Gavl.Video.t -> Gavl.Video.conversion_flags list -> unit
val get_flags : Gavl.Video.t -> Gavl.Video.conversion_flags list
type scale_mode =
Auto
| Nearest
| Bilinear
| Quadratic
| Cubic_bspline
| Cubic_mitchell
| Cubic_catmull
| Scale_sinc_lanczos
val set_scale_mode : Gavl.Video.t -> Gavl.Video.scale_mode -> unit
val get_scale_mode : Gavl.Video.t -> Gavl.Video.scale_mode
val reinit : Gavl.Video.t -> unit
val convert :
Gavl.Video.t -> Gavl.Video.frame -> Gavl.Video.frame -> unit
end
end