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 322947 - [0.11] [API] add GST_FLOW_DROPPED
[0.11] [API] add GST_FLOW_DROPPED
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-01 16:35 UTC by Wim Taymans
Modified: 2012-09-25 07:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[draft] send event on frame drop (4.98 KB, patch)
2010-01-06 15:09 UTC, Benjamin Gaignard
none Details | Review
patch to send messages on frame drop (4.93 KB, patch)
2010-01-07 09:56 UTC, Benjamin Gaignard
none Details | Review
make optional message sending (28.99 KB, patch)
2010-01-07 14:13 UTC, Benjamin Gaignard
needs-work Details | Review

Description Wim Taymans 2005-12-01 16:35:43 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.
Comment 1 Andy Wingo 2005-12-04 21:37:38 UTC
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.
Comment 2 David Schleef 2008-08-12 19:01:17 UTC
Marking as [0.11], unless someone can think of a workaround.
Comment 3 Benjamin Gaignard 2010-01-06 12:50:41 UTC
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.
Comment 4 Benjamin Gaignard 2010-01-06 15:09:06 UTC
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.
Comment 5 Wim Taymans 2010-01-06 15:21:52 UTC
what's to point of having this event? what do you want to achieve?
Comment 6 Benjamin Gaignard 2010-01-07 09:56:17 UTC
Created attachment 150966 [details] [review]
patch to send messages on frame drop 

after discussion with Wim I use message instead of event
Comment 7 Benjamin Gaignard 2010-01-07 14:13:27 UTC
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 8 Tim-Philipp Müller 2010-01-07 14:34:55 UTC
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.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-24 11:48:04 UTC
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.
Comment 10 Tobias Mueller 2010-03-26 12:49:53 UTC
Benjamin, could you answer the questions raised in comment #9? TIA!
Comment 11 Benjamin Gaignard 2010-03-26 13:06:36 UTC
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
Comment 12 Tobias Mueller 2010-03-26 13:22:37 UTC
Benjamin, thx (Reopening) :) Can we close this bug as WONTFIX then?
Comment 13 Benjamin Gaignard 2010-03-26 13:31:12 UTC
for me it is ok
you can close this bug
Comment 14 Tobias Mueller 2010-03-26 13:52:48 UTC
Closing as OBSOLETE as the usecase apparently is catered for nowadays. Feel free to revert.
Comment 15 Wim Taymans 2010-03-26 14:03:46 UTC
Reopened as the original use case is not catered for.
Comment 16 Tim-Philipp Müller 2012-06-27 16:50:03 UTC
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)
Comment 17 Tim-Philipp Müller 2012-09-24 22:55:15 UTC
Wim, can this be closed now?