Open silviabf opened 8 years ago
Let's check if this error persists after these changes: https://github.com/teltek/Galicaster/commit/089a3a4ca2ab1ceba5e2122280723a87bdc91dc0 and https://github.com/teltek/Galicaster/commit/85db8131fc7af5b004eafbd788269d0a75098f8c
This bug continues happening.
This bug happens more frecuently if you use io-mode parameter in the profile.
To test execute the next snippet test.py
:
import time
from galicaster.core import context
r = context.get_recorder()
r.preview()
time.sleep(1)
while True:
r.record()
time.sleep(1)
r.stop()
time.sleep(1)
with:
GST_DEBUG=*v4l2*:6 strace -o /tmp/strace.log -P /dev/video0 python test.py 2> /tmp/gst.log
Getting the error: libv4l2: error setting pixformat: Device or resource busy
We need to test it with GStramer 1.8.2
(ubuntu xenial-updates), you can check changes in https://github.com/GStreamer/gst-plugins-good/commits/master/sys/v4l2/gstv4l2src.c
With the next script there is no error:
import gi
gi.require_version('Gst','1.0')
from gi.repository import Gst
Gst.init(None)
print Gst.version()
while True:
# Build the pipeline
pipeline = Gst.parse_launch(
"v4l2src device=/dev/video0 num-buffers=100 ! video/x-raw,framerate=24/1,width=1280,height=720 ! xvimagesink")
# Start playing
pipeline.set_state(Gst.State.PLAYING)
# Wait until error or EOS
bus = pipeline.get_bus()
msg = bus.timed_pop_filtered(
Gst.CLOCK_TIME_NONE, Gst.MessageType.ERROR | Gst.MessageType.EOS)
# Free resources
pipeline.set_state(Gst.State.NULL)
test_ok_raw_ynb.py.txt use num-buffers in pipeline and works fine
test_ko_raw_nnb.py.txt not use num-buffers in pipeline and getting the error: libv4l2: error setting pixformat: Device or resource busy
test_xx_raw_nnb_2.py.txt same test with a short pipeline, fail again
We are working with the GStreamer project to solve this issue: https://bugzilla.gnome.org/show_bug.cgi?id=772521
I failed to update this issue here, but the GStreamer devs solved it in the 1.8 branch of the plugins-good project. The change was included in the 1.10.3 version, so it should be solved from there onwards.
We patched the gstreamer package (gstreamer1.0-plugins-good) for their 1.8 version, so either upgrading that package from our repo or us fixing #531 and upgrading to 1.10 should solve this issue.
Steps:
Problem: After 5 or 6 recordings there is a profile error when you stop the recording. In the log you can see the next info:
And in the console:
@smarquard, you reported this message in issue #227. Is this message shown in a similar situation (very close recordings or too many consecutive recordings)?. Thank you in advance.