Clutter 0.8.2 Reference Manual | ||||
---|---|---|---|---|
ClutterMedia; ClutterMediaInterface; void clutter_media_set_uri (ClutterMedia *media, const char *uri); const char* clutter_media_get_uri (ClutterMedia *media); void clutter_media_set_playing (ClutterMedia *media, gboolean playing); gboolean clutter_media_get_playing (ClutterMedia *media); void clutter_media_set_position (ClutterMedia *media, int position); int clutter_media_get_position (ClutterMedia *media); void clutter_media_set_volume (ClutterMedia *media, double volume); double clutter_media_get_volume (ClutterMedia *media); gboolean clutter_media_get_can_seek (ClutterMedia *media); int clutter_media_get_buffer_percent (ClutterMedia *media); int clutter_media_get_duration (ClutterMedia *media); void clutter_media_set_filename (ClutterMedia *media, const gchar *filename);
"buffer-percent" gint : Read "can-seek" gboolean : Read "duration" gint : Read "playing" gboolean : Read / Write "position" gint : Read / Write "uri" gchar* : Read / Write "volume" gdouble : Read / Write
typedef struct { GTypeInterface base_iface; void (*set_uri) (ClutterMedia *media, const char *uri); const char *(*get_uri) (ClutterMedia *media); void (*set_playing) (ClutterMedia *media, gboolean playing); gboolean (*get_playing) (ClutterMedia *media); void (*set_position) (ClutterMedia *media, int position); int (*get_position) (ClutterMedia *media); void (*set_volume) (ClutterMedia *media, double volume); double (*get_volume) (ClutterMedia *media); gboolean (*can_seek) (ClutterMedia *media); int (*get_buffer_percent) (ClutterMedia *media); int (*get_duration) (ClutterMedia *media); /* signals */ void (* eos) (ClutterMedia *media); void (* error) (ClutterMedia *media, GError *error); } ClutterMediaInterface;
void clutter_media_set_uri (ClutterMedia *media, const char *uri);
Sets the URI of media
to uri
.
|
ClutterMedia object |
|
URI |
const char* clutter_media_get_uri (ClutterMedia *media);
Retrieves the URI from media
.
|
A ClutterMedia object |
Returns : |
The URI as a string. |
void clutter_media_set_playing (ClutterMedia *media, gboolean playing);
Starts or stops media
playing.
|
A ClutterMedia object |
|
TRUE to start playing, FALSE to stop. |
gboolean clutter_media_get_playing (ClutterMedia *media);
Retrieves the playing status of media
.
|
A ClutterMedia object |
Returns : |
TRUE if playing, FALSE if stopped.
|
void clutter_media_set_position (ClutterMedia *media, int position);
Sets the playback position of media
to position
.
|
A ClutterMedia object |
|
The desired position. |
int clutter_media_get_position (ClutterMedia *media);
Retrieves the position of media
.
|
A ClutterMedia object |
Returns : |
The playback position. |
void clutter_media_set_volume (ClutterMedia *media, double volume);
Sets the playback volume of media
to volume
.
|
A ClutterMedia object |
|
The volume as a double between 0.0 and 1.0 |
double clutter_media_get_volume (ClutterMedia *media);
Retrieves the playback volume of media
.
|
A ClutterMedia object |
Returns : |
The playback volume between 0.0 and 1.0 |
gboolean clutter_media_get_can_seek (ClutterMedia *media);
Retrieves whether media
is seekable or not.
|
A ClutterMedia object |
Returns : |
TRUE if media can seek, FALSE otherwise.
|
int clutter_media_get_buffer_percent (ClutterMedia *media);
Retrieves the amount of the stream that is buffered.
|
A ClutterMedia object |
Returns : |
percentage value |
int clutter_media_get_duration (ClutterMedia *media);
Retrieves the duration of the media stream that media
represents.
|
A ClutterMedia object |
Returns : |
The length of the media stream. |
void clutter_media_set_filename (ClutterMedia *media, const gchar *filename);
Sets the filename of the media source.
|
A ClutterMedia object |
|
A filename to media file. |
"buffer-percent"
property"buffer-percent" gint : Read
The percentage the current stream buffer is filled.
Allowed values: [0,100]
Default value: 0
"can-seek"
property"can-seek" gboolean : Read
TRUE if the current stream is seekable.
Default value: FALSE
"duration"
property"duration" gint : Read
The duration of the current stream in seconds.
Allowed values: >= 0
Default value: 0
"position"
property"position" gint : Read / Write
The position in the current stream in seconds.
Allowed values: >= 0
Default value: 0
"volume"
property"volume" gdouble : Read / Write
The audio volume.
Allowed values: [0,100]
Default value: 50
"eos"
signalvoid user_function (ClutterMedia *media, gpointer user_data) : Run Last
The ::eos signal is emitted each time the media stream ends.
|
the ClutterMedia instance that received the signal |
|
user data set when the signal handler was connected. |
Since 0.2
"error"
signalvoid user_function (ClutterMedia *media, gpointer error, gpointer user_data) : Run Last
The ::error signal is emitted each time an error occurred.
|
the ClutterMedia instance that received the signal |
|
the GError |
|
user data set when the signal handler was connected. |
Since 0.2