GNOME Bugzilla – Bug 320113
[API] duration message changes
Last modified: 2005-11-21 10:46:16 UTC
(1) Rename GST_MESSAGE_DURATION => GST_MESSAGE_DURATION_CHANGED (2) GstMessage * gst_message_new_duration (GstObject *src, GstFormat format, gint64 duration); becomes GstMessage * gst_message_new_duration_changed (GstObject *src); (3) void gst_message_parse_duration (GstMessage *message, GstFormat *format, gint64 *duration); isn't required any longer. <wtay> __tim, duration queries can be quite expensive <wtay> __tim, I don't want to app to poll for it but get a notify when it changed, then let the app choose how many times it performs the expensive work <__tim> so if it's expensive, the element posts a DURATION message with duration = -1 ? <wtay> __tim, actually the value in the message is not used <wtay> __tim, it's in the API but it's not usable in the end <wtay> __tim, the purpose of the message is to notify that the duration changed and the exact new value can be retrieved with a query Cheers -Tim
the duration message is used internally to replay to duration queries much faster, the previous duration is stored in the message so we cannot remove it. We could add a DURATION_CHANGED message in addition to the existing DURATION message but that seems silly.
Alright, leaving the API as is then and updated the documentation to reflect intended usage.
yep, last CVS commit is the best.