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.
Bug 1474 - ClutterMedia interface
The GET_INTERFACE() macro is still using the old type name of
the ClutterMedia interface structure in the cast.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
ClutterMedia was a rough cut at a simple media API; it needs some
re-evaluation before 1.0 in order to keep it simple to use, and
simple to implement.
- ClutterMedia:position
The position property accessors collide with the corresponding
ClutterActor methods, which make it impossible to bind them in
high-level languages:
video_texture.set_position()
video_texture.get_position()
In order to resolve the collision, we have to go through the
GObject properties API:
video_texture.set('position', value)
value = video_texture.get('position')
A :position in seconds is also a GStreamer-ism, and should rather
be converted to a :progress property, with a normalized value
between 0 and 1. the current position in seconds would then simply
be progress*duration. For non-seekable streams, 0.0 would always
be returned. This makes it easier to use the progress inside
animations, Timelines or ClutterPath instances.
- ClutterMedia:volume should be renamed to :audio-volume and normalized
as well, instead of being a floating point value between 0 and 100.
- ClutterMedia:buffer-percent should just be :buffer-fill and normalized
between 0.0 and 1.0
* clutter/clutter-alpha.h:
* clutter/clutter-alpha.c: Add a data parameter to
the ClutterAlphaFunc; add a data+destroy parameter
to clutter_alpha_set_func() and to clutter_alpha_new(),
and turned the latter into clutter_alpha_new_full();
add a simple, empty constructor clutter_alpha_new().
These changes makes writing bindings a tad more easy,
as bindings require passing their own functions in
order to call the real alpha function.
* clutter/clutter-behaviour.h: Clean up the header.
* clutter/clutter-behaviours.[ch]:
* clutter/clutter-behaviour-opacity.[ch]:
* clutter/clutter-behaviour-path.[ch]:
* clutter/clutter-behaviour-scale.[ch]: Split the
ClutterBehaviourPath, ClutterBehaviourOpacity and
ClutterBehaviourScale into their own files as they
have been growing a bit. Fix ClutterBehaviourPath
API.
* clutter/clutter-media.h: Remove the commented
"metadata_available" signal: gtk-doc chokes up on that.
* clutter/clutter-timeline.h:
* clutter/clutter-timeline.c: Remove the useless
ClutterTimelineAlphaFunc signature; add missing accessor
methods for the properties; clean up a bit.
* clutter/clutter-util.h:
* clutter/clutter-util.c: Remove unneeded function
clutter_util_can_create_texture().
* clutter/clutter-feature.h: Sync the name of
clutter_feature_get_all() with the name declared
in clutter-feature.h.
* clutter/Makefile.am:
* clutter/clutter.h: Update.
* examples/behave.c: Update to the new ClutterAlpha
constructor.
* examples/super-oh.c: Use the right pointer and avoid
the compiler making a fuss about it.