agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
520 stars 407 forks source link

rpidistro-ffmpeg: fix opengl compile issue #1122

Closed EasyIP2023 closed 1 year ago

EasyIP2023 commented 1 year ago

Connected to: https://github.com/agherzan/meta-raspberrypi/issues/1117

Problem: rpidistro-ffmpeg fails the ./configure stage if neither x11 or wayland defined in DISTRO_FEATURES. After configure stage succeeds compile stage fails as SelectedGetProcAddress isn't defined. One can't define it as GLES2/gl2.h glGetProcAddress if not defined. Anywhere actually.

Also couldn't find the original locations of where I got the patches from, but if you go to

https://github.com/RPi-Distro/ffmpeg/tree/ea72093f350f38edcd39c480b331c3219c377642/debian/patches

One can see that the patches applied were incorrect.

EDIT:

found the ffmpeg-4.3.2-rpi_10.patch

https://github.com/RPi-Distro/ffmpeg/tree/378adea166f167a0e75cf85888f661101cb4af0f

Solution:

Add two new patches so that ./configure is OE ported and libavdevice/opengl_enc.c compiles if SelectedGetProcAddress isn't defined. It can't however be define as glGetProcAddress is not defined anywhere. Patch applied loads GL functions pointers at compile time versus dynamically at runtime.

Also MR was checked with all ./configure flags. Only one to fail was gsm due to libgsm not found.