[Bug 782556] Custom memory allocator for decklinkvideosrc

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue May 16 12:37:51 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=782556

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #351714|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 351714:
 --> (https://bugzilla.gnome.org/review?bug=782556&attachment=351714)

::: sys/decklink/gstdecklink.cpp
@@ +943,3 @@
+      pool->bufferSize = bufferSize;
+      pool->nonEmptyCalls = 0;
+      pool->buffers = gst_queue_array_new (5);

You probably want to move all this into a proper constructor for
DecklinkBufferPool

@@ +985,3 @@
+    /* Put the buffer back to the pool */
+    DecklinkBufferPool * pool = *(DecklinkBufferPool **) ((uint8_t*)buffer -
128);
+    gst_queue_array_push_tail (pool->buffers, buffer);

If allocation sizes are changing, you will never release old buffers until
Decommit() and also not the DecklinkBufferPool. There is no code that checks
other sizes, only code that releases too many buffers in the current size.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list