package ocgtk

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

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.