The duration in ClutterMedia is currently expressed in integer multiples
of a second. This does not offer enough granularity for media playback
that has fractionary durations -- 2.3 seconds; 1 minute, 23.4 seconds;
1 hour, 23 minutes, 4.5 seconds; etc.
The duration value should be expressed in seconds with a sub-second
granularity; for this reason, a double should be used insted of an
unsigned integer.
The semantics haven't changed: the :duration property still exposes
seconds.
*
* Since: 0.2
*/
- pspec = g_param_spec_uint ("duration",
- "Duration",
- "The duration of the stream, in seconds",
- 0, G_MAXUINT, 0,
- CLUTTER_PARAM_READABLE);
+ pspec = g_param_spec_double ("duration",
+ "Duration",
+ "The duration of the stream, in seconds",
+ 0, G_MAXDOUBLE, 0,
+ CLUTTER_PARAM_READABLE);
g_object_interface_install_property (g_iface, pspec);
/**
*
* Since: 0.2
*/
-guint
+gdouble
clutter_media_get_duration (ClutterMedia *media)
{
- guint retval = 0;
+ gdouble retval = 0;
g_return_val_if_fail (CLUTTER_IS_MEDIA(media), 0);
gdouble clutter_media_get_audio_volume (ClutterMedia *media);
gboolean clutter_media_get_can_seek (ClutterMedia *media);
gdouble clutter_media_get_buffer_fill (ClutterMedia *media);
-guint clutter_media_get_duration (ClutterMedia *media);
+gdouble clutter_media_get_duration (ClutterMedia *media);
G_END_DECLS