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
PiCameraCircularIO missing data due to invalid timestamps #357
Comments
OK, so if I add these two lines to MMALBuffer._get_pts() in mmalobj.py:
I see:
This is not the result I would have expected, but I have no experience with Python's ctypes. Wheee! Isn't debugging dynamically typed languages fun! |
Last comment before I wait for more knowledgeable people to chime in: If I modify the code in PiVideoEncoder._callback_write() to extract the ctypes 'value' field as follows:
... everything seems to work. |
@dbbnrl nice bit of debugging there! This has been on the list a while, but it's been repeatedly shoved to the bottom of the pile by new feature development (largely mmalobj). Your surmise is absolutely correct: it should be using I'm just going to check if I can work around this a different way: by using a straight-forward Python int instead of a |
Excellent, glad I could help. PiCamera is a joy to use! |
I've been having problems with copy_to() writing out no data even when my circular buffer is quite large. After some digging, it appears the problem is this:
It's easy to see the issue:
I'm unfamiliar enough with the code to know exactly how this should be handled yet. Is buf.pts expected to be a c_long? I'll do a bit more research and then submit a PR, but I thought I'd document what I have so far here.
The text was updated successfully, but these errors were encountered: