After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628014 - Deprecate GST_FLOW_IS_FATAL/GST_FLOW_IS_SUCCESS
Deprecate GST_FLOW_IS_FATAL/GST_FLOW_IS_SUCCESS
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-26 09:27 UTC by Sebastian Dröge (slomo)
Modified: 2010-08-27 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2010-08-26 09:27:47 UTC
As we've seen yesterday (bug #627946) GST_FLOW_IS_FATAL can easily be misused.
I'd propose to deprecate it and also deprecate GST_FLOW_IS_SUCCESS while we're at it.

The problem with both macros is, that they suggest something that isn't true. If GST_FLOW_IS_FATAL is true, there could still be a problem for many elements and they should stop what they're currently doing and return that value upstream (e.g. not-linked in a parser). If GST_FLOW_IS_SUCCESS is false, it could still be that this is "ok" for the element (e.g. not-linked for a demuxer on a few of its pads but not all).

It's better to not have these "convenience" macros but instead let people *think* about the handling of different flow returns, that makes sense for their element. And we should document the expected handling of flow returns for different classes of elements in the plugin writer's guide.

Patch to deprecate the macros comes later
Comment 1 Wim Taymans 2010-08-26 09:37:48 UTC
yes!
Comment 2 Sebastian Dröge (slomo) 2010-08-27 17:03:03 UTC
Done... and patches for all non-frozen modules pushed (good/bad/ugly will be pushed immediately after release).


commit d7f59ca0c4d14b658331c7a80bc99efcdee05d19
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Aug 26 23:07:51 2010 +0200

    pad: Deprecate GST_FLOW_IS_FATAL() and GST_FLOW_IS_SUCCESS()
    
    The problem with both macros is, that they suggest something that isn't true.
    If GST_FLOW_IS_FATAL is true, there could still be a problem for many elements
    and they should stop what they're currently doing and return that value
    upstream (e.g. not-linked in a parser). If GST_FLOW_IS_SUCCESS is false, it
    could still be that this is "ok" for the element (e.g. not-linked for a demuxer
    on a few of its pads but not all).
    
    It's better to not have these "convenience" macros but instead let people
    *think* about the handling of different flow returns, that makes sense for
    their element. And we should document the expected handling of flow returns for
    different classes of elements in the plugin writer's guide.
    
    Fixes bug #628014.