GNOME Bugzilla – Bug 322947
[0.11] [API] add GST_FLOW_DROPPED
Last modified: 2012-09-25 07:19:07 UTC
Add a non-fatal GstFlowReturn GST_FLOW_DROPPED to indicate that a buffer was dropped. Main usage would be in BaseTransform and BaseSink when they do quality control or do clipping around segment boundaries.
This would not be an API bug if it were possible to add new nonfatal errors (like UNLINKED). As it is there is no space. We should certainly make space between UNEXPECTED and WRONG_STATE in gstpad.h.
Marking as [0.11], unless someone can think of a workaround.
Could we imaging to send an event on the bus ? maybe a new event (something like GST_EVENT_FRAME_DROP) with in argument the timestamps of the frame.
Created attachment 150895 [details] [review] [draft] send event on frame drop is it a draft to illustrate what I have to do on frame drop.
what's to point of having this event? what do you want to achieve?
Created attachment 150966 [details] [review] patch to send messages on frame drop after discussion with Wim I use message instead of event
Created attachment 150974 [details] [review] make optional message sending add an option in basesink and basetransform to enable/disable message I use gst-indent on the files so the patch isn't easy readable
Comment on attachment 150974 [details] [review] make optional message sending Please never use gst-indent on header files, only on .c files. Also, the API (properties, functions) would need to be named in a way that makes it clear that what's being enabled/disabled here is the posting of messages, not frame dropping itself. I can't say I'm particularly convinced this is worthwhile API to add in this way; it's very limited in the form you propose.
Is the usecase just checking if there are dropped frames? When I suggested similar API addition in Bug #353680, it was rejected for several reasons. Since that I work on a LD_PRELOAD library for monitoring gstreamer as needed without that I need to patch gstreamer itself. Benjamin, maybe that could be an option for you too.
Benjamin, could you answer the questions raised in comment #9? TIA!
My application need to be inform when a frame is drop. I can't use the way describe by Stefan because I don't start my pipeline in command line. With Wim and Robert we have found a generic solution, using qos event, for this problem and the implementation is now in -core. The latest commit from Robert: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=9b6f93dcf3e4e7c9c8111e095972f53624c61eaf
Benjamin, thx (Reopening) :) Can we close this bug as WONTFIX then?
for me it is ok you can close this bug
Closing as OBSOLETE as the usecase apparently is catered for nowadays. Feel free to revert.
Reopened as the original use case is not catered for.
Wim, do you still want a generic flow for this? Otherwise we seem to have: GST_BASE_PARSE_FLOW_DROPPED GST_BASE_TRANSFORM_FLOW_DROPPED GST_VIDEO_ENCODER_FLOW_DROPPED (and misc "drop frame" API in baseclasses)
Wim, can this be closed now?