meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/2003-libavcodec-fix-v4l2_req_devscan.patch
Vincent Davis Jr 1f33240549 rpidistro-ffmpeg: upgrade 4.3.2 -> 4.3.4
Upgrades version of ffmpeg to 4.3.4
* Reason for not upgrading to 4.3.5 all ported raspberrypi
  team patches may not be included in that version/commit.
* SRCREV set to 246e1a55a0eca931537d8706acd8b133c07beb05

Updates to PACKAGECONFIG
* Only include --enable-opengl flag when opengl is set in
  DISTRO_FEATURES
* Add new flag --enable-epoxy required by vout-egl
* vout-egl requires both libepoxy and x11. Only
  enable vout-egl if x11 contained in DISTRO_FEATURES.
* The remaining RPI-Distro related flags added
  through patches. Are only enabled if vc4graphics
  is disabled and userland graphics enabled. As an
  attempt to keep ffmpeg ./configure generic unless
  specified other wise.

Removes TARGET_CFLAGS:append as include flags are set in
./configure via the 2001-configure-setup-for-OE-core-usage.patch
patch.

Replaces patches with updated patches used in actual commit.
Adds four new patches to fix ./configure, compile, runtime bugs.

PATCHES:
- 2001-configure-setup-for-OE-core-usage.patch
* The ./configure stage fails if neither x11 or wayland defined
  in DISTRO_FEATURES. When opengl enabled ./configure checks for
  relevant headers. The last header it checks for is ES2/gl.h which
  doesn't exists. Neither do the others if certain perameters
  are not meet. Patch addes check for GLES2/gl2.h which does
  exists. We use utilize GLESv2 to compile and link with.
  Patch also replaces where compiler find mmal and omx headers
  and libs.

- 2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch
* After configure stage succeeds the compile stage fails as
  SelectedGetProcAddress isn't defined. It can't be define as
  if x11 isn't enabled. Patch defines SelectedGetProcAddress
  if x11 not enabled, but sdl2 enabled to SDL_GL_GetProcAddress.
  If neither sdl2 or x11 is enabled patch loads GL functions
  pointers at compile time versus dynamically at runtime.

- 2003-libavcodec-fix-v4l2_req_devscan.patch
* v412_req_devscan.h function definitions where different
  from v412_req_devscan.c function implementations.

- 2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch
* Fixes where libbcm_host.so and libopenmaxil.so are loaded from.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2022-12-13 02:32:11 +00:00

46 lines
1.4 KiB
Diff

From 62c2f041890a6e20770350721a0a2138d0b38634 Mon Sep 17 00:00:00 2001
From: Vincent Davis Jr <vince@underview.tech>
Date: Sat, 3 Dec 2022 23:35:51 -0600
Subject: [PATCH] libavcodec: fix v4l2_req_devscan.h
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
Fixes minor differences between v4l2_req_devscan.c
and v4l2_req_devscan.h after all patches have been
applied.
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
---
libavcodec/v4l2_req_devscan.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/v4l2_req_devscan.h b/libavcodec/v4l2_req_devscan.h
index 0baef365..cd9c49ac 100644
--- a/libavcodec/v4l2_req_devscan.h
+++ b/libavcodec/v4l2_req_devscan.h
@@ -1,6 +1,8 @@
#ifndef _DEVSCAN_H_
#define _DEVSCAN_H_
+#include <stdint.h>
+
struct devscan;
struct decdev;
enum v4l2_buf_type;
@@ -13,7 +15,8 @@ const char *decdev_video_path(const struct decdev *const dev);
enum v4l2_buf_type decdev_src_type(const struct decdev *const dev);
uint32_t decdev_src_pixelformat(const struct decdev *const dev);
-const struct decdev *devscan_find(struct devscan *const scan, const uint32_t src_fmt_v4l2);
+const struct decdev *devscan_find(struct devscan *const scan,
+ const uint32_t src_fmt_v4l2);
int devscan_build(void * const dc, struct devscan **pscan);
void devscan_delete(struct devscan **const pScan);
--
2.38.1