[Bug 704760] opencv: disparity-map calculation element
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Jul 28 08:21:59 PDT 2013
https://bugzilla.gnome.org/show_bug.cgi?id=704760
GStreamer | gst-plugins-bad | 1.x
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #250212|none |needs-work
status| |
--- Comment #5 from Sebastian Dröge (slomo) <slomo at circular-chaos.org> 2013-07-28 15:21:56 UTC ---
Review of attachment 250212:
--> (https://bugzilla.gnome.org/review?bug=704760&attachment=250212)
You'll have to implement a query function on the sinkpads, and there do the
CAPS query handling as described above (proxy if no caps set, set caps if caps
are set)
::: ext/opencv/gstdisparity.cpp
@@ +185,2 @@
G_DEFINE_TYPE (GstDisparity, gst_disparity, GST_TYPE_ELEMENT);
+static GstElementClass *parent_class = NULL;
Not needed, G_DEFINE_TYPE() creates and initializes a
gst_disparity_parent_class variable for you
@@ +231,3 @@
+ element_class->change_state = gst_disparity_change_state;
+ parent_class = (GstElementClass *) g_type_class_peek_parent (klass);
It also does the g_type_class_peek_parent() for you
@@ +321,3 @@
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+ fs->flushing = true;
+ g_cond_signal (fs->cond);
You have to lock the mutex when signalling a GCond. On some weird platforms
this is racy otherwise. Also broadcast just in case :)
@@ +440,3 @@
fs = GST_DISPARITY (parent);
+ GST_DEBUG_OBJECT (pad, "processing frame from left");
+ if (fs->flushing)
Protect all accesses to flushing with the mutex
@@ +448,3 @@
+ GST_DEBUG_OBJECT (pad, " right is free, continuing");
+ if (fs->flushing)
+ return GST_FLOW_FLUSHING;
while (fs->buffer_left) { g_cond_wait(); if (flushing) return
GST_FLOW_FLUSHING; }
Also unlock before return
@@ +483,3 @@
+ GST_DEBUG_OBJECT (pad, " left has just provided a frame, continuing");
+ if (fs->flushing)
+ return GST_FLOW_FLUSHING;
Same as above here
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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