Top |
Functions
GtkMediaStream * | gtk_media_file_new () |
GtkMediaStream * | gtk_media_file_new_for_filename () |
GtkMediaStream * | gtk_media_file_new_for_resource () |
GtkMediaStream * | gtk_media_file_new_for_file () |
GtkMediaStream * | gtk_media_file_new_for_input_stream () |
void | gtk_media_file_clear () |
void | gtk_media_file_set_filename () |
void | gtk_media_file_set_resource () |
void | gtk_media_file_set_file () |
GFile * | gtk_media_file_get_file () |
void | gtk_media_file_set_input_stream () |
GInputStream * | gtk_media_file_get_input_stream () |
Description
GtkMediaFile is the implementation for media file usage with GtkMediaStream.
This provides a simple way to play back video files with GTK.
GTK provides a GIO extension point for GtkMediaFile implementations to allow for external implementations using various media frameworks. GTK itself includes implementations using GStreamer and ffmpeg.
Functions
gtk_media_file_new_for_filename ()
GtkMediaStream *
gtk_media_file_new_for_filename (const char *filename
);
This is a utility function that converts the given filename
to a GFile and calls gtk_media_file_new_for_file()
.
gtk_media_file_new_for_resource ()
GtkMediaStream *
gtk_media_file_new_for_resource (const char *resource_path
);
This is a utility function that converts the given resource
to a GFile and calls gtk_media_file_new_for_file()
.
gtk_media_file_new_for_file ()
GtkMediaStream *
gtk_media_file_new_for_file (GFile *file
);
Creates a new media file to play file
.
gtk_media_file_new_for_input_stream ()
GtkMediaStream *
gtk_media_file_new_for_input_stream (GInputStream *stream
);
Creates a new media file to play stream
. If you want the
resulting media to be seekable, the stream should implement
the GSeekable interface.
gtk_media_file_clear ()
void
gtk_media_file_clear (GtkMediaFile *self
);
Resets the media file to be empty.
gtk_media_file_set_filename ()
void gtk_media_file_set_filename (GtkMediaFile *self
,const char *filename
);
This is a utility function that converts the given filename
to a GFile and calls gtk_media_file_set_file()
.
gtk_media_file_set_resource ()
void gtk_media_file_set_resource (GtkMediaFile *self
,const char *resource_path
);
This is a utility function that converts the given resource_path
to a GFile and calls gtk_media_file_set_file()
.
gtk_media_file_set_file ()
void gtk_media_file_set_file (GtkMediaFile *self
,GFile *file
);
If any file is still playing, stop playing it.
Then start playing the given file
.
gtk_media_file_get_file ()
GFile *
gtk_media_file_get_file (GtkMediaFile *self
);
Returns the file that self
is currently playing from.
When self
is not playing or not playing from a file,
NULL
is returned.
gtk_media_file_set_input_stream ()
void gtk_media_file_set_input_stream (GtkMediaFile *self
,GInputStream *stream
);
If anything is still playing, stop playing it. Then start
playing the given stream
.
Full control about the stream
is assumed for the duration of
playback. The stream will not bt be closed.
gtk_media_file_get_input_stream ()
GInputStream *
gtk_media_file_get_input_stream (GtkMediaFile *self
);
Returns the stream that self
is currently playing from.
When self
is not playing or not playing from a stream,
NULL
is returned.