kumquat-buildroot/package/omxplayer/0001-Makefiles-clean-up-the-cruft.patch
Yann E. MORIN fe0fcb1d7b package/omxplayer: new package
OMXplayer uses openMAX on the RPi to play videos with hardware
acceleration.

Compared to using a gstreamer pipe, OMXplayer uses a complete
"tunnel-mode", in which the video is piped (after demuxing) into the
hardware, all the way down to the display, whereas gstreamer composes
the video using the eglgles sink, which uses mem-to-mem copies.

So, when playing a locally-stored 1080p video, OMXplayer averages 20%
(with peaks up to ~30%, depending on the complexity of the video) CPU,
while gstreamer bursts up to 40+% when playing 720p and totally chokes
on a 1080p video; all on an non-overclocked RPi-1.

Note that we have to depend on rpi-userland. rpi-userland is a GLES/EGL
provider, so it can't be selected (as all providers of a virtual package
can't).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Thomas: add a depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-03 19:55:34 +02:00

68 lines
2.9 KiB
Diff

From 563dafc1129848419482b540d149d0b8687cac1e Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Sun, 10 Apr 2016 16:22:53 +0200
Subject: [PATCH] Makefiles: clean up the cruft
Most of the variables that Makefile.include tries (but fails) to set,
are already available from Buildroot's variables:
- AR, AS, CC, CXX, OBJDUMP...
- CFLAGS, CXXFLAGS, CPPFLAGS...
This leaves us with a few select variables that define include and
library paths local to the omxplayer package, plus a few optimisations.
Finally, also remove hard-coded, absolute paths pointing to the host
system (won't work for cross-compilation, so our paranoid wrapper would
catch those paths).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Makefile | 2 +-
Makefile.include | 20 ++------------------
2 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index bcfadfb..3dc1a03 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX
LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
-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/
DIST ?= omxplayer-dist
diff --git a/Makefile.include b/Makefile.include
index 58e9560..79ca277 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -20,21 +20,5 @@ endif
JOBS=7
-CFLAGS := -isystem$(PREFIX)/include
-CXXFLAGS := $(CFLAGS)
-CPPFLAGS := $(CFLAGS)
-LDFLAGS := -L$(BUILDROOT)/lib
-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
-AR := $(TOOLCHAIN)/bin/$(HOST)-ar
-CXXCP := $(CXX) -E
-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
-
-CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build
-#INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2
-INCLUDES += -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include
+CFLAGS += -fomit-frame-pointer -Wno-psabi -mno-apcs-stack-check \
+ -mstructure-size-boundary=32 -mno-sched-prolog
--
1.9.1