package mm

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Videos with canvas images.

module Image : sig ... end
type image = Image.t

An image.

type t = image array

A video.

val make : int -> (int * int) -> t

Create a video with given length and dimensions.

val copy : t -> t

Make a copy of the video (images themselves are not copied since they are supposed to be immutable).

val single : Image.t -> t

Create a video with one canvas image.

val single_image : Mm_image.Image.YUV420.t -> t

Create a video with one image.

val length : t -> int

Length of the video (in images).

val size : t -> int

Estimated size of the video (in bytes).

val get : t -> int -> image

Get the nth image of the video.

val set : t -> int -> image -> unit

Set the nth image of the video.

val map_image : (image -> image) -> t -> int -> unit

Apply a function on the nth image of the video.

val render : t -> int -> Mm_image.Image.YUV420.t

Render the nth image of the video.

val put : t -> int -> Mm_image.Image.YUV420.t -> unit

Change the contents of the nth image of the video (like set but takes an image instead of a canvas as argument).

val blank : t -> int -> int -> unit

Blank the video starting at offset with given length.

val blit : t -> int -> t -> int -> int -> unit

Copy the images of one video to the other.

val map : (image -> image) -> t -> int -> int -> unit

Map a function to the images of a video (starting at given offset, for given length).

val iter : (Mm_image.Image.YUV420.t -> unit) -> t -> int -> int -> unit

Iterate a function on the rendering of the images of the video.