MediaFile
Object Hierarchy:
Description:
[
CCode ( type_id =
"gtk_media_file_get_type ()" ) ]
public abstract class MediaFile :
MediaStream,
Paintable
MediaFile is the implementation for media file usage with
MediaStream.
This provides a simple way to play back video files with GTK.
GTK provides a GIO extension point for MediaFile implementations to allow for external implementations
using various media frameworks. GTK itself includes implementations using GStreamer and ffmpeg.
Content:
Properties:
- public File file { get; set; }
The file being played back or null if not
playing a file.
- public InputStream input_stream { get; set; }
The stream being played back or null if
not playing a stream, like when playing a file.
Static methods:
- public static MediaFile empty ()
Creates a new empty media file.
- public static MediaFile for_file (File file)
Creates a new media file to play file
.
- public static MediaFile for_filename (string filename)
This is a utility function that converts the given filename
to
a File and calls
for_file.
- public static MediaFile for_input_stream (InputStream stream)
Creates a new media file to play stream
.
- public static MediaFile for_resource (string resource_path)
This is a utility function that converts the given resource
to
a File and calls
for_file.
Creation methods:
Methods:
- public void clear ()
Resets the media file to be empty.
- public virtual void close ()
- public unowned File? get_file ()
Returns the file that this is currently
playing from.
- public unowned InputStream? get_input_stream ()
Returns the stream that this is currently
playing from.
- public virtual void open ()
- public void set_file (File? file)
If any file is still playing, stop playing it.
- public void set_filename (string? filename)
This is a utility function that converts the given filename
to
a File and calls set_file
.
- public void set_input_stream (InputStream? stream)
If anything is still playing, stop playing it.
- public void set_resource (string? resource_path)
This is a utility function that converts the given resource_path
to a File and calls
set_file.
Inherited Members:
All known members inherited from class Gtk.MediaStream
All known members inherited from class GLib.Object
All known members inherited from interface Gdk.Paintable