MediaStream
Object Hierarchy:
Description:
[
CCode ( type_id =
"gtk_media_stream_get_type ()" ) ]
public abstract class MediaStream :
Object,
Paintable
Content:
Properties:
- public int64 duration { get; }
The stream's duration in microseconds or 0 if unknown.
- public bool ended { get; }
Set when playback has finished.
- public Error error { get; }
null for a properly working stream
or the `GError` that the stream is in.
- public bool has_audio { get; }
Whether the stream contains audio.
- public bool has_video { get; }
Whether the stream contains video.
- public bool loop { get; set; }
Try to restart the media from the beginning once it ended.
- public bool muted { get; set; }
Whether the audio stream should be muted.
- public bool playing { get; set; }
Whether the stream is currently playing.
- public bool prepared { get; set; }
Whether the stream has finished initializing and existence of audio
and video is known.
- public bool seekable { get; }
Set unless the stream is known to not support seeking.
- public bool seeking { get; }
Set while a seek is in progress.
- public int64 timestamp { get; }
The current presentation timestamp in microseconds.
- public double volume { get; set; }
Volume of the audio stream.
Creation methods:
Methods:
- public void error_valist (Quark domain, int code, string format, va_list args)
Sets this into an error state using
a printf-style format string.
- public void gerror (owned Error error)
Sets this into an error state.
- public int64 get_duration ()
Gets the duration of the stream.
- public bool get_ended ()
Returns whether the streams playback is finished.
- public unowned Error? get_error ()
If the stream is in an error state, returns the `GError` explaining
that state.
- public bool get_loop ()
Returns whether the stream is set to loop.
- public bool get_muted ()
Returns whether the audio for the stream is muted.
- public bool get_playing ()
Return whether the stream is currently playing.
- public int64 get_timestamp ()
Returns the current presentation timestamp in microseconds.
- public double get_volume ()
Returns the volume of the audio for the stream.
- public bool is_prepared ()
Returns whether the stream has finished initializing.
- public bool is_seekable ()
Checks if a stream may be seekable.
- public bool is_seeking ()
Checks if there is currently a seek operation going on.
- public virtual void pause ()
Pauses playback of the stream.
- public virtual bool play ()
- public void play_now ()
Starts playing the stream.
- public virtual void realize (Surface surface)
Called by users to attach the media stream to a `GdkSurface` they
manage.
- public virtual void seek (int64 timestamp)
Start a seek operation on this to
timestamp
.
- public void seek_failed ()
Ends a seek operation started via GtkMediaStream.
- public void seek_success ()
Ends a seek operation started via GtkMediaStream.
- public void set_loop (bool loop)
Sets whether the stream should loop.
- public void set_muted (bool muted)
Sets whether the audio stream should be muted.
- public void set_playing (bool playing)
Starts or pauses playback of the stream.
- public void set_volume (double volume)
Sets the volume of the audio stream.
- public void stream_ended ()
Pauses the media stream and marks it as ended.
- public void stream_prepared (bool has_audio, bool has_video, bool seekable, int64 duration)
Called by `GtkMediaStream` implementations to advertise the stream
being ready to play and providing details about the stream.
- public void stream_unprepared ()
Resets a given media stream implementation.
- public virtual void unrealize (Surface surface)
- public void update (int64 timestamp)
Media stream implementations should regularly call this function to
update the timestamp reported by the stream.
- public virtual void update_audio (bool muted, double volume)
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Gdk.Paintable