omxplayer: Forward port patches and fix build

Fixes issue #324

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2018-11-05 17:59:15 -08:00 committed by Andrei Gherzan
parent 0f14d185d3
commit f7a2726cdf
10 changed files with 92 additions and 77 deletions

View File

@ -14,7 +14,7 @@ Index: git/Makefile.ffmpeg
=================================================================== ===================================================================
--- git.orig/Makefile.ffmpeg --- git.orig/Makefile.ffmpeg
+++ git/Makefile.ffmpeg +++ git/Makefile.ffmpeg
@@ -23,13 +23,16 @@ configure: @@ -22,12 +22,15 @@ configure:
CFLAGS="$(CFLAGS) ${INCLUDES}" \ CFLAGS="$(CFLAGS) ${INCLUDES}" \
LDFLAGS="" \ LDFLAGS="" \
./configure \ ./configure \
@ -23,7 +23,6 @@ Index: git/Makefile.ffmpeg
+ --cxx="${CXX}" \ + --cxx="${CXX}" \
--extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \
--extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
--enable-cross-compile \
--enable-shared \ --enable-shared \
--disable-static \ --disable-static \
--arch=arm \ --arch=arm \
@ -32,7 +31,7 @@ Index: git/Makefile.ffmpeg
--target-os=linux \ --target-os=linux \
--disable-hwaccels \ --disable-hwaccels \
--enable-parsers \ --enable-parsers \
@@ -44,7 +47,7 @@ configure: @@ -42,7 +45,7 @@ configure:
--enable-gpl \ --enable-gpl \
--enable-version3 \ --enable-version3 \
--enable-protocols \ --enable-protocols \

View File

@ -15,34 +15,46 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
Makefile.ffmpeg | 2 +- Makefile.ffmpeg | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-) 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile Index: git/Makefile
index 76ee9bf..cb59249 100644 ===================================================================
--- a/Makefile --- git.orig/Makefile
+++ b/Makefile +++ git/Makefile
@@ -1,9 +1,9 @@ @@ -2,9 +2,9 @@ CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/
+LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound -LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
+LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/freetype2 -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads
+INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/include/ -I=/usr/include/dbus-1.0 +INCLUDES+=-I./ -Ilinux
DIST ?= omxplayer-dist DIST ?= omxplayer-dist
STRIP ?= strip
@@ -88,5 +88,5 @@ dist: omxplayer.bin omxplayer.1 @@ -90,7 +90,7 @@ dist: omxplayer.bin omxplayer.1
cp COPYING $(DIST)/usr/share/doc/omxplayer cp COPYING $(DIST)/usr/share/doc/omxplayer
cp README.md $(DIST)/usr/share/doc/omxplayer/README cp README.md $(DIST)/usr/share/doc/omxplayer/README
cp omxplayer.1 $(DIST)/usr/share/man/man1 cp omxplayer.1 $(DIST)/usr/share/man/man1
- cp -P ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/ - cp -P ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/
+ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ + cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
cd $(DIST); tar -czf ../$(DIST).tgz * cd $(DIST); tar -czf ../$(DIST).tgz *
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
index 749f47f..d712f6c 100644 install:
--- a/Makefile.ffmpeg Index: git/Makefile.ffmpeg
+++ b/Makefile.ffmpeg ===================================================================
@@ -254,5 +254,5 @@ checkout: --- git.orig/Makefile.ffmpeg
+++ git/Makefile.ffmpeg
@@ -238,7 +238,8 @@ configure:
--disable-decoder=xbin \
--disable-decoder=idf \
--disable-decoder=hevc \
- --enable-decoder=opus
+ --enable-decoder=opus \
+ --disable-stripping
.PHONY : clean
clean:
@@ -251,5 +252,5 @@ checkout:
.PHONY : install .PHONY : install
install: install:
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install

View File

@ -15,21 +15,11 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Makefile.ffmpeg | 5 ++--- Makefile.ffmpeg | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-) 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg Index: git/Makefile.ffmpeg
index d712f6c..0dbe87c 100644 ===================================================================
--- a/Makefile.ffmpeg --- git.orig/Makefile.ffmpeg
+++ b/Makefile.ffmpeg +++ git/Makefile.ffmpeg
@@ -241,7 +241,8 @@ configure: @@ -252,5 +252,3 @@ checkout:
--disable-decoder=idf \
--disable-decoder=hevc \
--enable-decoder=opus \
- --cross-prefix=$(HOST)-
+ --cross-prefix=$(HOST)- \
+ --disable-stripping
.PHONY : clean
clean:
@@ -254,5 +255,3 @@ checkout:
.PHONY : install .PHONY : install
install: install:
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install

View File

@ -13,12 +13,11 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Makefile.ffmpeg | 5 ++++- Makefile.ffmpeg | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg Index: git/Makefile.ffmpeg
index 0dbe87c..e120d47 100644 ===================================================================
--- a/Makefile.ffmpeg --- git.orig/Makefile.ffmpeg
+++ b/Makefile.ffmpeg +++ git/Makefile.ffmpeg
@@ -1,6 +1,8 @@ @@ -1,5 +1,7 @@
CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
+FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog +FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog
@ -26,13 +25,13 @@ index 0dbe87c..e120d47 100644
WORK=$(PWD) WORK=$(PWD)
.PHONY : all .PHONY : all
@@ -21,7 +23,8 @@ configure: @@ -20,7 +22,8 @@ configure:
CFLAGS="$(CFLAGS) ${INCLUDES}" \ CFLAGS="$(CFLAGS) ${INCLUDES}" \
LDFLAGS="" \ LDFLAGS="" \
./configure \ ./configure \
- --extra-cflags="-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \ - --extra-cflags="-mfpu=vfp -mfloat-abi=hard -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \
+ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \ + --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \
+ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \ + --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
--enable-cross-compile \
--enable-shared \ --enable-shared \
--disable-static \ --disable-static \
--arch=arm \

View File

@ -17,11 +17,11 @@ Upstream-status: Inappropriate
Makefile.ffmpeg | 2 +- Makefile.ffmpeg | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-) 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile Index: git/Makefile
index 60501b1..6471f0f 100644 ===================================================================
--- a/Makefile --- git.orig/Makefile
+++ b/Makefile +++ git/Makefile
@@ -79,14 +79,12 @@ ffmpeg: @@ -81,17 +81,14 @@ ffmpeg:
make -f Makefile.ffmpeg make -f Makefile.ffmpeg
make -f Makefile.ffmpeg install make -f Makefile.ffmpeg install
@ -37,13 +37,14 @@ index 60501b1..6471f0f 100644
- cp omxplayer.1 $(DIST)/usr/share/man/man1 - cp omxplayer.1 $(DIST)/usr/share/man/man1
cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
- tar -czf omxplayer-dist.tar.gz $(DIST) - tar -czf omxplayer-dist.tar.gz $(DIST)
\ No newline at end of file
+ tar -czf omxplayer-dist.tar.gz $(DIST) install:
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg cp -r $(DIST)/* /
index 22d495c..8651724 100644 Index: git/Makefile.ffmpeg
--- a/Makefile.ffmpeg ===================================================================
+++ b/Makefile.ffmpeg --- git.orig/Makefile.ffmpeg
@@ -6,7 +6,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstru +++ git/Makefile.ffmpeg
@@ -5,7 +5,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-a
WORK=$(PWD) WORK=$(PWD)
.PHONY : all .PHONY : all

View File

@ -13,11 +13,11 @@ Upstream-status: Pending
Makefile.ffmpeg | 4 ++-- Makefile.ffmpeg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg Index: git/Makefile.ffmpeg
index 8651724..619c49a 100644 ===================================================================
--- a/Makefile.ffmpeg --- git.orig/Makefile.ffmpeg
+++ b/Makefile.ffmpeg +++ git/Makefile.ffmpeg
@@ -6,7 +6,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstru @@ -5,7 +5,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-a
WORK=$(PWD) WORK=$(PWD)
.PHONY : all .PHONY : all
@ -26,12 +26,12 @@ index 8651724..619c49a 100644
.PHONY : copy .PHONY : copy
copy: copy:
@@ -14,7 +14,7 @@ copy: @@ -13,7 +13,7 @@ copy:
$(HOST)-strip *.so* $(HOST)-strip *.so*
.PHONY : compile .PHONY : compile
-compile: -compile:
+compile: configure +compile: configure
+$(MAKE) -C ffmpeg +$(MAKE) -j$(shell nproc) -C ffmpeg
.PHONY : configure .PHONY : configure

View File

@ -0,0 +1,12 @@
Index: git/Makefile.ffmpeg
===================================================================
--- git.orig/Makefile.ffmpeg
+++ git/Makefile.ffmpeg
@@ -22,6 +22,7 @@ configure:
CFLAGS="$(CFLAGS) ${INCLUDES}" \
LDFLAGS="" \
./configure \
+ --enable-cross-compile \
--ld="${CCLD}" \
--cc="${CC}" \
--cxx="${CXX}" \

View File

@ -17,14 +17,16 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
Makefile | 2 +- Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile Index: git/Makefile
index cb59249..60501b1 100644 ===================================================================
--- a/Makefile --- git.orig/Makefile
+++ b/Makefile +++ git/Makefile
@@ -89,4 +89,4 @@ dist: omxplayer.bin omxplayer.1 @@ -91,7 +91,7 @@ dist: omxplayer.bin omxplayer.1
cp README.md $(DIST)/usr/share/doc/omxplayer/README cp README.md $(DIST)/usr/share/doc/omxplayer/README
cp omxplayer.1 $(DIST)/usr/share/man/man1 cp omxplayer.1 $(DIST)/usr/share/man/man1
cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
- cd $(DIST); tar -czf ../$(DIST).tgz * - cd $(DIST); tar -czf ../$(DIST).tgz *
+ tar -czf omxplayer-dist.tar.gz $(DIST) + tar -czf omxplayer-dist.tar.gz $(DIST)
\ No newline at end of file
install:
cp -r $(DIST)/* /

View File

@ -12,14 +12,14 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Makefile.ffmpeg | 3 ++- Makefile.ffmpeg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg Index: git/Makefile.ffmpeg
index e120d47..22d495c 100644 ===================================================================
--- a/Makefile.ffmpeg --- git.orig/Makefile.ffmpeg
+++ b/Makefile.ffmpeg +++ git/Makefile.ffmpeg
@@ -245,7 +245,8 @@ configure: @@ -242,7 +242,8 @@ configure:
--disable-decoder=idf \
--disable-decoder=hevc \ --disable-decoder=hevc \
--enable-decoder=opus \ --enable-decoder=opus \
--cross-prefix=$(HOST)- \
- --disable-stripping - --disable-stripping
+ --disable-stripping \ + --disable-stripping \
+ --pkg-config=pkg-config + --pkg-config=pkg-config

View File

@ -23,7 +23,6 @@ SRCREV_ffmpeg = "afa34cb36edca0ff809b7e58474bbce12271ecba"
SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \
git://source.ffmpeg.org/ffmpeg;branch=release/3.1;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \ git://source.ffmpeg.org/ffmpeg;branch=release/3.1;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \
file://0001-Remove-Makefile.include-which-includes-hardcoded.patch \
file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \
file://0003-Remove-strip-step-in-Makefile.patch \ file://0003-Remove-strip-step-in-Makefile.patch \
file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \ file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \
@ -35,10 +34,11 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master
file://0001-openssl-Support-version-1.1.0.patch;patchdir=ffmpeg \ file://0001-openssl-Support-version-1.1.0.patch;patchdir=ffmpeg \
file://0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch;patchdir=ffmpeg \ 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://0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch;patchdir=ffmpeg \
file://cross-crompile-ffmpeg.patch \
" "
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
COMPATIBLE_MACHINE ?= "null" COMPATIBLE_HOST ?= "null"
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}" COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}"
def cpu(d): def cpu(d):