Skip to contentSkip to conversation

Add ffmpeg-2 and omxplayer

PATCH Superseded Yann E. MORIN 4 participants 8 messages Jan 24, 2014 – Jan 28, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Add ffmpeg-2 and omxplayer

From: "Yann E. MORIN" <[email protected]>

Hello All!

This series introduces OMXplayer, an optimised video application, specially written for the Raspberry Pi, which allows decoding video using hardware acceleration.

With OMXplayer, it is posible to decode h264 1080p30 with as low as 20% CPU usage (where gst is not able to, and tops at ~40% CPU for 720p30).

OMXplayer can play local files, as well as rtmp streams.

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Yann E. MORIN (3):
package/rpi-userland: fix fall-out after cmake infra change package/ffmpeg2: new package
package/omxplayer: new package

 package/Config.in                                  |   2 +
 package/ffmpeg2/Config.in                          | 235 ++++++++++++++++++
 package/ffmpeg2/ffmpeg2.mk                         | 274 +++++++++++++++++++++
 package/omxplayer/Config.in                        |  31 +++
 .../omxplayer-0000-clean-up-Makefile.include.patch |  38 +++
 package/omxplayer/omxplayer.mk                     |  44 ++++
 package/rpi-userland/rpi-userland.mk               |   2 +-
 7 files changed, 625 insertions(+), 1 deletion(-)
 create mode 100644 package/ffmpeg2/Config.in
 create mode 100644 package/ffmpeg2/ffmpeg2.mk
 create mode 100644 package/omxplayer/Config.in
 create mode 100644 package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
 create mode 100644 package/omxplayer/omxplayer.mk
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/3 package/rpi-userland: fix fall-out after cmake infra change

From: "Yann E. MORIN" <[email protected]>

Cset 9fa7f2b (pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB) broke rpi-userland.

Force not building shared libs for rpi-userland, since they are broken.

Cc Samuel Martin <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
---
 package/rpi-userland/rpi-userland.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/rpi-userland/rpi-userland.mk +1 -1
index 35eaf24..223b645 100644
@@ -9,7 +9,7 @@ RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
 RPI_USERLAND_LICENSE = BSD-3c
 RPI_USERLAND_LICENSE_FILES = LICENCE
 RPI_USERLAND_INSTALL_STAGING = YES
-RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr
+RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=OFF
 
 define RPI_USERLAND_POST_TARGET_CLEANUP
     rm -Rf $(TARGET_DIR)/usr/src
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 1/3 package/rpi-userland: fix fall-out after cmake infra change

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

From: "Yann E. MORIN" <[email protected]>
Cset 9fa7f2b (pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB) broke rpi-userland.

Force not building shared libs for rpi-userland, since they are broken.

Cc Samuel Martin <[email protected]>
Cc Maxime Hadjinlian <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 2/3 package/ffmpeg2: new package

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Instead of bumping ffmpeg, we just add ffmpeg2 as a separate package.

However, the sets of files installed by both versions have a non-empty intersection, so we can't install both concurrently. Hence, they are made mutually exclusive in the menuconfig.

---
Note: I prefered to provide a separate package, rather than bumping, since I am not comfortable to say that all users of ffmpeg will indeed want to switch, or that existing ffmpeg-based packages will continue to build (and run!) with ffmpeg2 (eg. the upcoming xbmc).

---
 package/Config.in          |   1 +
 package/ffmpeg2/Config.in  | 235 ++++++++++++++++++++++++++++++++++++++
 package/ffmpeg2/ffmpeg2.mk | 274 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 510 insertions(+)
 create mode 100644 package/ffmpeg2/Config.in
 create mode 100644 package/ffmpeg2/ffmpeg2.mk
package/Config.in +1 -0
index 397cc11..6d3b9c0 100644
@@ -8,6 +8,7 @@ source "package/aumix/Config.in"
 source "package/bellagio/Config.in"
 source "package/faad2/Config.in"
 source "package/ffmpeg/Config.in"
+source "package/ffmpeg2/Config.in"
 source "package/flac/Config.in"
 source "package/gstreamer/Config.in"
 source "package/gstreamer1/Config.in"
package/ffmpeg2/Config.in new file +235 -0

235 lines not on this page · raw message

package/ffmpeg2/ffmpeg2.mk new file +274 -0

274 lines not on this page · raw message

Signature · 1 line
1.8.1.2
#4 lore raw

PATCH 3/3 package/omxplayer: new package

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

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 uses around 20% CPU, while gstreamer bursts up to 40+% when playing 720p and totally chokes on 1080p; all on an non-overclocked RPi.

Cc Maxime Hadjinlian <[email protected]>
Cc Samuel Martin <[email protected]>
---
 package/Config.in                                  |  1 +
 package/omxplayer/Config.in                        | 31 +++++++++++++++
 .../omxplayer-0000-clean-up-Makefile.include.patch | 38 +++++++++++++++++++
 package/omxplayer/omxplayer.mk                     | 44 ++++++++++++++++++++++
 4 files changed, 114 insertions(+)
 create mode 100644 package/omxplayer/Config.in
 create mode 100644 package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
 create mode 100644 package/omxplayer/omxplayer.mk
package/Config.in +1 -0
index 6d3b9c0..2743225 100644
@@ -19,6 +19,7 @@ source "package/mpd/Config.in"
 source "package/mpg123/Config.in"
 source "package/mplayer/Config.in"
 source "package/musepack/Config.in"
+source "package/omxplayer/Config.in"
 source "package/on2-8170-libs/Config.in"
 source "package/opus-tools/Config.in"
 source "package/pulseaudio/Config.in"
package/omxplayer/Config.in new file +31 -0
new file mode 100644
index 0000000..419b0be
@@ -0,0 +1,31 @@
+comment "omxplayer needs a toolchain w/ C++, threads, largefile, IPv6"
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS && BR2_LARGEFILE && BR2_INET_IPV6)
+	depends on BR2_arm
+
+config BR2_PACKAGE_OMXPLAYER
+	bool "omxplayer"
+	depends on BR2_arm
+	depends on BR2_INSTALL_LIBSTDCPP        # boost, rpi-userland
+	depends on BR2_TOOLCHAIN_HAS_THREADS    # boost, dbus, libusb, rpi-userland
+	depends on BR2_LARGEFILE                # boost, ffmpeg2, rpi-userland
+	depends on BR2_INET_IPV6                # ffmpeg2
+	depends on !BR2_PACKAGE_FFMPEG          # ffmpeg2
+	depends on BR2_USE_MMU                  # dbus
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_DBUS
+	select BR2_PACKAGE_FFMPEG2
+	select BR2_PACKAGE_FFMPEG2_AVFILTER
+	select BR2_PACKAGE_FFMPEG2_SWRESAMPLE
+	select BR2_PACKAGE_FFMPEG2_SWSCALE
+	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_LIBIDN
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_PCRE
+	select BR2_PACKAGE_RPI_USERLAND
+	select BR2_PACKAGE_ZLIB
+	help
+	  OMXPlayer is a commandline OMX player for the Raspberry Pi. It was
+	  developed as a testbed for the XBMC Raspberry PI implementation
+	  and is quite handy to use standalone.
+
+	  https://github.com/popcornmix/omxplayer
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +38 -0
new file mode 100644
index 0000000..598500d
@@ -0,0 +1,38 @@
+Makefile.include: clean up the cruft
+
+Most of the variables that Makefile.include tries to set (and fails to),
+are already available from Buildroot's variables:
+  - AR, AS, CC, CXX, OBJDUMP...
+  - CFLAGS, CXXFLAGS, CPPFLAGS...
+
+This leaves us with a few select variables that defines (include and
+library) paths local to the omxplayer package, plus a few optimisations.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+diff -durN omxplayer-37fd6fb.orig/Makefile.include omxplayer-37fd6fb/Makefile.include
+--- omxplayer-37fd6fb.orig/Makefile.include	2013-10-16 14:21:05.000000000 +0200
++++ omxplayer-37fd6fb/Makefile.include	2013-10-17 22:53:02.294062252 +0200
+@@ -20,21 +20,5 @@
+ 
+ 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
package/omxplayer/omxplayer.mk new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
1.8.1.2
#5 lore raw

PATCH 3/3 package/omxplayer: new package

Hi Yann, all

Quoted 170 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

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 uses around 20% CPU, while gstreamer bursts up to 40+% when playing 720p and totally chokes on 1080p; all on an non-overclocked RPi.

Cc Maxime Hadjinlian <[email protected]>
Cc Samuel Martin <[email protected]>
---
 package/Config.in                                  |  1 +
 package/omxplayer/Config.in                        | 31 +++++++++++++++
 .../omxplayer-0000-clean-up-Makefile.include.patch | 38 +++++++++++++++++++
 package/omxplayer/omxplayer.mk                     | 44 ++++++++++++++++++++++
 4 files changed, 114 insertions(+)
 create mode 100644 package/omxplayer/Config.in
 create mode 100644 package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
 create mode 100644 package/omxplayer/omxplayer.mk
package/Config.in +1 -0
index 6d3b9c0..2743225 100644
@@ -19,6 +19,7 @@ source "package/mpd/Config.in"
 source "package/mpg123/Config.in"
 source "package/mplayer/Config.in"
 source "package/musepack/Config.in"
+source "package/omxplayer/Config.in"
 source "package/on2-8170-libs/Config.in"
 source "package/opus-tools/Config.in"
 source "package/pulseaudio/Config.in"
package/omxplayer/Config.in new file +31 -0
new file mode 100644
index 0000000..419b0be
@@ -0,0 +1,31 @@
+comment "omxplayer needs a toolchain w/ C++, threads, largefile, IPv6"
+       depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS && BR2_LARGEFILE && BR2_INET_IPV6)
+       depends on BR2_arm
+
+config BR2_PACKAGE_OMXPLAYER
+       bool "omxplayer"
+       depends on BR2_arm
+       depends on BR2_INSTALL_LIBSTDCPP        # boost, rpi-userland
+       depends on BR2_TOOLCHAIN_HAS_THREADS    # boost, dbus, libusb, rpi-userland
+       depends on BR2_LARGEFILE                # boost, ffmpeg2, rpi-userland
+       depends on BR2_INET_IPV6                # ffmpeg2
+       depends on !BR2_PACKAGE_FFMPEG          # ffmpeg2
+       depends on BR2_USE_MMU                  # dbus
+       select BR2_PACKAGE_BOOST
+       select BR2_PACKAGE_DBUS
+       select BR2_PACKAGE_FFMPEG2
+       select BR2_PACKAGE_FFMPEG2_AVFILTER
+       select BR2_PACKAGE_FFMPEG2_SWRESAMPLE
+       select BR2_PACKAGE_FFMPEG2_SWSCALE
+       select BR2_PACKAGE_FREETYPE
+       select BR2_PACKAGE_LIBIDN
+       select BR2_PACKAGE_LIBUSB
+       select BR2_PACKAGE_PCRE
+       select BR2_PACKAGE_RPI_USERLAND
+       select BR2_PACKAGE_ZLIB
+       help
+         OMXPlayer is a commandline OMX player for the Raspberry Pi. It was
+         developed as a testbed for the XBMC Raspberry PI implementation
+         and is quite handy to use standalone.
+
+         https://github.com/popcornmix/omxplayer
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +38 -0
new file mode 100644
index 0000000..598500d
@@ -0,0 +1,38 @@
+Makefile.include: clean up the cruft
+
+Most of the variables that Makefile.include tries to set (and fails to),
+are already available from Buildroot's variables:
+  - AR, AS, CC, CXX, OBJDUMP...
+  - CFLAGS, CXXFLAGS, CPPFLAGS...
+
+This leaves us with a few select variables that defines (include and
+library) paths local to the omxplayer package, plus a few optimisations.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+diff -durN omxplayer-37fd6fb.orig/Makefile.include omxplayer-37fd6fb/Makefile.include
+--- omxplayer-37fd6fb.orig/Makefile.include    2013-10-16 14:21:05.000000000 +0200
++++ omxplayer-37fd6fb/Makefile.include 2013-10-17 22:53:02.294062252 +0200
+@@ -20,21 +20,5 @@
+
+ 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
package/omxplayer/omxplayer.mk new file +44 -1
new file mode 100644
index 0000000..8b430d2
@@ -0,0 +1,44 @@
+################################################################################
+#
+# omxplayer
+#
+################################################################################
+
+OMXPLAYER_VERSION       = f666a5dfbec36e2af7cd965558ac8643c86277a6
+OMXPLAYER_SITE          = git://github.com/popcornmix/omxplayer.git
+OMXPLAYER_LICENSE       = GPLv2+
+OMXPLAYER_LICENSE_FILES = COPYING
+
+OMXPLAYER_DEPENDENCIES  = host-pkgconf boost dbus ffmpeg2 freetype libidn \
+                         libusb pcre rpi-userland zlib
+
+OMXPLAYER_EXTRA_CFLAGS =                                        \
+       -DTARGET_LINUX -DTARGET_POSIX                           \
+       $(shell $(PKG_CONFIG_HOST_BINARY) --cflags bcm_host)    \
+       $(shell $(PKG_CONFIG_HOST_BINARY) --cflags freetype2)   \
+       $(shell $(PKG_CONFIG_HOST_BINARY) --cflags dbus-1)      \
+
+# OMXplayer has support for building in Buildroot, but that
+# procedure is, well, tainted. Fix this by forcing the real,
+# correct values.
+OMXPLAYER_MAKE_ENV =                        \
+       USE_BUILDROOT=1                     \
+       BUILDROOT=$(TOP_DIR)                \
+       SDKSTAGE=$(STAGING_DIR)             \
+       TARGETFS=$(TARGET_DIR)              \
+       TOOLCHAIN=$(HOST_DIR)/usr           \
+       HOST=$(GNU_TARGET_NAME)             \
+       SYSROOT=$(STAGING_DIR)              \
+       JOBS=$(PARALLEL_JOBS)               \
+       $(TARGET_CONFIGURE_OPTS)            \
+       CFLAGS="$(TARGET_CFLAGS) $(OMXPLAYER_EXTRA_CFLAGS)"
+
+define OMXPLAYER_BUILD_CMDS
+       $(OMXPLAYER_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define OMXPLAYER_INSTALL_TARGET_CMDS
+       $(INSTALL) -m 0755 -D $(@D)/omxplayer.bin $(TARGET_DIR)/usr/bin/omxplayer
+endef
+
+$(eval $(generic-package))
--
Quoted 2 lines

1.8.1.2

Builded and tested with local files, 720p and 1080p, works as expected.

#6 lore raw

PATCH 3/3 package/omxplayer: new package

In reply to Yann E. MORIN

Op 24-jan.-2014 20:56 schreef "Yann E. MORIN" <[email protected]>:

Quoted 4 lines

From: "Yann E. MORIN" <[email protected]>

OMXplayer uses openMAX on the RPi to play videos with hardware

acceleration.

Quoted 2 lines

Compared to using a gstreamer pipe, OMXplayer uses a complete

"tunnel-mode",

Quoted 1 line

in which the video is piped (after demuxing) into the hardware, all the

way

Quoted 1 line

down to the display, whereas gstreamer composes the video using the

eglgles

Quoted 4 lines

sink, which uses mem-to-mem copies.

So, when playing a locally-stored 1080p video, OMXplayer uses around 20% CPU, while gstreamer bursts up to 40+% when playing 720p and totally

chokes

Quoted 9 lines

on 1080p; all on an non-overclocked RPi.

Cc Maxime Hadjinlian <[email protected]>
Cc Samuel Martin <[email protected]>
---
 package/Config.in                                  |  1 +
 package/omxplayer/Config.in                        | 31 +++++++++++++++
 .../omxplayer-0000-clean-up-Makefile.include.patch | 38

+++++++++++++++++++

Quoted 1 line
 package/omxplayer/omxplayer.mk                     | 44

++++++++++++++++++++++

Quoted 3 lines
 4 files changed, 114 insertions(+)
 create mode 100644 package/omxplayer/Config.in
 create mode 100644

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch

Quoted 20 lines
 create mode 100644 package/omxplayer/omxplayer.mk
package/Config.in +1 -0
index 6d3b9c0..2743225 100644
@@ -19,6 +19,7 @@ source "package/mpd/Config.in"
 source "package/mpg123/Config.in"
 source "package/mplayer/Config.in"
 source "package/musepack/Config.in"
+source "package/omxplayer/Config.in"
 source "package/on2-8170-libs/Config.in"
 source "package/opus-tools/Config.in"
 source "package/pulseaudio/Config.in"
package/omxplayer/Config.in new file +0 -0
new file mode 100644
index 0000000..419b0be

package/omxplayer/Config.in line 2

Quoted 2 lines
package/omxplayer/Config.in new file +2 -0
@@ -0,0 +1,31 @@
+comment "omxplayer needs a toolchain w/ C++, threads, largefile, IPv6"
+       depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS

&& BR2_LARGEFILE && BR2_INET_IPV6)

package/omxplayer/Config.in

Quoted 7 lines
package/omxplayer/Config.in new file +7 -0
+       depends on BR2_arm
+
+config BR2_PACKAGE_OMXPLAYER
+       bool "omxplayer"
+       depends on BR2_arm
+       depends on BR2_INSTALL_LIBSTDCPP        # boost, rpi-userland
+       depends on BR2_TOOLCHAIN_HAS_THREADS    # boost, dbus, libusb,

rpi-userland

package/omxplayer/Config.in line 10

Quoted 1 line
package/omxplayer/Config.in new file +1 -0
+       depends on BR2_LARGEFILE                # boost, ffmpeg2,

rpi-userland

Quoted 7 lines
package/omxplayer/Config.in new file +7 -0
+       depends on BR2_INET_IPV6                # ffmpeg2
+       depends on !BR2_PACKAGE_FFMPEG          # ffmpeg2
+       depends on BR2_USE_MMU                  # dbus
+       select BR2_PACKAGE_BOOST
+       select BR2_PACKAGE_DBUS
+       select BR2_PACKAGE_FFMPEG2
+       select BR2_PACKAGE_FFMPEG2_AVFILTER

package/omxplayer/Config.in

Quoted 10 lines
package/omxplayer/Config.in new file +10 -0
+       select BR2_PACKAGE_FFMPEG2_SWRESAMPLE
+       select BR2_PACKAGE_FFMPEG2_SWSCALE
+       select BR2_PACKAGE_FREETYPE
+       select BR2_PACKAGE_LIBIDN
+       select BR2_PACKAGE_LIBUSB
+       select BR2_PACKAGE_PCRE
+       select BR2_PACKAGE_RPI_USERLAND
+       select BR2_PACKAGE_ZLIB
+       help
+         OMXPlayer is a commandline OMX player for the Raspberry Pi. It

was

Quoted 5 lines
package/omxplayer/Config.in new file +4 -0
+         developed as a testbed for the XBMC Raspberry PI implementation
+         and is quite handy to use standalone.
+
+         https://github.com/popcornmix/omxplayer

diff --git

a/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch

Quoted 7 lines

new file mode 100644
index 0000000..598500d

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +2 -0
@@ -0,0 +1,38 @@
+Makefile.include: clean up the cruft
+

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 12

Quoted 10 lines
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +10 -0
+Most of the variables that Makefile.include tries to set (and fails to),
+are already available from Buildroot's variables:
+  - AR, AS, CC, CXX, OBJDUMP...
+  - CFLAGS, CXXFLAGS, CPPFLAGS...
+
+This leaves us with a few select variables that defines (include and
+library) paths local to the omxplayer package, plus a few optimisations.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+diff -durN omxplayer-37fd6fb.orig/Makefile.include

omxplayer-37fd6fb/Makefile.include

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 13

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
+--- omxplayer-37fd6fb.orig/Makefile.include    2013-10-16

14:21:05.000000000 +0200

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 14

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
++++ omxplayer-37fd6fb/Makefile.include 2013-10-17 22:53:02.294062252

+0200

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch

Quoted 9 lines
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +9 -0
+@@ -20,21 +20,5 @@
+
+ JOBS=7
+
+-CFLAGS                        := -isystem$(PREFIX)/include
+-CXXFLAGS              := $(CFLAGS)
+-CPPFLAGS              := $(CFLAGS)
+-LDFLAGS                       := -L$(BUILDROOT)/lib
+-LD                                    := $(TOOLCHAIN)/bin/$(HOST)-ld

--sysroot=$(SYSROOT)

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 24

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
+-CC                                    := $(TOOLCHAIN)/bin/$(HOST)-gcc

--sysroot=$(SYSROOT)

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch

Quoted 7 lines
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +7 -0
+-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)

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 33

Quoted 2 lines
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +2 -0
+-
+-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

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 34

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
+-LDFLAGS                       += -L$(SDKSTAGE)/lib

-L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 35

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
+-#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

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 36

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
+-INCLUDES              += -isystem$(SDKSTAGE)/opt/vc/include

-isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include

package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch line 37

Quoted 1 line
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
++CFLAGS                        += -fomit-frame-pointer -Wno-psabi

-mno-apcs-stack-check \

package/omxplayer/

Quoted 2 lines
package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch new file +1 -0
++                         -mstructure-size-boundary=32 -mno-sched-prolog
package/omxplayer/ renamed from package/omxplayer/omxplayer.mk +0 -0

omxplayer.mk

package/omxplayer/omxplayer.mk

Quoted 6 lines

new file mode 100644
index 0000000..8b430d2

package/omxplayer/omxplayer.mk new file +0 -0
@@ -0,0 +1,44 @@

+################################################################################

package/omxplayer/omxplayer.mk line 4

Quoted 4 lines
package/omxplayer/omxplayer.mk new file +3 -0
+#
+# omxplayer
+#

+################################################################################

package/omxplayer/omxplayer.mk line 8

Quoted 3 lines
package/omxplayer/omxplayer.mk new file +3 -0
+
+OMXPLAYER_VERSION       = f666a5dfbec36e2af7cd965558ac8643c86277a6
+OMXPLAYER_SITE          = git://github.com/popcornmix/omxplayer.git

Any specific reason why you're using the git protocol and not the github helper (https)? I'm planning a patch to replace all this, because not all company network firewalls like git.

Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140125/78f68b52/attachment.html>

#7 lore raw

PATCH 3/3 package/omxplayer: new package

Thomas, All,

On 2014-01-25 21:39 +0100, Thomas De Schampheleire spake thusly:

Quoted 6 lines

Op 24-jan.-2014 20:56 schreef "Yann E. MORIN" <[email protected]>:

package/omxplayer/omxplayer.mk line 8

Quoted 2 lines
package/omxplayer/omxplayer.mk new file +2 -0
+OMXPLAYER_VERSION       = f666a5dfbec36e2af7cd965558ac8643c86277a6
+OMXPLAYER_SITE          = git://github.com/popcornmix/omxplayer.git

Any specific reason why you're using the git protocol and not the github helper (https)?

The only reason is that I initially wrote this patch before the github helper existed, and that I forgot to switch.

Thanks!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'