Class
GtkMediaFile
Description [src]
abstract class Gtk.MediaFile : Gtk.MediaStream {
parent_instance: GtkMediaStream
}
GtkMediaFile
implements GtkMediaStream
for files.
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.
Ancestors
- GtkMediaStream
- GObject
Constructors
gtk_media_file_new
Creates a new empty media file.
gtk_media_file_new_for_file
Creates a new media file to play file
.
gtk_media_file_new_for_filename
Creates a new media file for the given filename.
gtk_media_file_new_for_input_stream
Creates a new media file to play stream
.
gtk_media_file_new_for_resource
Creates a new new media file for the given resource.
Instance methods
gtk_media_file_clear
Resets the media file to be empty.
gtk_media_file_get_file
Returns the file that self
is currently playing from.
gtk_media_file_get_input_stream
Returns the stream that self
is currently playing from.
gtk_media_file_set_file
Sets the GtkMediaFile
to play the given file.
gtk_media_file_set_filename
Sets the `GtkMediaFile to play the given file.
gtk_media_file_set_input_stream
Sets the GtkMediaFile
to play the given stream.
gtk_media_file_set_resource
Sets the `GtkMediaFile to play the given resource.
Methods inherited from GtkMediaStream (34)
gtk_media_stream_ended
Pauses the media stream and marks it as ended.
Deprecated since: 4.4
gtk_media_stream_error
Sets self
into an error state using a printf()
-style format string.
gtk_media_stream_error_valist
Sets self
into an error state using a printf()
-style format string.
gtk_media_stream_gerror
Sets self
into an error state.
gtk_media_stream_get_duration
Gets the duration of the stream.
gtk_media_stream_get_ended
Returns whether the streams playback is finished.
gtk_media_stream_get_error
If the stream is in an error state, returns the GError
explaining that state.
gtk_media_stream_get_loop
Returns whether the stream is set to loop.
gtk_media_stream_get_muted
Returns whether the audio for the stream is muted.
gtk_media_stream_get_playing
Return whether the stream is currently playing.
gtk_media_stream_get_timestamp
Returns the current presentation timestamp in microseconds.
gtk_media_stream_get_volume
Returns the volume of the audio for the stream.
gtk_media_stream_has_audio
Returns whether the stream has audio.
gtk_media_stream_has_video
Returns whether the stream has video.
gtk_media_stream_is_prepared
Returns whether the stream has finished initializing.
gtk_media_stream_is_seekable
Checks if a stream may be seekable.
gtk_media_stream_is_seeking
Checks if there is currently a seek operation going on.
gtk_media_stream_pause
Pauses playback of the stream.
gtk_media_stream_play
Starts playing the stream.
gtk_media_stream_prepared
Same as gtk_media_stream_stream_prepared()
.
Deprecated since: 4.4
gtk_media_stream_realize
Called by users to attach the media stream to a GdkSurface
they manage.
gtk_media_stream_seek
Start a seek operation on self
to timestamp
.
gtk_media_stream_seek_failed
Ends a seek operation started via GtkMediaStream.seek()
as a failure.
Properties
Gtk.MediaFile:file
The file being played back or NULL
if not playing a file.
Gtk.MediaFile:input-stream
The stream being played back or NULL
if not playing a stream.
Properties inherited from GtkMediaStream (13)
Gtk.MediaStream:duration
The stream’s duration in microseconds or 0 if unknown.
Gtk.MediaStream:ended
Set when playback has finished.
Gtk.MediaStream:error
NULL
for a properly working stream or the GError
that the stream is in.
Gtk.MediaStream:has-audio
Whether the stream contains audio.
Gtk.MediaStream:has-video
Whether the stream contains video.
Gtk.MediaStream:loop
Try to restart the media from the beginning once it ended.
Gtk.MediaStream:muted
Whether the audio stream should be muted.
Gtk.MediaStream:playing
Whether the stream is currently playing.
Gtk.MediaStream:prepared
Whether the stream has finished initializing and existence of audio and video is known.
Gtk.MediaStream:seekable
Set unless the stream is known to not support seeking.
Gtk.MediaStream:seeking
Set while a seek is in progress.
Gtk.MediaStream:timestamp
The current presentation timestamp in microseconds.
Gtk.MediaStream:volume
Volume of the audio stream.
Class structure
struct GtkMediaFileClass {
GtkMediaStreamClass parent_class;
void (* open) (
GtkMediaFile* self
);
void (* close) (
GtkMediaFile* self
);
void (* _gtk_reserved1) (
void
);
void (* _gtk_reserved2) (
void
);
void (* _gtk_reserved3) (
void
);
void (* _gtk_reserved4) (
void
);
}
Class members
parent_class |
|
No description available. | |
open |
|
No description available. | |
close |
|
No description available. | |
_gtk_reserved1 |
|
No description available. | |
_gtk_reserved2 |
|
No description available. | |
_gtk_reserved3 |
|
No description available. | |
_gtk_reserved4 |
|
No description available. |