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 646341 - [baseparse] Add a queued flow return so parsers can keep frames in a queue
[baseparse] Add a queued flow return so parsers can keep frames in a queue
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.33
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-31 14:24 UTC by Zaheer Abbas Merali
Modified: 2011-04-08 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add a queued flow return and to queue buffers (2.80 KB, patch)
2011-03-31 14:25 UTC, Zaheer Abbas Merali
committed Details | Review

Description Zaheer Abbas Merali 2011-03-31 14:24:41 UTC
This is useful when a parser doesn't want to send buffers out until a certain point so it would return .._QUEUED from the parse function and when the next GST_FLOW_OK comes, baseparse will push the queued frames.
Comment 1 Zaheer Abbas Merali 2011-03-31 14:25:17 UTC
Created attachment 184784 [details] [review]
patch to add a queued flow return and to queue buffers
Comment 2 Sebastian Dröge (slomo) 2011-03-31 14:37:02 UTC
Looks good, except that you should probably prepend the buffers and the either reverse the lsit before pushing or iterate the list from the tail.

Also the queued buffers should be cleared when going back to READY or when receiving flush events
Comment 3 Mark Nauwelaerts 2011-03-31 14:54:44 UTC
Looks like finalize performs a gst_mini_object_unref on the list items, which are frames rather than miniobjects.
Comment 4 Tim-Philipp Müller 2011-03-31 19:10:54 UTC
> Looks like finalize performs a gst_mini_object_unref on the list items, which
> are frames rather than miniobjects.

Also, frames that were allocated on the stack...
Comment 5 Sebastian Dröge (slomo) 2011-04-01 09:38:08 UTC
Are you going to fix this patch and integrate it? Otherwise I'll do it later and use it in flacparse
Comment 6 Tim-Philipp Müller 2011-04-01 13:14:48 UTC
I'll fix it and integrate it. Only just fixed my laptop, will try to push it all today or tomorrow.
Comment 7 Tim-Philipp Müller 2011-04-08 17:56:43 UTC
 commit 783dbb9a71045e640e93b2148adcf3a217e7546b
 Author: Zaheer Abbas Merali <zaheermerali@gmail.com>
 Date:   Sat Apr 2 13:02:01 2011 +0100

    baseparse: add GST_BASE_PARSE_FLOW_QUEUED to queue buffers until caps are known
    
    This is useful for parser like flacparse or h264parse which may need to process
    some buffers before they can construct the final caps, in which case they may
    want to delay pushing the initial buffers until the full and proper caps are
    known.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646341


 commit 251dfa402cbfa8550eac45620dcd145403828511
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Sat Apr 2 14:04:42 2011 +0100

    baseparse: use GQueue instead of GList for queued frames
    
    and make buffer metadata writable before setting caps on queued
    buffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646341
Comment 8 Tim-Philipp Müller 2011-04-08 17:57:11 UTC
Comment on attachment 184784 [details] [review]
patch to add a queued flow return and to queue buffers

committed with changes.