![]() |
![]() |
![]() |
GStreamer Bad Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties | Signals |
GstPlayer; GstPlayer * gst_player_new (GstPlayerVideoRenderer *video_renderer
,GstPlayerSignalDispatcher *signal_dispatcher
); void gst_player_play (GstPlayer *player
); void gst_player_pause (GstPlayer *player
); void gst_player_stop (GstPlayer *player
); void gst_player_seek (GstPlayer *player
,GstClockTime position
); void gst_player_set_uri (GstPlayer *player
,const gchar *uri
); gchar * gst_player_get_uri (GstPlayer *player
); GstClockTime gst_player_get_duration (GstPlayer *player
); GstClockTime gst_player_get_position (GstPlayer *player
); void gst_player_set_volume (GstPlayer *player
,gdouble val
); void gst_player_set_mute (GstPlayer *player
,gboolean val
); gdouble gst_player_get_volume (GstPlayer *player
); gboolean gst_player_get_mute (GstPlayer *player
); GstElement * gst_player_get_pipeline (GstPlayer *player
); void gst_player_set_position_update_interval (GstPlayer *player
,guint interval
); guint gst_player_get_position_update_interval (GstPlayer *player
); enum GstPlayerState; const gchar * gst_player_state_get_name (GstPlayerState state
); #define GST_PLAYER_ERROR enum GstPlayerError; const gchar * gst_player_error_get_name (GstPlayerError error
); GstPlayerMediaInfo * gst_player_get_media_info (GstPlayer *player
); 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
); 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
); GstPlayerVideoInfo * gst_player_get_current_video_track (GstPlayer *player
); GstPlayerSubtitleInfo * gst_player_get_current_subtitle_track (GstPlayer *player
); void gst_player_set_audio_track_enabled (GstPlayer *player
,gboolean enabled
); void gst_player_set_video_track_enabled (GstPlayer *player
,gboolean enabled
); void gst_player_set_subtitle_track_enabled (GstPlayer *player
,gboolean enabled
); gboolean gst_player_set_subtitle_uri (GstPlayer *player
,const gchar *uri
); gchar * gst_player_get_subtitle_uri (GstPlayer *player
); gboolean gst_player_set_visualization (GstPlayer *player
,const gchar *name
); void gst_player_set_visualization_enabled (GstPlayer *player
,gboolean enabled
); gchar * gst_player_get_current_visualization (GstPlayer *player
); enum GstPlayerColorBalanceType; const gchar * gst_player_color_balance_type_get_name (GstPlayerColorBalanceType type
); gboolean gst_player_has_color_balance (GstPlayer *player
); void gst_player_set_color_balance (GstPlayer *player
,GstPlayerColorBalanceType type
,gdouble value
); gdouble gst_player_get_color_balance (GstPlayer *player
,GstPlayerColorBalanceType type
); gdouble gst_player_get_rate (GstPlayer *player
); void gst_player_set_rate (GstPlayer *player
,gdouble rate
); GstPlayerSignalDispatcher; struct GstPlayerSignalDispatcherInterface; GstPlayerVideoRenderer; struct GstPlayerVideoRendererInterface;
GObject +----GInitiallyUnowned +----GstObject +----GstPlayer
GEnum +----GstPlayerState
GEnum +----GstPlayerError
GEnum +----GstPlayerColorBalanceType
GInterface +----GstPlayerSignalDispatcher
GInterface +----GstPlayerVideoRenderer
"current-audio-track" GstPlayerAudioInfo* : Read "current-subtitle-track" GstPlayerSubtitleInfo* : Read "current-video-track" GstPlayerVideoInfo* : Read "duration" guint64 : Read "media-info" GstPlayerMediaInfo* : Read "mute" gboolean : Read / Write "pipeline" GstElement* : Read "position" guint64 : Read "position-update-interval" guint : Read / Write "rate" gdouble : Read / Write "signal-dispatcher" GstPlayerSignalDispatcher* : Write / Construct Only "suburi" gchar* : Read / Write "uri" gchar* : Read / Write "video-renderer" GstPlayerVideoRenderer* : Write / Construct Only "volume" gdouble : Read / Write
"buffering" :No Hooks
"duration-changed" :No Hooks
"end-of-stream" :No Hooks
"error" :No Hooks
"media-info-updated" :No Hooks
"mute-changed" :No Hooks
"position-updated" :No Hooks
"seek-done" :No Hooks
"state-changed" :No Hooks
"video-dimensions-changed" :No Hooks
"volume-changed" :No Hooks
"warning" :No Hooks
GstPlayer * gst_player_new (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.
|
GstPlayerVideoRenderer to use. [transfer full][allow-none] |
|
GstPlayerSignalDispatcher to use. [transfer full][allow-none] |
Returns : |
a new GstPlayer instance |
void gst_player_play (GstPlayer *player
);
Request to play the loaded stream.
|
GstPlayer instance |
void gst_player_pause (GstPlayer *player
);
Pauses the current stream.
|
GstPlayer instance |
void gst_player_stop (GstPlayer *player
);
Stops playing the current stream and resets to the first position in the stream.
|
GstPlayer instance |
void gst_player_seek (GstPlayer *player
,GstClockTime position
);
Seeks the currently-playing stream to the absolute position
time
in nanoseconds.
|
GstPlayer instance |
|
position to seek in nanoseconds |
void gst_player_set_uri (GstPlayer *player
,const gchar *uri
);
Sets the next URI to play.
|
GstPlayer instance |
|
next URI to play. |
gchar * gst_player_get_uri (GstPlayer *player
);
Gets the URI of the currently-playing stream.
|
GstPlayer instance |
Returns : |
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.
|
GstPlayer instance |
Returns : |
the duration of the currently-playing media stream, in nanoseconds. |
GstClockTime gst_player_get_position (GstPlayer *player
);
|
GstPlayer instance |
Returns : |
the absolute position time, in nanoseconds, of the currently-playing stream. |
void gst_player_set_volume (GstPlayer *player
,gdouble val
);
Sets the volume level of the stream as a percentage between 0 and 1.
|
GstPlayer instance |
|
the new volume level, 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.
|
GstPlayer instance |
|
Mute state the should be set |
gdouble gst_player_get_volume (GstPlayer *player
);
Returns the current volume level, as a percentage between 0 and 1.
|
GstPlayer instance |
Returns : |
the volume as percentage between 0 and 1. |
gboolean gst_player_get_mute (GstPlayer *player
);
|
GstPlayer instance |
Returns : |
TRUE if the currently-playing stream is muted. |
GstElement * gst_player_get_pipeline (GstPlayer *player
);
|
GstPlayer instance |
Returns : |
The internal playbin instance. [transfer full] |
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.
|
GstPlayer instance |
|
interval in ms |
guint gst_player_get_position_update_interval
(GstPlayer *player
);
|
GstPlayer instance |
Returns : |
current position update interval in milliseconds |
typedef enum { GST_PLAYER_STATE_STOPPED, GST_PLAYER_STATE_BUFFERING, GST_PLAYER_STATE_PAUSED, GST_PLAYER_STATE_PLAYING } GstPlayerState;
const gchar * gst_player_state_get_name (GstPlayerState state
);
Gets a string representing the given state.
|
a GstPlayerState |
Returns : |
a string with the name of the state. [transfer none] |
const gchar * gst_player_error_get_name (GstPlayerError error
);
Gets a string representing the given error.
|
a GstPlayerError |
Returns : |
a string with the given error. [transfer none] |
GstPlayerMediaInfo * gst_player_get_media_info (GstPlayer *player
);
A Function to get the current media info GstPlayerMediaInfo instance.
|
GstPlayer instance |
Returns : |
media info instance.
The caller should free it with g_object_unref() . [transfer full]
|
GList * gst_player_get_audio_streams (const GstPlayerMediaInfo *info
);
|
a GstPlayerMediaInfo |
Returns : |
A GList of matching GstPlayerAudioInfo. [transfer none][element-type GstPlayerAudioInfo] |
GList * gst_player_get_video_streams (const GstPlayerMediaInfo *info
);
|
a GstPlayerMediaInfo |
Returns : |
A GList of matching GstPlayerVideoInfo. [transfer none][element-type GstPlayerVideoInfo] |
GList * gst_player_get_subtitle_streams (const GstPlayerMediaInfo *info
);
|
a GstPlayerMediaInfo |
Returns : |
A GList of matching GstPlayerSubtitleInfo. [transfer none][element-type GstPlayerSubtitleInfo] |
gboolean gst_player_set_audio_track (GstPlayer *player
,gint stream_index
);
|
GstPlayer instance |
|
stream index |
Returns : |
TRUE or FALSE
Sets the audio track stream_idex . |
gboolean gst_player_set_video_track (GstPlayer *player
,gint stream_index
);
|
GstPlayer instance |
|
stream index |
Returns : |
TRUE or FALSE
Sets the video track stream_index . |
gboolean gst_player_set_subtitle_track (GstPlayer *player
,gint stream_index
);
|
GstPlayer instance |
|
stream index |
Returns : |
TRUE or FALSE
Sets the subtitle strack stream_index . |
GstPlayerAudioInfo * gst_player_get_current_audio_track (GstPlayer *player
);
A Function to get current audio GstPlayerAudioInfo instance.
|
GstPlayer instance |
Returns : |
current audio track.
The caller should free it with g_object_unref() . [transfer full]
|
GstPlayerVideoInfo * gst_player_get_current_video_track (GstPlayer *player
);
A Function to get current video GstPlayerVideoInfo instance.
|
GstPlayer instance |
Returns : |
current video track.
The caller should free it with g_object_unref() . [transfer full]
|
GstPlayerSubtitleInfo * gst_player_get_current_subtitle_track
(GstPlayer *player
);
A Function to get current subtitle GstPlayerSubtitleInfo instance.
|
GstPlayer instance |
Returns : |
current subtitle track.
The caller should free it with g_object_unref() . [transfer none]
|
void gst_player_set_audio_track_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the current audio track.
|
GstPlayer instance |
|
TRUE or FALSE |
void gst_player_set_video_track_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the current video track.
|
GstPlayer instance |
|
TRUE or FALSE |
void gst_player_set_subtitle_track_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the current subtitle track.
|
GstPlayer instance |
|
TRUE or FALSE |
gboolean gst_player_set_subtitle_uri (GstPlayer *player
,const gchar *uri
);
|
GstPlayer instance |
|
subtitle URI |
Returns : |
TRUE or FALSE
Sets the external subtitle URI. |
gchar * gst_player_get_subtitle_uri (GstPlayer *player
);
current subtitle URI
|
GstPlayer instance |
Returns : |
URI of the current external subtitle.
g_free() after usage. [transfer full]
|
gboolean gst_player_set_visualization (GstPlayer *player
,const gchar *name
);
|
GstPlayer instance |
|
visualization element obtained from
#gst_player_visualizations_get()
|
Returns : |
TRUE if the visualizations was set correctly. Otherwise,
FALSE . |
void gst_player_set_visualization_enabled (GstPlayer *player
,gboolean enabled
);
Enable or disable the visualization.
|
GstPlayer instance |
|
TRUE or FALSE |
gchar * gst_player_get_current_visualization
(GstPlayer *player
);
|
GstPlayer instance |
Returns : |
Name of the currently enabled visualization.
g_free() after usage. [transfer full]
|
typedef enum { GST_PLAYER_COLOR_BALANCE_BRIGHTNESS, GST_PLAYER_COLOR_BALANCE_CONTRAST, GST_PLAYER_COLOR_BALANCE_SATURATION, GST_PLAYER_COLOR_BALANCE_HUE, } GstPlayerColorBalanceType;
const gchar * gst_player_color_balance_type_get_name
(GstPlayerColorBalanceType type
);
Gets a string representing the given color balance type.
|
a GstPlayerColorBalanceType |
Returns : |
a string with the name of the color balance type. [transfer none] |
gboolean gst_player_has_color_balance (GstPlayer *player
);
Checks whether the player
has color balance support available.
|
GstPlayer instance |
Returns : |
TRUE if player has color balance support. Otherwise,
FALSE . |
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.
|
GstPlayer instance |
|
GstPlayerColorBalanceType |
|
The new value for the type , ranged [0,1] |
gdouble gst_player_get_color_balance (GstPlayer *player
,GstPlayerColorBalanceType type
);
Retrieve the current value of the indicated type
.
|
GstPlayer instance |
|
GstPlayerColorBalanceType |
Returns : |
The current value of type , between [0,1]. In case of
error -1 is returned. |
gdouble gst_player_get_rate (GstPlayer *player
);
|
GstPlayer instance |
Returns : |
current playback rate |
void gst_player_set_rate (GstPlayer *player
,gdouble rate
);
Playback at specified rate
|
GstPlayer instance |
|
playback rate |
struct GstPlayerSignalDispatcherInterface { GTypeInterface parent_iface; void (*dispatch) (GstPlayerSignalDispatcher * self, GstPlayer * player, GstPlayerSignalDispatcherFunc emitter, gpointer data, GDestroyNotify destroy); };
"current-audio-track"
property"current-audio-track" GstPlayerAudioInfo* : Read
Current audio track information.
"current-subtitle-track"
property"current-subtitle-track" GstPlayerSubtitleInfo* : Read
Current audio subtitle information.
"current-video-track"
property"current-video-track" GstPlayerVideoInfo* : Read
Current video track information.
"position"
property "position" guint64 : Read
Current Position.
Default value: 18446744073709551615
"position-update-interval"
property "position-update-interval" guint : Read / Write
Interval in milliseconds between two position-updated signals.Pass 0 to stop updating the position.
Allowed values: <= 10000
Default value: 100
"rate"
property "rate" gdouble : Read / Write
Playback rate.
Allowed values: [-64,64]
Default value: 1
"signal-dispatcher"
property"signal-dispatcher" GstPlayerSignalDispatcher* : Write / Construct Only
Dispatcher for the signals to e.g. event loops.
"video-renderer"
property"video-renderer" GstPlayerVideoRenderer* : Write / Construct Only
Video renderer to use for rendering videos.
"buffering"
signalvoid user_function (GstPlayer *gstplayer,
gint arg1,
gpointer user_data) : No Hooks
"duration-changed"
signalvoid user_function (GstPlayer *gstplayer,
guint64 arg1,
gpointer user_data) : No Hooks
"error"
signalvoid user_function (GstPlayer *gstplayer,
GError *arg1,
gpointer user_data) : No Hooks
"media-info-updated"
signalvoid user_function (GstPlayer *gstplayer,
GstPlayerMediaInfo *arg1,
gpointer user_data) : No Hooks
"position-updated"
signalvoid user_function (GstPlayer *gstplayer,
guint64 arg1,
gpointer user_data) : No Hooks
"seek-done"
signalvoid user_function (GstPlayer *gstplayer,
guint64 arg1,
gpointer user_data) : No Hooks
"state-changed"
signalvoid user_function (GstPlayer *gstplayer,
GstPlayerState arg1,
gpointer user_data) : No Hooks
"video-dimensions-changed"
signalvoid user_function (GstPlayer *gstplayer,
gint arg1,
gint arg2,
gpointer user_data) : No Hooks
"volume-changed"
signalvoid user_function (GstPlayer *gstplayer,
gpointer user_data) : No Hooks
"warning"
signalvoid user_function (GstPlayer *gstplayer,
GError *arg1,
gpointer user_data) : No Hooks