Class
Gtk.MediaStream
Description [src]
abstract class Gtk.MediaStream : GObject.Object {
parent_instance: GObject
}
GtkMediaStream
is the integration point for media playback inside GTK.
GTK provides an implementation of the GtkMediaStream
interface that
is called GtkMediaFile
.
Apart from application-facing API for stream playback, GtkMediaStream
has a number of APIs that are only useful for implementations and should
not be used in applications:
gtk_media_stream_prepared()
,
gtk_media_stream_unprepared()
,
gtk_media_stream_update()
,
gtk_media_stream_ended()
,
gtk_media_stream_seek_success()
,
gtk_media_stream_seek_failed()
,
gtk_media_stream_gerror()
,
gtk_media_stream_error()
,
gtk_media_stream_error_valist()
.
Instance methods
gtk_media_stream_ended
Pauses the media stream and marks it as ended.
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
Called by GtkMediaStream
implementations to advertise the stream
being ready to play and providing details about the stream.
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.
gtk_media_stream_seek_success
Ends a seek operation started via GtkMediaStream.seek()
successfully.
gtk_media_stream_set_loop
Sets whether the stream should loop.
gtk_media_stream_set_muted
Sets whether the audio stream should be muted.
gtk_media_stream_set_playing
Starts or pauses playback of the stream.
gtk_media_stream_set_volume
Sets the volume of the audio stream.
gtk_media_stream_unprepared
Resets a given media stream implementation.
gtk_media_stream_unrealize
Undoes a previous call to gtk_media_stream_realize()
.
gtk_media_stream_update
Media stream implementations should regularly call this function to update the timestamp reported by the stream.
Properties
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 GtkMediaStreamClass {
GObjectClass parent_class;
gboolean (* play) (
GtkMediaStream* self
);
void (* pause) (
GtkMediaStream* self
);
void (* seek) (
GtkMediaStream* self,
gint64 timestamp
);
void (* update_audio) (
GtkMediaStream* self,
gboolean muted,
double volume
);
void (* realize) (
GtkMediaStream* self,
GdkSurface* surface
);
void (* unrealize) (
GtkMediaStream* self,
GdkSurface* surface
);
void (* _gtk_reserved1) (
void
);
void (* _gtk_reserved2) (
void
);
void (* _gtk_reserved3) (
void
);
void (* _gtk_reserved4) (
void
);
void (* _gtk_reserved5) (
void
);
void (* _gtk_reserved6) (
void
);
void (* _gtk_reserved7) (
void
);
void (* _gtk_reserved8) (
void
);
}
Class members
parent_class |
|
No description available. | |
play |
|
No description available. | |
pause |
|
No description available. | |
seek |
|
No description available. | |
update_audio |
|
No description available. | |
realize |
|
No description available. | |
unrealize |
|
No description available. | |
_gtk_reserved1 |
|
No description available. | |
_gtk_reserved2 |
|
No description available. | |
_gtk_reserved3 |
|
No description available. | |
_gtk_reserved4 |
|
No description available. | |
_gtk_reserved5 |
|
No description available. | |
_gtk_reserved6 |
|
No description available. | |
_gtk_reserved7 |
|
No description available. | |
_gtk_reserved8 |
|
No description available. |
Virtual methods
Gtk.MediaStreamClass.pause
Pauses playback of the stream.
Gtk.MediaStreamClass.play
Gtk.MediaStreamClass.realize
Called by users to attach the media stream to a GdkSurface
they manage.
Gtk.MediaStreamClass.seek
Start a seek operation on self
to timestamp
.
Gtk.MediaStreamClass.unrealize
Undoes a previous call to gtk_media_stream_realize()
.