Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties | Signals | ![]() |
![]() |
![]() |
![]() |
ClutterGstPlayer; struct ClutterGstPlayerIface; ClutterGstFrame * clutter_gst_player_get_frame (ClutterGstPlayer *self
); GstElement * clutter_gst_player_get_pipeline (ClutterGstPlayer *self
); CoglGstVideoSink * clutter_gst_player_get_video_sink (ClutterGstPlayer *self
); gboolean clutter_gst_player_get_idle (ClutterGstPlayer *self
); gboolean clutter_gst_player_get_playing (ClutterGstPlayer *self
); void clutter_gst_player_set_playing (ClutterGstPlayer *self
,gboolean playing
); gdouble clutter_gst_player_get_audio_volume (ClutterGstPlayer *self
); void clutter_gst_player_set_audio_volume (ClutterGstPlayer *self
,gdouble volume
);
"audio-volume" gdouble : Read / Write "idle" gboolean : Read "playing" gboolean : Read / Write
"eos" :Run Last
"error" :Run Last
"new-frame" :Run Last
"ready" :Run Last
"size-change" :Run Last
typedef struct _ClutterGstPlayer ClutterGstPlayer;
ClutterGstPlayer is an opaque structure whose members cannot be directly accessed
Since 1.4
struct ClutterGstPlayerIface { ClutterGstFrame * (* get_frame) (ClutterGstPlayer *self); GstElement * (* get_pipeline) (ClutterGstPlayer *self); CoglGstVideoSink *(* get_video_sink) (ClutterGstPlayer *self); gboolean (* get_idle) (ClutterGstPlayer *self); gdouble (* get_audio_volume) (ClutterGstPlayer *self); void (* set_audio_volume) (ClutterGstPlayer *self, gdouble volume); gboolean (* get_playing) (ClutterGstPlayer *self); void (* set_playing) (ClutterGstPlayer *self, gboolean playing); /* signals */ void (* new_frame) (ClutterGstPlayer *self, ClutterGstFrame *frame); void (* ready) (ClutterGstPlayer *self); void (* eos) (ClutterGstPlayer *self); void (* error) (ClutterGstPlayer *self, const GError *error); void (* size_change) (ClutterGstPlayer *self, gint width, gint height); };
Interface vtable for ClutterGstPlayer implementations
virtual function; returns the current visible frame | |
virtual function; returns the current GStreamer pipeline | |
virtual function; returns the current Cogl video sink | |
virtual function; returns whether the player is currently in idle state | |
virtual function; returns the current audio volume | |
virtual function; sets the audio volume | |
virtual function; returns whether the player is currently playing | |
virtual function; starts or stops the player from playing | |
signal class closure for "new-frame" | |
signal class closure for "ready" | |
signal class closure for "eos" | |
signal class closure for "error" | |
signal class closure for "size-change" |
Since 1.4
ClutterGstFrame * clutter_gst_player_get_frame (ClutterGstPlayer *self
);
Retrieves the CoglHandle of the last frame produced by self
.
|
a ClutterGstPlayer |
Returns : |
the CoglHandle of the last frame. [transfer none] |
Since 3.0
GstElement * clutter_gst_player_get_pipeline (ClutterGstPlayer *self
);
Retrieves the GstPipeline used by the self
, for direct use with
GStreamer API.
|
a ClutterGstPlayer |
Returns : |
the GstPipeline element used by the player. [transfer none] |
Since 3.0
CoglGstVideoSink * clutter_gst_player_get_video_sink (ClutterGstPlayer *self
);
Retrieves the CoglGstVideoSink used by the self
.
|
a ClutterGstPlayer |
Returns : |
the CoglGstVideoSink element used by the player. [transfer none] |
Since 3.0
gboolean clutter_gst_player_get_idle (ClutterGstPlayer *self
);
Get the idle state of the pipeline.
|
a ClutterGstPlayer |
Returns : |
TRUE if the pipline is in idle mode, FALSE otherwise. |
Since 3.0
gboolean clutter_gst_player_get_playing (ClutterGstPlayer *self
);
Retrieves the playing status of self
.
|
A ClutterGstPlayer object |
Returns : |
TRUE if playing, FALSE if stopped. |
Since 3.0
void clutter_gst_player_set_playing (ClutterGstPlayer *self
,gboolean playing
);
Starts or stops playing of self
.
The implementation might be asynchronous, so the way to know whether
the actual playing state of the self
is to use the "notify"
signal on the "playing" property and then retrieve the
current state with clutter_gst_player_get_playing()
. ClutterGstVideoActor
in clutter-gst is an example of such an asynchronous implementation.
|
a ClutterGstPlayer |
|
TRUE to start playing |
Since 3.0
gdouble clutter_gst_player_get_audio_volume (ClutterGstPlayer *self
);
Retrieves the playback volume of self
.
|
a ClutterGstPlayer |
Returns : |
The playback volume between 0.0 and 1.0 |
Since 3.0
void clutter_gst_player_set_audio_volume (ClutterGstPlayer *self
,gdouble volume
);
Sets the playback volume of self
to volume
.
|
a ClutterGstPlayer |
|
the volume as a double between 0.0 and 1.0 |
Since 3.0
"audio-volume"
property "audio-volume" gdouble : Read / Write
The volume of the audio, as a normalized value between 0.0 and 1.0.
Allowed values: [0,1]
Default value: 0.5
"idle"
property "idle" gboolean : Read
Whether the ClutterGstPlayer is in idle mode.
Default value: TRUE
Since 1.4
"playing"
property "playing" gboolean : Read / Write
Whether the ClutterGstPlayer actor is playing.
Default value: FALSE
"eos"
signalvoid user_function (ClutterGstPlayer *player,
gpointer user_data) : Run Last
The ::eos signal is emitted each time the media stream ends.
|
the ClutterGstPlayer instance that received the signal |
|
user data set when the signal handler was connected. |
"error"
signalvoid user_function (ClutterGstPlayer *player,
GError *error,
gpointer user_data) : Run Last
The ::error signal is emitted each time an error occurred.
|
the ClutterGstPlayer instance that received the signal |
|
the GError |
|
user data set when the signal handler was connected. |
"new-frame"
signalvoid user_function (ClutterGstPlayer *player,
ClutterGstFrame *frame,
gpointer user_data) : Run Last
The ::ready signal is emitted each time the gstreamer pipeline becomes ready.
|
the ClutterGstPlayer instance that received the signal |
|
the ClutterGstFrame newly receive from the video sink |
|
user data set when the signal handler was connected. |
"ready"
signalvoid user_function (ClutterGstPlayer *player,
gpointer user_data) : Run Last
The ::ready signal is emitted each time the gstreamer pipeline becomes ready.
|
the ClutterGstPlayer instance that received the signal |
|
user data set when the signal handler was connected. |
"size-change"
signalvoid user_function (ClutterGstPlayer *player,
gint width,
gint height,
gpointer user_data) : Run Last
The ::size-change signal is emitted each time the gstreamer pipeline becomes ready.
|
the ClutterGstPlayer instance that received the signal |
|
new width of the frames |
|
new height of the frames |
|
user data set when the signal handler was connected. |