Skip to content

UNTESTED fix for libcamera0.7#207

Closed
AndrolGenhald wants to merge 1 commit intoayufan:mainfrom
AndrolGenhald:fix-libcamera-0.7
Closed

UNTESTED fix for libcamera0.7#207
AndrolGenhald wants to merge 1 commit intoayufan:mainfrom
AndrolGenhald:fix-libcamera-0.7

Conversation

@AndrolGenhald
Copy link
Contributor

Fixes #206 (maybe).

I want to be very clear about this: I did not test this, I do not even really know how to test this feature.

All I did was take the code from libcamera_device_apply_controls and more-or-less copy/paste it here with the variables changed so that it updates the existing controls instead of overwriting them. This fixes the error and I can now stream video with libcamera0.7, but as far as I know I don't rely on this feature and I could have just commented out line 83 and it would work just as well for me.

@mryel00
Copy link
Contributor

mryel00 commented Feb 26, 2026

Fyi #205 is tested and fixes the error. The PR title is not optimal, I should maybe adjust it ^^

@AndrolGenhald
Copy link
Contributor Author

Oh, awesome! I searched issues for "libcamera0.7" but apparently I forgot to search PRs. I'll close this in favor of #205 then.

@mryel00
Copy link
Contributor

mryel00 commented Feb 26, 2026

I looked again in more depth into the libcamera code. Seems like my code will not always overwrite existing controls, as I didn't check the default values 😅
https://github.com/raspberrypi/libcamera/blob/1e2272178fa317ad3e1931a608d4d54d9c649db6/include/libcamera/controls.h#L435

Your PR, and therefore libcamera_device_apply_controls, seem to just copy the behavior of the merge operation I used:
https://github.com/raspberrypi/libcamera/blob/1e2272178fa317ad3e1931a608d4d54d9c649db6/src/libcamera/controls.cpp#L995-L1036

So thank you for this PR, so I could spot my error.

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.

libcamera0.7 error "Overwriting Request::controls() is not allowed"

2 participants