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

Upgrade for Pi OS #407

Open
DevelopDaily opened this issue Jun 14, 2022 · 1 comment
Open

Upgrade for Pi OS #407

DevelopDaily opened this issue Jun 14, 2022 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@DevelopDaily
Copy link

DevelopDaily commented Jun 14, 2022

Summary

Upgrade for Pi OS

Motivation

Has anybody planned to upgrade the project for the latest Pi OS? Raspberry Pi has upgraded from Raspbian to Pi OS. They said they would discontinue the "Legacy Camera", which pion/mediadevices relies on right now, in the future.

This project is so useful to the Raspberry Pi ecosystem that a thorough upgrade for Pi OS would benefit a lot of new apps.

Right now, the webrtc example does not work on Pi OS. I have to rebuild the opus library to make it work.

Describe alternatives you've considered

As I stated above, the "Legacy Camera" must be enabled and some libraries such as opus must be rebuilt.

pi

@bprfh
Copy link

bprfh commented Jun 10, 2024

The problem is that libcamera doesn't present a v4l2 device, libraries are expected to call the c++ api.

To support older v4l2 based programms you can use libcamerify which uses LD_PRELOAD to hook the open and v4l2 libc syscalls.

This doesn't work if you use the go builtin syscalls as these use assembly to directly call in the kernel instead of using libc.

The solution is to use cgo and use a bridge function for open/close/v4l2 syscalls and run the progamm.

I have implemented a new package which uses a cgo and works with libcamera, but I'm not ready to upload it yet.

You could also replace the ioctls with cgo code in the blackjack/webcam package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants