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
MediaFileGidBuilder builder()Get builder for [gtk.media_file.MediaFile] Returns: New builder objectgio.file.File file() @propertyGet `file` property. Returns: The file being played back or null if not playing a file.void file(gio.file.File propval) @propertySet `file` property. Params: propval = The file being played back or null if not playing a file.gio.input_stream.InputStream inputStream() @propertyGet `inputStream` property. Returns: The stream being played back or null if not playing a stream.void inputStream(gio.input_stream.InputStream propval) @propertySet `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)Creates a new media file to play file.gtk.media_file.MediaFile newForFilename(string filename)Creates a new media file for the given filename.gtk.media_file.MediaFile newForInputStream(gio.input_stream.InputStream stream)Creates a new media file to play stream.gtk.media_file.MediaFile newForResource(string resourcePath)Creates a new new media file for the given resource.void clear()Resets the media file to be empty.gio.file.File getFile()Returns the file that self is currently playing from.gio.input_stream.InputStream getInputStream()Returns the stream that self is currently playing from.void setFile(gio.file.File file = null)Sets the [gtk.media_file.MediaFile] to play the given file.void setFilename(string filename = null)Sets the `GtkMediaFile to play the given file.void setInputStream(gio.input_stream.InputStream stream = null)Sets the [gtk.media_file.MediaFile] to play the given stream.void setResource(string resourcePath = null)Sets the `GtkMediaFile to play the given resource.Methods
T file(gio.file.File propval)Set `file` property. Params: propval = The file being played back or null if not playing a file. Returns: Builder instance for fluent chainingT inputStream(gio.input_stream.InputStream propval)Set `inputStream` property. Params: propval = The stream being played back or null if not playing a stream.