Top | ![]() |
![]() |
![]() |
![]() |
GstPlayerAudioInfo * | current-audio-track | Read |
GstPlayerSubtitleInfo * | current-subtitle-track | Read |
GstPlayerVideoInfo * | current-video-track | Read |
guint64 | duration | Read |
GstPlayerMediaInfo * | media-info | Read |
gboolean | mute | Read / Write |
GstElement * | pipeline | Read |
guint64 | position | Read |
guint | position-update-interval | Read / Write |
gdouble | rate | Read / Write |
GstPlayerSignalDispatcher * | signal-dispatcher | Write / Construct Only |
gchar * | suburi | Read / Write |
gchar * | uri | Read / Write |
GstPlayerVideoRenderer * | video-renderer | Write / Construct Only |
gdouble | volume | Read / Write |
void | buffering | No Hooks |
void | duration-changed | No Hooks |
void | end-of-stream | No Hooks |
void | error | No Hooks |
void | media-info-updated | No Hooks |
void | mute-changed | No Hooks |
void | position-updated | No Hooks |
void | seek-done | No Hooks |
void | state-changed | No Hooks |
void | video-dimensions-changed | No Hooks |
void | volume-changed | No Hooks |
void | warning | No Hooks |
GBoxed ╰── GstPlayerVisualization GEnum ├── GstPlayerColorBalanceType ├── GstPlayerError ╰── GstPlayerState GInterface ├── GstPlayerSignalDispatcher ╰── GstPlayerVideoRenderer GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstPlayer
GstPlayer * gst_player_new_full (GstPlayerVideoRenderer *video_renderer
,GstPlayerSignalDispatcher *signal_dispatcher
);
Creates a new GstPlayer instance that uses signal_dispatcher
to dispatch
signals to some event loop system, or emits signals directly if NULL is
passed. See gst_player_g_main_context_signal_dispatcher_new()
.
Video is going to be rendered by video_renderer
, or if NULL
is provided
no special video set up will be done and some default handling will be
performed.
void
gst_player_stop (GstPlayer *player
);
Stops playing the current stream and resets to the first position in the stream.
void gst_player_seek (GstPlayer *player
,GstClockTime position
);
Seeks the currently-playing stream to the absolute position
time
in nanoseconds.
void gst_player_set_uri (GstPlayer *player
,const gchar *uri
);
Sets the next URI to play.
gchar *
gst_player_get_uri (GstPlayer *player
);
Gets the URI of the currently-playing stream.
a string containing the URI of the
currently-playing stream. g_free()
after usage.
[transfer full]
GstClockTime
gst_player_get_duration (GstPlayer *player
);
Retrieves the duration of the media stream that self represents.
void gst_player_set_volume (GstPlayer *player
,gdouble val
);
Sets the volume level of the stream as a percentage between 0 and 1.
void gst_player_set_mute (GstPlayer *player
,gboolean val
);
TRUE
if the currently-playing stream should be muted.
gdouble
gst_player_get_volume (GstPlayer *player
);
Returns the current volume level, as a percentage between 0 and 1.
void gst_player_set_position_update_interval (GstPlayer *player
,guint interval
);
Set interval in milliseconds between two position-updated signals. Pass 0 to stop updating the position.
guint
gst_player_get_position_update_interval
(GstPlayer *player
);
const gchar *
gst_player_state_get_name (GstPlayerState state
);
Gets a string representing the given state.
const gchar *
gst_player_error_get_name (GstPlayerError error
);
Gets a string representing the given error.
GstPlayerMediaInfo *
gst_player_get_media_info (GstPlayer *player
);
A Function to get the current media info GstPlayerMediaInfo instance.
GList *
gst_player_get_audio_streams (const GstPlayerMediaInfo *info
);
GList *
gst_player_get_video_streams (const GstPlayerMediaInfo *info
);
GList *
gst_player_get_subtitle_streams (const GstPlayerMediaInfo *info
);
A GList of matching GstPlayerSubtitleInfo.
[transfer none][element-type GstPlayerSubtitleInfo]
gboolean gst_player_set_audio_track (GstPlayer *player
,gint stream_index
);
gboolean gst_player_set_video_track (GstPlayer *player
,gint stream_index
);
gboolean gst_player_set_subtitle_track (GstPlayer *player
,gint stream_index
);
GstPlayerAudioInfo *
gst_player_get_current_audio_track (GstPlayer *player
);
A Function to get current audio GstPlayerAudioInfo instance.
GstPlayerVideoInfo *
gst_player_get_current_video_track (GstPlayer *player
);
A Function to get current video GstPlayerVideoInfo instance.
GstPlayerSubtitleInfo *
gst_player_get_current_subtitle_track (GstPlayer *player
);
A Function to get current subtitle GstPlayerSubtitleInfo instance.
void gst_player_set_audio_track_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the current audio track.
void gst_player_set_video_track_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the current video track.
void gst_player_set_subtitle_track_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the current subtitle track.
gboolean gst_player_set_subtitle_uri (GstPlayer *player
,const gchar *uri
);
gchar *
gst_player_get_subtitle_uri (GstPlayer *player
);
current subtitle URI
gboolean gst_player_set_visualization (GstPlayer *player
,const gchar *name
);
player |
GstPlayer instance |
|
name |
visualization element obtained from
|
void gst_player_set_visualization_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the visualization.
gchar *
gst_player_get_current_visualization (GstPlayer *player
);
GstPlayerVisualization **
gst_player_visualizations_get (void
);
a NULL
terminated array containing all available
visualizations. Use gst_player_visualizations_free()
after
usage.
[transfer full][array zero-terminated=1][element-type GstPlayerVisualization]
void
gst_player_visualizations_free (GstPlayerVisualization **viss
);
Frees a NULL
terminated array of GstPlayerVisualization.
GstPlayerVisualization *
gst_player_visualization_copy (const GstPlayerVisualization *vis
);
Makes a copy of the GstPlayerVisualization. The result must be
freed using gst_player_visualization_free()
.
void
gst_player_visualization_free (GstPlayerVisualization *vis
);
Frees GstPlayerVisualization allocated using g_new()
or
gst_player_visualization_copy()
.
const gchar *
gst_player_color_balance_type_get_name
(GstPlayerColorBalanceType type
);
Gets a string representing the given color balance type.
gboolean
gst_player_has_color_balance (GstPlayer *player
);
Checks whether the player
has color balance support available.
void gst_player_set_color_balance (GstPlayer *player
,GstPlayerColorBalanceType type
,gdouble value
);
Sets the current value of the indicated channel type
to the passed
value.
gdouble gst_player_get_color_balance (GstPlayer *player
,GstPlayerColorBalanceType type
);
Retrieve the current value of the indicated type
.
void gst_player_set_rate (GstPlayer *player
,gdouble rate
);
Playback at specified rate
GstPlayerSignalDispatcher *
gst_player_g_main_context_signal_dispatcher_new
(GMainContext *application_context
);
GstPlayerVideoRenderer *
gst_player_video_overlay_video_renderer_new
(gpointer window_handle
);
gpointer
gst_player_video_overlay_video_renderer_get_window_handle
(GstPlayerVideoOverlayVideoRenderer *self
);
void gst_player_video_overlay_video_renderer_set_window_handle (GstPlayerVideoOverlayVideoRenderer *self
,gpointer window_handle
);
Sets the platform specific window handle into which the video should be rendered
self |
GstPlayerVideoRenderer instance |
|
window_handle |
handle referencing to the platform specific window |
struct GstPlayerVisualization { gchar *name; gchar *description; };
A GstPlayerVisualization descriptor.
struct GstPlayerSignalDispatcherInterface { GTypeInterface parent_iface; void (*dispatch) (GstPlayerSignalDispatcher * self, GstPlayer * player, void (*emitter) (gpointer data), gpointer data, GDestroyNotify destroy); };
“current-audio-track”
property“current-audio-track” GstPlayerAudioInfo *
Current audio track information.
Flags: Read
“current-subtitle-track”
property“current-subtitle-track” GstPlayerSubtitleInfo *
Current audio subtitle information.
Flags: Read
“current-video-track”
property“current-video-track” GstPlayerVideoInfo *
Current video track information.
Flags: Read
“duration”
property “duration” guint64
Duration.
Flags: Read
Default value: 18446744073709551615
“position”
property “position” guint64
Current Position.
Flags: Read
Default value: 18446744073709551615
“position-update-interval”
property“position-update-interval” guint
Interval in milliseconds between two position-updated signals.Pass 0 to stop updating the position.
Flags: Read / Write
Allowed values: <= 10000
Default value: 100
“rate”
property“rate” gdouble
Playback rate.
Flags: Read / Write
Allowed values: [-64,64]
Default value: 1
“signal-dispatcher”
property“signal-dispatcher” GstPlayerSignalDispatcher *
Dispatcher for the signals to e.g. event loops.
Flags: Write / Construct Only
“suburi”
property“suburi” gchar *
Current Subtitle URI.
Flags: Read / Write
Default value: NULL
“video-renderer”
property“video-renderer” GstPlayerVideoRenderer *
Video renderer to use for rendering videos.
Flags: Write / Construct Only
“volume”
property“volume” gdouble
Volume.
Flags: Read / Write
Allowed values: [0,10]
Default value: 1
“buffering”
signalvoid user_function (GstPlayer *gstplayer, gint arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“duration-changed”
signalvoid user_function (GstPlayer *gstplayer, guint64 arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“end-of-stream”
signalvoid user_function (GstPlayer *gstplayer, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“error”
signalvoid user_function (GstPlayer *gstplayer, GError *arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“media-info-updated”
signalvoid user_function (GstPlayer *gstplayer, GstPlayerMediaInfo *arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“mute-changed”
signalvoid user_function (GstPlayer *gstplayer, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“position-updated”
signalvoid user_function (GstPlayer *gstplayer, guint64 arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“seek-done”
signalvoid user_function (GstPlayer *gstplayer, guint64 arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“state-changed”
signalvoid user_function (GstPlayer *gstplayer, GstPlayerState arg1, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“video-dimensions-changed”
signalvoid user_function (GstPlayer *gstplayer, gint arg1, gint arg2, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“volume-changed”
signalvoid user_function (GstPlayer *gstplayer, gpointer user_data)
gstplayer |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks