[Bug 782556] decklinkvideosrc: Implement a custom memory allocator

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 4 06:49:25 UTC 2017


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

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

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

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

Generally looks good

::: sys/decklink/gstdecklink.cpp
@@ +872,3 @@
+
+    while (gst_queue_array_get_length (m_buffers))
+    {

Code style: opening { for if/for/while on the same line, only for
functions/structs in a separate line. Same for other places too in this patch

@@ +889,3 @@
+    g_mutex_init (&m_mutex);
+
+    m_buffers = gst_queue_array_new (60);

Why not a C++ vector anymore? But this also works of course

@@ +952,3 @@
+    if (gst_queue_array_get_length (m_buffers) > 0)
+    {
+      buf = (uint8_t*) gst_queue_array_pop_head (m_buffers);

Just pop() here without checking if there is an actual buffer. It will return
NULL if there isn't

-- 
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