gtk.media_file

Module for [MediaFile] class

Types 3

gtk.media_file.MediaFile implements gtk.media_stream.MediaStream for files.

This provides a simple way to play back video files with GTK.

GTK provides a GIO extension point for gtk.media_file.MediaFile implementations to allow for external implementations using various media frameworks.

GTK itself includes an implementation using GStreamer.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
MediaFile self() nothrowReturns `this`, for use in `with` statements.
MediaFileGidBuilder builder() static nothrowGet builder for [gtk.media_file.MediaFile] Returns: New builder object
gio.file.File file() @property nothrowGet `file` property. Returns: The file being played back or null if not playing a file.
void file(gio.file.File propval) @property nothrowSet `file` property. Params: propval = The file being played back or null if not playing a file.
gio.input_stream.InputStream inputStream() @property nothrowGet `inputStream` property. Returns: The stream being played back or null if not playing a stream.
void inputStream(gio.input_stream.InputStream propval) @property nothrowSet `inputStream` property. Params: propval = The stream being played back or null if not playing a stream.
gtk.media_file.MediaFile newForFile(gio.file.File file) static nothrowCreates a new media file to play file.
gtk.media_file.MediaFile newForFilename(string filename) static nothrowCreates a new media file for the given filename.
gtk.media_file.MediaFile newForInputStream(gio.input_stream.InputStream stream) static nothrowCreates a new media file to play stream.
gtk.media_file.MediaFile newForResource(string resourcePath) static nothrowCreates a new new media file for the given resource.
void clear() nothrowResets the media file to be empty.
gio.file.File getFile() nothrowReturns the file that self is currently playing from.
gio.input_stream.InputStream getInputStream() nothrowReturns the stream that self is currently playing from.
void setFile(gio.file.File file = null) nothrowSets the [gtk.media_file.MediaFile] to play the given file.
void setFilename(string filename = null) nothrowSets the `GtkMediaFile to play the given file.
void setInputStream(gio.input_stream.InputStream stream = null) nothrowSets the [gtk.media_file.MediaFile] to play the given stream.
void setResource(string resourcePath = null) nothrowSets the `GtkMediaFile to play the given resource.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new empty media file. Returns: a new [gtk.media_file.MediaFile]

Fluent builder implementation template for gtk.media_file.MediaFile

Methods
T file(gio.file.File propval) nothrowSet `file` property. Params: propval = The file being played back or null if not playing a file. Returns: Builder instance for fluent chaining
T inputStream(gio.input_stream.InputStream propval) nothrowSet `inputStream` property. Params: propval = The stream being played back or null if not playing a stream.

Fluent builder for gtk.media_file.MediaFile

Methods
MediaFile build() nothrowCreate object from builder. Returns: New object