Top |
ClutterGstFrame *
clutter_gst_player_get_frame (ClutterGstPlayer *self
);
Retrieves the ClutterGstFrame of the last frame produced by self
.
Since: 3.0
GstElement *
clutter_gst_player_get_pipeline (ClutterGstPlayer *self
);
Retrieves the GstPipeline used by the self
, for direct use with
GStreamer API.
Since: 3.0
ClutterGstVideoSink *
clutter_gst_player_get_video_sink (ClutterGstPlayer *self
);
Retrieves the ClutterGstVideoSink used by the self
.
Since: 3.0
gboolean
clutter_gst_player_get_idle (ClutterGstPlayer *self
);
Get the idle state of the pipeline.
Since: 3.0
gboolean
clutter_gst_player_get_playing (ClutterGstPlayer *self
);
Retrieves the playing status of self
.
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.
Since: 3.0
gdouble
clutter_gst_player_get_audio_volume (ClutterGstPlayer *self
);
Retrieves the playback volume of self
.
Since: 3.0
void clutter_gst_player_set_audio_volume (ClutterGstPlayer *self
,gdouble volume
);
Sets the playback volume of self
to volume
.
Since: 3.0
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); ClutterGstVideoSink *(* 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 ClutterGst 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
“audio-volume”
property“audio-volume” gdouble
The volume of the audio, as a normalized value between 0.0 and 1.0.
Flags: Read / Write
Allowed values: [0,1]
Default value: 0.5
“idle”
property“idle” gboolean
Whether the ClutterGstPlayer is in idle mode.
Flags: Read
Default value: TRUE
Since: 1.4
“playing”
property“playing” gboolean
Whether the ClutterGstPlayer actor is playing.
Flags: Read / Write
Default value: FALSE
“eos”
signalvoid user_function (ClutterGstPlayer *player, gpointer user_data)
The ::eos signal is emitted each time the media stream ends.
player |
the ClutterGstPlayer instance that received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“error”
signalvoid user_function (ClutterGstPlayer *player, GError *error, gpointer user_data)
The ::error signal is emitted each time an error occurred.
player |
the ClutterGstPlayer instance that received the signal |
|
error |
the GError |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“new-frame”
signalvoid user_function (ClutterGstPlayer *player, ClutterGstFrame *frame, gpointer user_data)
The ::new-frame signal is emitted each time a frame is received from the video sink.
player |
the ClutterGstPlayer instance that received the signal |
|
frame |
the ClutterGstFrame newly received from the video sink |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“ready”
signalvoid user_function (ClutterGstPlayer *player, gpointer user_data)
The ::ready signal is emitted each time the gstreamer pipeline becomes ready.
player |
the ClutterGstPlayer instance that received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“size-change”
signalvoid user_function (ClutterGstPlayer *player, gint width, gint height, gpointer user_data)
The ::size-change signal is emitted each time the new frame has different dimensions to the previous frame.
player |
the ClutterGstPlayer instance that received the signal |
|
width |
new width of the frames |
|
height |
new height of the frames |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last