summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-11-07 08:47:26 -0800
committerAndrei Gherzan <andrei@gherzan.ro>2018-11-08 13:23:05 +0000
commitf661406e2df48f1b8298b40bb25d12801cc4b5fb (patch)
tree122233bb4eccdc04a74774bf4e246ddce690f78b
parent229363bbac2a32e51b60a8204d0fa91ec7eba38a (diff)
downloadmeta-raspberrypi-f661406e2df48f1b8298b40bb25d12801cc4b5fb.tar.gz
omxplayer: Fix build when using vc4graphics driver
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch49
-rw-r--r--recipes-multimedia/omxplayer/omxplayer_git.bb11
2 files changed, 57 insertions, 3 deletions
diff --git a/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch b/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch
new file mode 100644
index 0000000..37d0724
--- /dev/null
+++ b/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch
@@ -0,0 +1,49 @@
1From 25302469b6ceb2fa10ac68c07da25c6068ffd218 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Nov 2018 01:16:59 -0800
4Subject: [PATCH] Fix build with vc4 driver
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 SubtitleRenderer.cpp | 7 ++++++-
9 SubtitleRenderer.h | 1 +
10 2 files changed, 7 insertions(+), 1 deletion(-)
11
12diff --git a/SubtitleRenderer.cpp b/SubtitleRenderer.cpp
13index 540162f..fcfc708 100644
14--- a/SubtitleRenderer.cpp
15+++ b/SubtitleRenderer.cpp
16@@ -36,6 +36,11 @@
17 #include <algorithm>
18
19 #include "bcm_host.h"
20+typedef struct {
21+ DISPMANX_ELEMENT_HANDLE_T element;
22+ int width;
23+ int height;
24+} EGL_DISPMANX_WINDOW_T;
25
26 class BoxRenderer {
27 VGPath path_;
28@@ -618,4 +623,4 @@ void SubtitleRenderer::set_rect(int x1, int y1, int x2, int y2) BOOST_NOEXCEPT
29 float font_size = height*font_size_;
30 ENFORCE(!FT_Set_Pixel_Sizes(ft_face_, 0, font_size));
31 ENFORCE(!FT_Set_Pixel_Sizes(ft_face_italic_, 0, font_size));
32-}
33\ No newline at end of file
34+}
35diff --git a/SubtitleRenderer.h b/SubtitleRenderer.h
36index 3f60798..ebac9a1 100644
37--- a/SubtitleRenderer.h
38+++ b/SubtitleRenderer.h
39@@ -26,6 +26,7 @@
40 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41 // DEALINGS IN THE SOFTWARE.
42
43+#include <interface/vmcs_host/vc_dispmanx.h>
44 #include <EGL/egl.h>
45 #include <VG/openvg.h>
46 #include <ft2build.h>
47--
482.19.1
49
diff --git a/recipes-multimedia/omxplayer/omxplayer_git.bb b/recipes-multimedia/omxplayer/omxplayer_git.bb
index 983abf7..4ec0b24 100644
--- a/recipes-multimedia/omxplayer/omxplayer_git.bb
+++ b/recipes-multimedia/omxplayer/omxplayer_git.bb
@@ -8,6 +8,8 @@ LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
9 9
10DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native" 10DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native"
11DEPENDS += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " userland-nogl", "", d)}"
12
11PR = "r4" 13PR = "r4"
12 14
13SRCREV_default = "7f3faf6cadac913013248de759462bcff92f0102" 15SRCREV_default = "7f3faf6cadac913013248de759462bcff92f0102"
@@ -35,11 +37,11 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master
35 file://0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch;patchdir=ffmpeg \ 37 file://0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch;patchdir=ffmpeg \
36 file://0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch;patchdir=ffmpeg \ 38 file://0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch;patchdir=ffmpeg \
37 file://cross-crompile-ffmpeg.patch \ 39 file://cross-crompile-ffmpeg.patch \
40 file://0001-Fix-build-with-vc4-driver.patch \
38 " 41 "
39S = "${WORKDIR}/git" 42S = "${WORKDIR}/git"
40 43
41COMPATIBLE_HOST ?= "null" 44COMPATIBLE_MACHINE = "^rpi$"
42COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}"
43 45
44def cpu(d): 46def cpu(d):
45 for arg in (d.getVar('TUNE_CCARGS') or '').split(): 47 for arg in (d.getVar('TUNE_CCARGS') or '').split():
@@ -66,11 +68,13 @@ export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
66export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" 68export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
67 69
68# Needed in top Makefile 70# Needed in top Makefile
71
69export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \ 72export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
70 -L${STAGING_DIR_HOST}/lib \ 73 -L${STAGING_DIR_HOST}/lib \
71 -L${STAGING_DIR_HOST}/usr/lib \ 74 -L${STAGING_DIR_HOST}/usr/lib \
72 " 75 "
73export INCLUDES = "-isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \ 76export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D__GBM__", "", d)} \
77 -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
74 -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \ 78 -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \
75 -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \ 79 -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \
76 -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \ 80 -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \
@@ -102,3 +106,4 @@ FILES_${PN} = "${bindir}/omxplayer* \
102FILES_${PN}-dev += "${libdir}/omxplayer/*.so" 106FILES_${PN}-dev += "${libdir}/omxplayer/*.so"
103 107
104RDEPENDS_${PN} += "bash procps" 108RDEPENDS_${PN} += "bash procps"
109RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " userland-nogl", "", d)}"