package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Media_file/index.html

Module Wrappers.Media_file

type t = [ `media_file | `media_stream | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new MediaFile

val new_for_file : Ocgtk_gio.Gio.Wrappers.File.t -> t

Create a new MediaFile

val new_for_filename : string -> t

Create a new MediaFile

val new_for_input_stream : Ocgtk_gio.Gio.Wrappers.Input_stream.t -> t

Create a new MediaFile

val new_for_resource : string -> t

Create a new MediaFile

val set_resource : t -> string option -> unit

Sets the `GtkMediaFile to play the given resource.

This is a utility function that converts the given @resource_path to a `GFile` and calls method@Gtk.MediaFile.set_file.

val set_input_stream : t -> Ocgtk_gio.Gio.Wrappers.Input_stream.t option -> unit

Sets the `GtkMediaFile` to play the given stream.

If anything is still playing, stop playing it.

Full control about the @stream is assumed for the duration of playback. The stream will not be closed.

val set_filename : t -> string option -> unit

Sets the `GtkMediaFile to play the given file.

This is a utility function that converts the given @filename to a `GFile` and calls method@Gtk.MediaFile.set_file.

val set_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option -> unit

Sets the `GtkMediaFile` to play the given file.

If any file is still playing, stop playing it.

val get_input_stream : t -> Ocgtk_gio.Gio.Wrappers.Input_stream.t option

Returns the stream that @self is currently playing from.

When @self is not playing or not playing from a stream, %NULL is returned.

val get_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option

Returns the file that @self is currently playing from.

When @self is not playing or not playing from a file, %NULL is returned.

val clear : t -> unit

Resets the media file to be empty.