Skip to content
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

[BUGFIX #299] Do not exit thread upon EAGAIN error when fetching frames #301

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

azsde
Copy link
Contributor

@azsde azsde commented Jan 23, 2023

To use the latest Camera v3 from Raspberry Pi, we need to use libcamerify which is a V4L2 compatibility layer preload.

libcamerify -d v4l2rtspserver

I don't know if it is due to libcamerify, but sometimes the camera seems to be temporary unavailable:

[NOTICE] /home/azsde/v4l2rtspserver/src/V4L2DeviceSource.cpp:203
V4L2DeviceSource::getNextFrame errno:11 Resource temporarily unavailable
[ERROR] /home/azsde/v4l2rtspserver/src/V4L2DeviceSource.cpp:111
error:Resource temporarily unavailable
[NOTICE] /home/azsde/v4l2rtspserver/src/V4L2DeviceSource.cpp:122
This causes v4l2rtspserver to hang indefinitely.

Looking into the code, it seems that if V4L2DeviceSource cannot get the next frame, it will stop the thread in charge of fetching the the frames, not matter what error we have.

Instead of doing so, we check the errno for the EAGAIN value and do not exit if errno equals EAGAIN.

@mpromonet
Copy link
Owner

Hi,

I will probably prefer to manage this in V4L2DeviceSource::getNextFrame, I will merge this.

Thanks & Regards

Michel.

@mpromonet mpromonet merged commit 59a242e into mpromonet:master Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants