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 732535 - openni2src: Various fixes
openni2src: Various fixes
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal major
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 726586 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-07-01 06:53 UTC by Arun Raghavan
Modified: 2016-12-31 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
openni2src: Mark element as a live source (787 bytes, patch)
2014-07-01 06:53 UTC, Arun Raghavan
committed Details | Review
openni2src: Fix deadlock when _get_caps() is called before READY (1.92 KB, patch)
2014-07-01 06:53 UTC, Arun Raghavan
committed Details | Review
openni2src: Open device on NULL->READY (3.38 KB, patch)
2014-07-01 06:53 UTC, Arun Raghavan
committed Details | Review
openni2src: Make the location property not be mandatory (1021 bytes, patch)
2014-07-01 06:54 UTC, Arun Raghavan
committed Details | Review
openni2src: Fix timestamping (4.34 KB, patch)
2014-07-01 06:54 UTC, Arun Raghavan
committed Details | Review
openni2src: Close device when stopping the stream (695 bytes, patch)
2014-07-01 06:54 UTC, Arun Raghavan
committed Details | Review
openni2src: Don't embed C++ objects in our GObject (14.80 KB, patch)
2014-07-01 06:54 UTC, Arun Raghavan
committed Details | Review
openni2src: Add proper clean up of OpenNI2 objects (1.35 KB, patch)
2014-07-01 07:06 UTC, Arun Raghavan
committed Details | Review

Description Arun Raghavan 2014-07-01 06:53:03 UTC
I'm attaching a bunch of fixes that I found necessary while playing with this
plugin. They're not in any particular order (just what was easiest to split
and commit).
Comment 1 Arun Raghavan 2014-07-01 06:53:16 UTC
Created attachment 279646 [details] [review]
openni2src: Mark element as a live source
Comment 2 Arun Raghavan 2014-07-01 06:53:30 UTC
Created attachment 279647 [details] [review]
openni2src: Fix deadlock when _get_caps() is called before READY

The object lock was not being dropped in the empty case. Restructured
the code a bit to make this sort of error less likely.
Comment 3 Arun Raghavan 2014-07-01 06:53:45 UTC
Created attachment 279648 [details] [review]
openni2src: Open device on NULL->READY
Comment 4 Arun Raghavan 2014-07-01 06:54:02 UTC
Created attachment 279649 [details] [review]
openni2src: Make the location property not be mandatory

Our calls to device open already handle the unset location case (by
opening any available device).
Comment 5 Arun Raghavan 2014-07-01 06:54:16 UTC
Created attachment 279650 [details] [review]
openni2src: Fix timestamping

OpenNI2 makes no guarantees of timestamp starting from zero, just that
it will be a millisecond timestamp. Make timestamps start from zero
manually so things work correctly.
Comment 6 Arun Raghavan 2014-07-01 06:54:31 UTC
Created attachment 279651 [details] [review]
openni2src: Close device when stopping the stream
Comment 7 Arun Raghavan 2014-07-01 06:54:47 UTC
Created attachment 279652 [details] [review]
openni2src: Don't embed C++ objects in our GObject

Since C++ objects shoudl be properly constructed, we keep only pointers
to them and manually construct them on the heap.
Comment 8 Arun Raghavan 2014-07-01 07:06:15 UTC
Created attachment 279653 [details] [review]
openni2src: Add proper clean up of OpenNI2 objects
Comment 9 Sebastian Dröge (slomo) 2014-07-01 07:13:06 UTC
Comment on attachment 279646 [details] [review]
openni2src: Mark element as a live source

Is it also live when playing from a file? I think it should be conditional :)
Comment 10 Sebastian Dröge (slomo) 2014-07-01 07:15:54 UTC
Review of attachment 279647 [details] [review]:

::: ext/openni2/gstopenni2src.cpp
@@ +352,3 @@
+
+  if (!ni2src->gst_caps)
+    return gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (ni2src));

Previously it returned empty caps here, which arguably makes more sense if it couldn't probe any possible caps
Comment 11 Sebastian Dröge (slomo) 2014-07-01 07:21:14 UTC
Review of attachment 279652 [details] [review]:

::: ext/openni2/gstopenni2src.cpp
@@ -505,3 @@
 
-  /** OpenNI2 open device or file **/
-  rc = src->device.open (deviceURI);

Why do you remove the comment? ;)
Comment 12 Arun Raghavan 2014-07-09 03:42:45 UTC
(In reply to comment #10)
> Review of attachment 279647 [details] [review]:
> 
> ::: ext/openni2/gstopenni2src.cpp
> @@ +352,3 @@
> +
> +  if (!ni2src->gst_caps)
> +    return gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (ni2src));
> 
> Previously it returned empty caps here, which arguably makes more sense if it
> couldn't probe any possible caps

Hum, we could distinguish between device being open and not finding caps vs. device not being open, I suppose.
Comment 13 Arun Raghavan 2014-07-09 03:43:07 UTC
(In reply to comment #11)
> Review of attachment 279652 [details] [review]:
> 
> ::: ext/openni2/gstopenni2src.cpp
> @@ -505,3 @@
> 
> -  /** OpenNI2 open device or file **/
> -  rc = src->device.open (deviceURI);
> 
> Why do you remove the comment? ;)

Felt like it was a bit redundant. :)
Comment 14 Arun Raghavan 2014-07-09 03:44:34 UTC
(In reply to comment #9)
> (From update of attachment 279646 [details] [review])
> Is it also live when playing from a file? I think it should be conditional :)

Probably. Is this usually done via file:// device, and is checking that enough?
Comment 15 Tim-Philipp Müller 2016-12-31 10:09:06 UTC
*** Bug 726586 has been marked as a duplicate of this bug. ***
Comment 16 Tim-Philipp Müller 2016-12-31 10:09:40 UTC
There were patches for some of these things in bugzilla already btw ;)