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 797218 - queuearray: Add set_clear_func and clear functions
queuearray: Add set_clear_func and clear functions
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 787922
 
 
Reported: 2018-09-27 14:31 UTC by Vivia Nikolaidou
Modified: 2018-10-15 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
queuearray: Add set_clear_func and clear functions (3.59 KB, patch)
2018-09-27 14:31 UTC, Vivia Nikolaidou
none Details | Review
queuearray: Add set_clear_func and clear functions (3.59 KB, patch)
2018-09-27 16:30 UTC, Vivia Nikolaidou
none Details | Review
queuearray: Add set_clear_func and clear functions (4.08 KB, patch)
2018-09-27 16:31 UTC, Vivia Nikolaidou
committed Details | Review

Description Vivia Nikolaidou 2018-09-27 14:31:49 UTC
See commit message
Comment 1 Vivia Nikolaidou 2018-09-27 14:31:55 UTC
Created attachment 373791 [details] [review]
queuearray: Add set_clear_func and clear functions

gst_queue_array_clear will clear the GstQueueArray,
gst_queue_array_set_clear_func will set a clear function for each
element to be called on _clear and on _free.
Comment 2 Sebastian Dröge (slomo) 2018-09-27 14:56:11 UTC
Review of attachment 373791 [details] [review]:

Looks good but the new functions should be added to the docs (docs/libs/*-sections.txt)
Comment 3 Vivia Nikolaidou 2018-09-27 16:30:22 UTC
Created attachment 373795 [details] [review]
queuearray: Add set_clear_func and clear functions

gst_queue_array_clear will clear the GstQueueArray,
gst_queue_array_set_clear_func will set a clear function for each
element to be called on _clear and on _free.
Comment 4 Vivia Nikolaidou 2018-09-27 16:31:28 UTC
Created attachment 373796 [details] [review]
queuearray: Add set_clear_func and clear functions

gst_queue_array_clear will clear the GstQueueArray,
gst_queue_array_set_clear_func will set a clear function for each
element to be called on _clear and on _free.
Comment 5 Vivia Nikolaidou 2018-09-27 16:33:30 UTC
Review of attachment 373796 [details] [review]:

commit 22d0f407168d1c64621218b29f481f0346b4f59c (HEAD -> upstream_master, upstream/master)
Author: Vivia Nikolaidou <vivia@ahiru.eu>
Date:   Thu Sep 27 17:30:25 2018 +0300

    queuearray: Add set_clear_func and clear functions

    gst_queue_array_clear will clear the GstQueueArray,
    gst_queue_array_set_clear_func will set a clear function for each
    element to be called on _clear and on _free.

    https://bugzilla.gnome.org/show_bug.cgi?id=797218
Comment 6 Sebastian Dröge (slomo) 2018-10-15 12:30:04 UTC
This one was missing, dropping an item did not clear it. Now clear(), free() and drop() is going to call the clear function, while pop() is not, and all other functions are not removing an item from the queue.


commit 2481e542c76f1392f577b8daff05fdcba324597c (HEAD -> master)
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Oct 15 15:24:07 2018 +0300

    queuearray: Clear items when dropping them and a clear function was defined