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 796483 - queue2: use GstQueueArray and static allocation instead of GQueue
queue2: use GstQueueArray and static allocation instead of GQueue
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-02 12:07 UTC by Dimitrios Katsaros
Modified: 2018-06-04 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch (4.97 KB, patch)
2018-06-02 12:09 UTC, Dimitrios Katsaros
committed Details | Review

Description Dimitrios Katsaros 2018-06-02 12:07:45 UTC
I have noticed that queue2 is still using GQueues and the slice allocator in the case where it is being used as a queue. I have made a simple patch updating it to use gstqueue array and static memory instead.
Comment 1 Dimitrios Katsaros 2018-06-02 12:09:09 UTC
Created attachment 372519 [details] [review]
The patch
Comment 2 Tim-Philipp Müller 2018-06-04 10:12:03 UTC
Thanks!

Pushed with two minor style changes (new lines after variable declaration) and an equally arbitrary but lower default size of 32 instead of MAX_BUFFERS*3

commit ac7f8b633720d1ec4c4c7fdfddf04a90d8db8841 (HEAD -> master)
Author: Dimitrios Katsaros <patcherwork@gmail.com>
Date:   Sat Jun 2 14:02:19 2018 +0200

    queue2: use GstQueueArray
    
    When using queue2 as a queue it was using GQueue with
    individually allocated queue items, so two allocs for
    each item. With GstQueueArray we can avoid those.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796483