omxplayer: Fix build when using vc4graphics driver

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2018-11-07 08:47:26 -08:00 committed by Andrei Gherzan
parent 229363bbac
commit f661406e2d
2 changed files with 57 additions and 3 deletions

View File

@ -0,0 +1,49 @@
From 25302469b6ceb2fa10ac68c07da25c6068ffd218 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 7 Nov 2018 01:16:59 -0800
Subject: [PATCH] Fix build with vc4 driver
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
SubtitleRenderer.cpp | 7 ++++++-
SubtitleRenderer.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/SubtitleRenderer.cpp b/SubtitleRenderer.cpp
index 540162f..fcfc708 100644
--- a/SubtitleRenderer.cpp
+++ b/SubtitleRenderer.cpp
@@ -36,6 +36,11 @@
#include <algorithm>
#include "bcm_host.h"
+typedef struct {
+ DISPMANX_ELEMENT_HANDLE_T element;
+ int width;
+ int height;
+} EGL_DISPMANX_WINDOW_T;
class BoxRenderer {
VGPath path_;
@@ -618,4 +623,4 @@ void SubtitleRenderer::set_rect(int x1, int y1, int x2, int y2) BOOST_NOEXCEPT
float font_size = height*font_size_;
ENFORCE(!FT_Set_Pixel_Sizes(ft_face_, 0, font_size));
ENFORCE(!FT_Set_Pixel_Sizes(ft_face_italic_, 0, font_size));
-}
\ No newline at end of file
+}
diff --git a/SubtitleRenderer.h b/SubtitleRenderer.h
index 3f60798..ebac9a1 100644
--- a/SubtitleRenderer.h
+++ b/SubtitleRenderer.h
@@ -26,6 +26,7 @@
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
+#include <interface/vmcs_host/vc_dispmanx.h>
#include <EGL/egl.h>
#include <VG/openvg.h>
#include <ft2build.h>
--
2.19.1

View File

@ -8,6 +8,8 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native"
DEPENDS += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " userland-nogl", "", d)}"
PR = "r4"
SRCREV_default = "7f3faf6cadac913013248de759462bcff92f0102"
@ -35,11 +37,11 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master
file://0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch;patchdir=ffmpeg \
file://0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch;patchdir=ffmpeg \
file://cross-crompile-ffmpeg.patch \
file://0001-Fix-build-with-vc4-driver.patch \
"
S = "${WORKDIR}/git"
COMPATIBLE_HOST ?= "null"
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}"
COMPATIBLE_MACHINE = "^rpi$"
def cpu(d):
for arg in (d.getVar('TUNE_CCARGS') or '').split():
@ -66,11 +68,13 @@ export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
# Needed in top Makefile
export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
-L${STAGING_DIR_HOST}/lib \
-L${STAGING_DIR_HOST}/usr/lib \
"
export INCLUDES = "-isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D__GBM__", "", d)} \
-isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
-isystem${STAGING_DIR_HOST}/usr/include/freetype2 \
-isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \
-isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \
@ -102,3 +106,4 @@ FILES_${PN} = "${bindir}/omxplayer* \
FILES_${PN}-dev += "${libdir}/omxplayer/*.so"
RDEPENDS_${PN} += "bash procps"
RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " userland-nogl", "", d)}"