-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Galicaster does not free resources correctly after a recording #29
Comments
The underlying problem is that some resources open by the recording pipeline are never freed. For instance, sockets created by alsasink stay there after the pipeline is closed. This behaviour cannot be reproduced in C, only using python. In [1] you can see the full code used in the tests. After studying the problem, we have found the bug is in Does not properly free its resources: self.pipeline = gst.Pipeline()
aux = "audiotestsrc ! alsasink"
self.bin = gst.parse_bin_from_description(aux, False)
self.pipeline.add(self.bin) Frees resources properly: self.pipeline = gst.Pipeline()
src = gst.element_factory_make('audiotestsrc')
sink = gst.element_factory_make('alsasink')
mbin = gst.Bin()
mbin.add(src, sink)
self.pipeline.add(mbin)
src.link(sink) Frees resources properly: self.pipeline = gst.Pipeline()
aux = "(audiotestsrc ! alsasink)"
self.bin = gst.parse_launch(aux)
self.pipeline.add(self.bin) We are using the last example as a workaround -- using gst.parse_launch and surrounding the description with brackets "()". |
I reopen the issue because the problem is not fixed if you use a Blackmagic card. |
The bug is not the same. Because it can be reproduced in C language [2]. I create a new issue #99 |
I am reopening this. In GStreamer 1.0 we are always having this issue. Testing the python snippets above, all of them have this issue now. Also, the C script [2] does not fail either. We believe it has to do with the python bindings of GStreamer, and we have opened a bug [3] on bugzilla on the GStreamer tracker. [2] https://gist.github.com/rubenrua/dde3276a341494b75115 |
We believe this is causing #387 |
We have confirmed this issue does not cause #387 With the help of the GStreamer people, this issue was solved for the GStreamer master branch. In the task we opened, they confirmed the change fixing this would not be backported to the 1.12 release and earlier: https://bugzilla.gnome.org/show_bug.cgi?id=782553 Having this into account, we patched the gstreamer package (gir1.2-gstreamer-1.0) for the 1.8 version and uploaded the .deb to the galicaster repository. When we deal with #531 we may have to create a package for the 1.10 version as well. |
We have noticed this after discovering that the number of file descriptors open by Galicaster (in /proc/PID/fd) steadily grows with each recording.
The text was updated successfully, but these errors were encountered: