gtk.media_stream
Module for [MediaStream] class
Types 3
gtk.media_stream.MediaStream is the integration point for media playback inside GTK.
GTK provides an implementation of the gtk.media_stream.MediaStream interface that is called gtk.media_file.MediaFile.
Apart from application-facing API for stream playback, gtk.media_stream.MediaStream has a number of APIs that are only useful for implementations and should not be used in applications: gtk.media_stream.MediaStream.prepared, gtk.media_stream.MediaStream.unprepared, gtk.media_stream.MediaStream.update, gtk.media_stream.MediaStream.ended, gtk.media_stream.MediaStream.seekSuccess, gtk.media_stream.MediaStream.seekFailed, gtk.media_stream.MediaStream.gerror, gtk.media_stream.MediaStream.error, gtk.media_stream.MediaStream.errorValist.
MediaStreamGidBuilder builder() static nothrowGet builder for [gtk.media_stream.MediaStream] Returns: New builder objectlong duration() @property nothrowGet `duration` property. Returns: The stream's duration in microseconds or 0 if unknown.bool loop() @property nothrowGet `loop` property. Returns: Try to restart the media from the beginning once it ended.void loop(bool propval) @property nothrowSet `loop` property. Params: propval = Try to restart the media from the beginning once it ended.bool muted() @property nothrowGet `muted` property. Returns: Whether the audio stream should be muted.void muted(bool propval) @property nothrowSet `muted` property. Params: propval = Whether the audio stream should be muted.bool playing() @property nothrowGet `playing` property. Returns: Whether the stream is currently playing.void playing(bool propval) @property nothrowSet `playing` property. Params: propval = Whether the stream is currently playing.bool seekable() @property nothrowGet `seekable` property. Returns: Set unless the stream is known to not support seeking.long timestamp() @property nothrowGet `timestamp` property. Returns: The current presentation timestamp in microseconds.void volume(double propval) @property nothrowSet `volume` property. Params: propval = Volume of the audio stream.bool getEnded() nothrowReturns whether the streams playback is finished. Returns: true if playback is finishedglib.error.ErrorWrap getError() nothrowIf the stream is in an error state, returns the [glib.error.ErrorWrap] explaining that state.bool getPlaying() nothrowReturn whether the stream is currently playing. Returns: true if the stream is playinglong getTimestamp() nothrowReturns the current presentation timestamp in microseconds. Returns: the timestamp in microsecondsbool isSeeking() nothrowChecks if there is currently a seek operation going on. Returns: true if a seek operation is ongoing.void realize(gdk.surface.Surface surface) nothrowCalled by users to attach the media stream to a [gdk.surface.Surface] they manage.void streamPrepared(bool hasAudio, bool hasVideo, bool seekable, long duration) nothrowCalled by [gtk.media_stream.MediaStream] implementations to advertise the stream being ready to play and providing details about the stream.void unrealize(gdk.surface.Surface surface) nothrowUndoes a previous call to [gtk.media_stream.MediaStream.realize].void update(long timestamp) nothrowMedia stream implementations should regularly call this function to update the timestamp reported by the stream.Fluent builder implementation template for gtk.media_stream.MediaStream
T loop(bool propval) nothrowSet `loop` property. Params: propval = Try to restart the media from the beginning once it ended. Returns: Builder instance for fluent chainingT muted(bool propval) nothrowSet `muted` property. Params: propval = Whether the audio stream should be muted. Returns: Builder instance for fluent chainingT playing(bool propval) nothrowSet `playing` property. Params: propval = Whether the stream is currently playing. Returns: Builder instance for fluent chainingT volume(double propval) nothrowSet `volume` property. Params: propval = Volume of the audio stream. Returns: Builder instance for fluent chainingFluent builder for gtk.media_stream.MediaStream