Player
Object Hierarchy:
Description:
Starting from GStreamer 1.20, application developers are strongly advised to migrate to GstPlay
.
Player will be deprecated in 1.20 and most likely removed by 1.24.
Namespace: Gst
Package: gstreamer-player-1.0
Content:
Properties:
- public int64 audio_video_offset { get; set; }
- public PlayerAudioInfo current_audio_track { owned get; }
- public PlayerSubtitleInfo current_subtitle_track { owned get; }
- public PlayerVideoInfo current_video_track { owned get; }
- public uint64 duration { get; }
- public PlayerMediaInfo media_info { owned get; }
- public bool mute { get; set; }
- public Element pipeline { owned get; }
- public uint64 position { get; }
- public double rate { get; set; }
- public PlayerSignalDispatcher signal_dispatcher { construct; }
- public int64 subtitle_video_offset { get; set; }
- public string suburi { owned get; set; }
- public string uri { owned get; set; }
- public MultiviewFlags video_multiview_flags { get; set; }
- public MultiviewFramePacking video_multiview_mode { get; set; }
- public PlayerVideoRenderer video_renderer { owned get; construct; }
- public double volume { get; set; }
Static methods:
- public static uint config_get_position_update_interval (Structure config)
- public static bool config_get_seek_accurate (Structure config)
- public static string? config_get_user_agent (Structure config)
Return the user agent which has been configured using config_set_user_agent if any.
- public static void config_set_position_update_interval (Structure config, uint interval)
set interval in milliseconds between two position-updated signals.
- public static void config_set_seek_accurate (Structure config, bool accurate)
Enable or disable accurate seeking.
- public static void config_set_user_agent (Structure config, string? agent)
Set the user agent to pass to the server if
player
needs to connect to a server during playback. - public static unowned List<PlayerAudioInfo> get_audio_streams (PlayerMediaInfo info)
- public static unowned List<PlayerSubtitleInfo> get_subtitle_streams (PlayerMediaInfo info)
- public static unowned List<PlayerVideoInfo> get_video_streams (PlayerMediaInfo info)
- public static void visualizations_free (PlayerVisualization viss)
Frees a null terminated array of PlayerVisualization.
- public static PlayerVisualization[] visualizations_get ()
Creation methods:
- public Player (owned PlayerVideoRenderer? video_renderer, owned PlayerSignalDispatcher? signal_dispatcher)
Creates a new Player instance that uses
signal_dispatcher
to dispatch signals to some event loop system, or emits signals directly if NULL is passed.
Methods:
- public int64 get_audio_video_offset ()
Retrieve the current value of audio-video-offset property
- public double get_color_balance (PlayerColorBalanceType type)
Retrieve the current value of the indicated
type
. - public Structure get_config ()
Get a copy of the current configuration of the player.
- public PlayerAudioInfo? get_current_audio_track ()
A Function to get current audio PlayerAudioInfo instance.
- public PlayerSubtitleInfo? get_current_subtitle_track ()
A Function to get current subtitle PlayerSubtitleInfo instance.
- public PlayerVideoInfo? get_current_video_track ()
A Function to get current video PlayerVideoInfo instance.
- public string? get_current_visualization ()
- public ClockTime get_duration ()
Retrieves the duration of the media stream that self represents.
- public PlayerMediaInfo? get_media_info ()
A Function to get the current media info PlayerMediaInfo instance.
- public MultiviewFlags get_multiview_flags ()
Retrieve the current value of the indicated
type
. - public MultiviewFramePacking get_multiview_mode ()
Retrieve the current value of the indicated
type
. - public bool get_mute ()
- public Element get_pipeline ()
- public ClockTime get_position ()
- public double get_rate ()
- public string? get_subtitle_uri ()
current subtitle URI
- public int64 get_subtitle_video_offset ()
Retrieve the current value of subtitle-video-offset property
- public string? get_uri ()
Gets the URI of the currently-playing stream.
- public Sample? get_video_snapshot (PlayerSnapshotFormat format, Structure? config)
Get a snapshot of the currently selected video stream, if any.
- public double get_volume ()
Returns the current volume level, as a percentage between 0 and 1.
- public bool has_color_balance ()
Checks whether the this has color balance support available.
- public void pause ()
Pauses the current stream.
- public void play ()
Request to play the loaded stream.
- public void seek (ClockTime position)
Seeks the currently-playing stream to the absolute
position
time in nanoseconds. - public bool set_audio_track (int stream_index)
- public void set_audio_track_enabled (bool enabled)
Enable or disable the current audio track.
- public void set_audio_video_offset (int64 offset)
Sets audio-video-offset property by value of
offset
- public void set_color_balance (PlayerColorBalanceType type, double value)
Sets the current value of the indicated channel
type
to the passed value. - public bool set_config (owned Structure config)
Set the configuration of the player.
- public void set_multiview_flags (MultiviewFlags flags)
Sets the current value of the indicated mode
type
to the passed value. - public void set_multiview_mode (MultiviewFramePacking mode)
Sets the current value of the indicated mode
type
to the passed value. - public void set_mute (bool val)
true if the currently-playing stream should be muted.
- public void set_rate (double rate)
Playback at specified rate
- public bool set_subtitle_track (int stream_index)
- public void set_subtitle_track_enabled (bool enabled)
Enable or disable the current subtitle track.
- public void set_subtitle_uri (string? uri)
Sets the external subtitle URI.
- public void set_subtitle_video_offset (int64 offset)
Sets subtitle-video-offset property by value of
offset
- public void set_uri (string? uri)
Sets the next URI to play.
- public bool set_video_track (int stream_index)
- public void set_video_track_enabled (bool enabled)
Enable or disable the current video track.
- public bool set_visualization (string? name)
- public void set_visualization_enabled (bool enabled)
Enable or disable the visualization.
- public void set_volume (double val)
Sets the volume level of the stream as a percentage between 0 and 1.
- public void stop ()
Stops playing the current stream and resets to the first position in the stream.
Signals:
- public signal void buffering (int object)
- public signal void duration_changed (uint64 object)
- public signal void end_of_stream ()
- public signal void error (Error object)
- public signal void media_info_updated (PlayerMediaInfo object)
- public signal void mute_changed ()
- public signal void position_updated (uint64 object)
- public signal void seek_done (uint64 object)
- public signal void state_changed (PlayerState object)
- public signal void uri_loaded (string object)
- public signal void video_dimensions_changed (int object, int p0)
- public signal void volume_changed ()
- public signal void warning (Error object)
Inherited Members:
All known members inherited from class Gst.Object
All known members inherited from class GLib.Object