* [Buildroot] [PATCH 0/3] Add ffmpeg-2 and omxplayer
@ 2014-01-24 19:56 Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-01-24 19:56 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change
2014-01-24 19:56 [Buildroot] [PATCH 0/3] Add ffmpeg-2 and omxplayer Yann E. MORIN
@ 2014-01-24 19:56 ` Yann E. MORIN
2014-01-28 22:55 ` Peter Korsgaard
2014-01-24 19:56 ` [Buildroot] [PATCH 2/3] package/ffmpeg2: new package Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 3/3] package/omxplayer: " Yann E. MORIN
2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2014-01-24 19:56 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
package/rpi-userland/rpi-userland.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
index 35eaf24..223b645 100644
--- a/package/rpi-userland/rpi-userland.mk
+++ b/package/rpi-userland/rpi-userland.mk
@@ -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
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/3] package/ffmpeg2: new package
2014-01-24 19:56 [Buildroot] [PATCH 0/3] Add ffmpeg-2 and omxplayer Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change Yann E. MORIN
@ 2014-01-24 19:56 ` Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 3/3] package/omxplayer: " Yann E. MORIN
2 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-01-24 19:56 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bernd Kuhls <berndkuhls@hotmail.com>
---
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
diff --git a/package/Config.in b/package/Config.in
index 397cc11..6d3b9c0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/ffmpeg2/Config.in b/package/ffmpeg2/Config.in
new file mode 100644
index 0000000..ce61900
--- /dev/null
+++ b/package/ffmpeg2/Config.in
@@ -0,0 +1,235 @@
+comment "ffmpeg2 needs a toolchain w/ largefile, IPv6"
+ depends on !(BR2_LARGEFILE && BR2_INET_IPV6) && !BR2_PACKAGE_FFMPEG2
+
+# Warning! Moving this comment to the top of the file will make it
+# appear in the ffmpeg sub-menu, dues to its dependency on ffmpeg.
+# Be sure to keep it here, below the other comment above, which breaks
+# the dependency chain, and thus breaks the adherence to the ffmpeg
+# sub-menu.
+comment "ffmpeg2 conflicts with ffmpeg"
+ depends on BR2_PACKAGE_FFMPEG
+
+menuconfig BR2_PACKAGE_FFMPEG2
+ bool "ffmpeg2"
+ depends on !BR2_PACKAGE_FFMPEG
+ depends on BR2_LARGEFILE
+ depends on BR2_INET_IPV6
+ help
+ FFmpeg is a complete, cross-platform solution to record, convert
+ and stream audio and video.
+
+ http://www.ffmpeg.org
+
+ Note: the help texts of the FFmpeg2 options, below, are scrapped
+ directly from FFMpeg2's ./configure --help. Refer to the project's
+ documentation for the actual meaning of the help texts.
+
+if BR2_PACKAGE_FFMPEG2
+
+config BR2_PACKAGE_FFMPEG2_GPL
+ bool "Enable GPL code"
+ help
+ Allow use of GPL code, the resulting libs and binaries will
+ be under GPL
+
+config BR2_PACKAGE_FFMPEG2_GPL3
+ bool "Use (L)GPLv3 instead of v2"
+ depends on BR2_PACKAGE_FFMPEG2_GPL
+ help
+ upgrade (L)GPL to version 3
+
+config BR2_PACKAGE_FFMPEG2_NONFREE
+ bool "Enable nonfree code"
+ help
+ allow use of nonfree code, the resulting libs and binaries
+ will be unredistributable
+
+comment "Programs"
+
+config BR2_PACKAGE_FFMPEG2_FFMPEG
+ bool "ffmpeg"
+ select BR2_PACKAGE_FFMPEG2_SWSCALE
+ default y
+ help
+ FFmpeg is a very fast video and audio converter.
+ It can also grab from a live audio/video source.
+
+ It is not needed if you want to link the FFmpeg libraries
+ to your application.
+
+config BR2_PACKAGE_FFMPEG2_FFPLAY
+ bool "ffplay"
+ select BR2_PACKAGE_SDL
+ help
+ FFplay is a very simple and portable media player using the
+ FFmpeg libraries and the SDL library.
+ It is mostly used as a testbed for the various FFmpeg APIs.
+
+config BR2_PACKAGE_FFMPEG2_FFPROBE
+ bool "ffprobe"
+ help
+ ffprobe gathers information from multimedia streams and prints
+ it in human- and machine-readable fashion.
+
+config BR2_PACKAGE_FFMPEG2_FFSERVER
+ bool "ffserver"
+ help
+ FFserver is a streaming server for both audio and video.
+
+comment "Libraries"
+
+config BR2_PACKAGE_FFMPEG2_AVCODEC
+ bool "libavcodec"
+
+config BR2_PACKAGE_FFMPEG2_AVDEVICE
+ bool "libavdevice"
+
+config BR2_PACKAGE_FFMPEG2_AVFILTER
+ bool "libavfilter"
+ select BR2_PACKAGE_FFMPEG2_AVUTIL
+ select BR2_PACKAGE_FFMPEG2_AVFORMAT
+ select BR2_PACKAGE_FFMPEG2_AVCODEC
+
+config BR2_PACKAGE_FFMPEG2_AVFORMAT
+ bool "libavformat"
+
+config BR2_PACKAGE_FFMPEG2_AVRESAMPLE
+ bool "libavresample"
+
+config BR2_PACKAGE_FFMPEG2_AVUTIL
+ bool "libavutil"
+
+config BR2_PACKAGE_FFMPEG2_POSTPROC
+ bool "libpostproc"
+ depends on BR2_PACKAGE_FFMPEG2_GPL
+
+config BR2_PACKAGE_FFMPEG2_SWRESAMPLE
+ bool "libswresample"
+
+config BR2_PACKAGE_FFMPEG2_SWSCALE
+ bool "libswscale"
+
+comment "Hardware acceleration"
+
+config BR2_PACKAGE_FFMPEG2_DXVA2
+ bool "dxva2"
+
+config BR2_PACKAGE_FFMPEG2_VAAPI
+ bool "vaapi"
+
+config BR2_PACKAGE_FFMPEG2_VDA
+ bool "vda"
+
+config BR2_PACKAGE_FFMPEG2_VDPAU
+ bool "vdpau"
+
+comment "Components options"
+
+config BR2_PACKAGE_FFMPEG2_ENCODERS
+ string "Enabled encoders"
+ default "all"
+ help
+ Space-separated list of encoders to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-encoders in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_DECODERS
+ string "Enabled decoders"
+ default "all"
+ help
+ Space-separated list of decoders to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-decoders in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_MUXERS
+ string "Enabled muxers"
+ default "all"
+ help
+ Space-separated list of muxers to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-muxers in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_DEMUXERS
+ string "Enabled demuxers"
+ default "all"
+ help
+ Space-separated list of demuxers to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-demuxers in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_PARSERS
+ string "Enabled parsers"
+ default "all"
+ help
+ Space-separated list of parsers to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-parsers in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_BSFS
+ string "Enabled bitstreams"
+ default "all"
+ help
+ Space-separated list of bitstream filters to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-bsfs in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_PROTOCOLS
+ string "Enabled protocols"
+ default "all"
+ help
+ Space-separated list of protocols to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-protocols in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_FILTERS
+ string "Enabled filters"
+ default "all"
+ help
+ Space-separated list of filters to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-filters in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_INDEVS
+ string "Enabled input devices"
+ default "all"
+ help
+ Space-separated list of input devices to build into FFMpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-indevs in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_OUTDEVS
+ string "Enabled output devices"
+ default "all"
+ help
+ Space-separated list of output devices to build into FFMpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-outdevs in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG2_EXTRACONF
+ string "Additional parameters for ./configure"
+ default ""
+ help
+ Extra parameters that will be appended to FFmpeg's
+ ./configure commandline.
+
+endif
diff --git a/package/ffmpeg2/ffmpeg2.mk b/package/ffmpeg2/ffmpeg2.mk
new file mode 100644
index 0000000..0bca20f
--- /dev/null
+++ b/package/ffmpeg2/ffmpeg2.mk
@@ -0,0 +1,274 @@
+################################################################################
+#
+# ffmpeg
+#
+################################################################################
+
+FFMPEG2_VERSION = 2.1.3
+FFMPEG2_SOURCE = ffmpeg-$(FFMPEG2_VERSION).tar.bz2
+FFMPEG2_SITE = http://ffmpeg.org/releases
+FFMPEG2_INSTALL_STAGING = YES
+
+FFMPEG2_LICENSE = LGPLv2.1+, libjpeg license
+FFMPEG2_LICENSE_FILES = LICENSE COPYING.LGPLv2.1
+ifeq ($(BR2_PACKAGE_FFMPEG2_GPL),y)
+FFMPEG2_LICENSE += and GPLv2+
+FFMPEG2_LICENSE_FILES += COPYING.GPLv2
+endif
+
+FFMPEG2_CONF_OPTS = \
+ --prefix=/usr \
+ $(if $(BR2_HAVE_DOCUMENTATION),,--disable-doc)
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_GPL),y)
+FFMPEG2_CONF_OPTS += --enable-gpl
+else
+FFMPEG2_CONF_OPTS += --disable-gpl
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_NONFREE),y)
+FFMPEG2_CONF_OPTS += --enable-nonfree
+else
+FFMPEG2_CONF_OPTS += --disable-nonfree
+endif
+
+#------------------
+# Programs
+ifeq ($(BR2_PACKAGE_FFMPEG2_FFMPEG),y)
+FFMPEG2_CONF_OPTS += --enable-ffmpeg
+else
+FFMPEG2_CONF_OPTS += --disable-ffmpeg
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_FFPLAY),y)
+FFMPEG2_DEPENDENCIES += sdl
+FFMPEG2_CONF_OPTS += --enable-ffplay
+FFMPEG2_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config
+else
+FFMPEG2_CONF_OPTS += --disable-ffplay
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_FFPROBE),y)
+FFMPEG2_CONF_OPTS += --enable-ffprobe
+else
+FFMPEG2_CONF_OPTS += --disable-ffprobe
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_FFSERVER),y)
+FFMPEG2_CONF_OPTS += --enable-ffserver
+else
+FFMPEG2_CONF_OPTS += --disable-ffserver
+endif
+
+#------------------
+# Libraries
+ifeq ($(BR2_PACKAGE_FFMPEG2_AVCODEC),y)
+FFMPEG2_CONF_OPTS += --enable-avcodec
+else
+FFMPEG2_CONF_OPTS += --disable-avcodec
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_AVDEVICE),y)
+FFMPEG2_CONF_OPTS += --enable-avdevice
+else
+FFMPEG2_CONF_OPTS += --disable-avdevice
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_AVFILTER),y)
+FFMPEG2_CONF_OPTS += --enable-avfilter
+else
+FFMPEG2_CONF_OPTS += --disable-avfilter
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_AVFORMAT),y)
+FFMPEG2_CONF_OPTS += --enable-avformat
+else
+FFMPEG2_CONF_OPTS += --disable-avformat
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_AVRESAMPLE),y)
+FFMPEG2_CONF_OPTS += --enable-avresample
+else
+FFMPEG2_CONF_OPTS += --disable-avresample
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_AVUTIL),y)
+FFMPEG2_CONF_OPTS += --enable-avutil
+else
+FFMPEG2_CONF_OPTS += --disable-avutil
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_POSTPROC),y)
+FFMPEG2_CONF_OPTS += --enable-postproc
+else
+FFMPEG2_CONF_OPTS += --disable-postproc
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_SWRESAMPLE),y)
+FFMPEG2_CONF_OPTS += --enable-swresample
+else
+FFMPEG2_CONF_OPTS += --disable-swresample
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_SWSCALE),y)
+FFMPEG2_CONF_OPTS += --enable-swscale
+else
+FFMPEG2_CONF_OPTS += --disable-swscale
+endif
+
+#------------------
+# Hardware acceleration
+ifeq ($(BR2_PACKAGE_FFMPEG2_DXVA2),y)
+FFMPEG2_CONF_OPTS += --enable-dxva2
+else
+FFMPEG2_CONF_OPTS += --disable-dxva2
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_VAAPI),y)
+FFMPEG2_CONF_OPTS += --enable-vaapi
+else
+FFMPEG2_CONF_OPTS += --disable-vaapi
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_VDA),y)
+FFMPEG2_CONF_OPTS += --enable-vda
+else
+FFMPEG2_CONF_OPTS += --disable-vda
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG2_VDPAU),y)
+FFMPEG2_CONF_OPTS += --enable-vdpau
+else
+FFMPEG2_CONF_OPTS += --disable-vdpau
+endif
+
+#------------------
+# Components options
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_ENCODERS)),all)
+FFMPEG2_CONF_OPTS += --disable-encoders \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_ENCODERS)),--enable-encoder=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_DECODERS)),all)
+FFMPEG2_CONF_OPTS += --disable-decoders \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_DECODERS)),--enable-decoder=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_MUXERS)),all)
+FFMPEG2_CONF_OPTS += --disable-muxers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_MUXERS)),--enable-muxer=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_DEMUXERS)),all)
+FFMPEG2_CONF_OPTS += --disable-demuxers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_DEMUXERS)),--enable-demuxer=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_PARSERS)),all)
+FFMPEG2_CONF_OPTS += --disable-parsers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_PARSERS)),--enable-parser=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_BSFS)),all)
+FFMPEG2_CONF_OPTS += --disable-bsfs \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_BSFS)),--enable-bsf=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_PROTOCOLS)),all)
+FFMPEG2_CONF_OPTS += --disable-protocols \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_PROTOCOLS)),--enable-protocol=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_FILTERS)),all)
+FFMPEG2_CONF_OPTS += --disable-filters \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_FILTERS)),--enable-filter=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_INDEVS)),all)
+FFMPEG2_CONF_OPTS += --disable-indevs \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_INDEVS)),--enable-indevs=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG2_OUTDEVS)),all)
+FFMPEG2_CONF_OPTS += --disable-indevs \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG2_OUTDEVS)),--enable-outdevs=$(x))
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+FFMPEG2_CONF_OPTS += --enable-pthreads
+else
+FFMPEG2_CONF_OPTS += --disable-pthreads
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+FFMPEG2_CONF_OPTS += --enable-zlib
+FFMPEG2_DEPENDENCIES += zlib
+else
+FFMPEG2_CONF_OPTS += --disable-zlib
+endif
+
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+# MMX on is default for x86, disable it for lowly x86-type processors
+ifeq ($(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_i686)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y)
+FFMPEG2_CONF_OPTS += --disable-mmx
+else
+# If it is enabled, nasm is required
+FFMPEG2_DEPENDENCIES += host-nasm
+endif
+endif
+
+# Explicitly disable everything that doesn't match for ARM
+# FFMPEG "autodetects" by compiling an extended instruction via AS
+# This works on compilers that aren't built for generic by default
+ifeq ($(BR2_arm)$(BR2_armeb),y)
+ifeq ($(BR2_arm7tdmi)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t)$(BR2_strongarm)$(BR2_fa526),y)
+FFMPEG2_CONF_OPTS += --disable-armv5te
+endif
+ifeq ($(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf_s),y)
+FFMPEG2_CONF_OPTS += --enable-armv6
+else
+FFMPEG2_CONF_OPTS += --disable-armv6 --disable-armv6t2
+endif
+# Note: VFPV(n+1) always selects VFPV(n),
+# so we just need to depend on VFPV2 here.
+ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y)
+FFMPEG2_CONF_OPTS += --enable-vfp
+else
+FFMPEG2_CONF_OPTS += --disable-vfp
+endif
+ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
+FFMPEG2_CONF_OPTS += --enable-neon
+endif
+endif # BR2_arm || BR2_armeb
+
+# Set powerpc altivec appropriately
+ifeq ($(BR2_powerpc),y)
+ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+FFMPEG2_CONF_OPTS += --enable-altivec
+else
+FFMPEG2_CONF_OPTS += --disable-altivec
+endif
+endif
+
+FFMPEG2_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG2_EXTRACONF))
+
+# Override FFMPEG2_CONFIGURE_CMDS: FFmpeg does not support --target and others
+define FFMPEG2_CONFIGURE_CMDS
+ (cd $(FFMPEG2_SRCDIR) && rm -rf config.cache && \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ $(FFMPEG2_CONF_ENV) \
+ ./configure \
+ --enable-cross-compile \
+ --cross-prefix=$(TARGET_CROSS) \
+ --sysroot=$(STAGING_DIR) \
+ --host-cc="$(HOSTCC)" \
+ --arch=$(BR2_ARCH) \
+ --target-os=linux \
+ --extra-cflags=-fPIC \
+ $(SHARED_STATIC_LIBS_OPTS) \
+ $(FFMPEG2_CONF_OPTS) \
+ )
+endef
+
+$(eval $(autotools-package))
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/3] package/omxplayer: new package
2014-01-24 19:56 [Buildroot] [PATCH 0/3] Add ffmpeg-2 and omxplayer Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 2/3] package/ffmpeg2: new package Yann E. MORIN
@ 2014-01-24 19:56 ` Yann E. MORIN
2014-01-25 14:04 ` Maxime Hadjinlian
2014-01-25 20:39 ` Thomas De Schampheleire
2 siblings, 2 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-01-24 19:56 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>
---
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
diff --git a/package/Config.in b/package/Config.in
index 6d3b9c0..2743225 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/omxplayer/Config.in b/package/omxplayer/Config.in
new file mode 100644
index 0000000..419b0be
--- /dev/null
+++ b/package/omxplayer/Config.in
@@ -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
diff --git a/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
new file mode 100644
index 0000000..598500d
--- /dev/null
+++ b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
@@ -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" <yann.morin.1998@free.fr>
+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
diff --git a/package/omxplayer/omxplayer.mk b/package/omxplayer/omxplayer.mk
new file mode 100644
index 0000000..8b430d2
--- /dev/null
+++ b/package/omxplayer/omxplayer.mk
@@ -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))
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/3] package/omxplayer: new package
2014-01-24 19:56 ` [Buildroot] [PATCH 3/3] package/omxplayer: " Yann E. MORIN
@ 2014-01-25 14:04 ` Maxime Hadjinlian
2014-01-25 20:39 ` Thomas De Schampheleire
1 sibling, 0 replies; 8+ messages in thread
From: Maxime Hadjinlian @ 2014-01-25 14:04 UTC (permalink / raw)
To: buildroot
Hi Yann, all
On Fri, Jan 24, 2014 at 8:56 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> 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.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> Cc: Samuel Martin <s.martin49@gmail.com>
> ---
> 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
>
> diff --git a/package/Config.in b/package/Config.in
> index 6d3b9c0..2743225 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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"
> diff --git a/package/omxplayer/Config.in b/package/omxplayer/Config.in
> new file mode 100644
> index 0000000..419b0be
> --- /dev/null
> +++ b/package/omxplayer/Config.in
> @@ -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
> diff --git a/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
> new file mode 100644
> index 0000000..598500d
> --- /dev/null
> +++ b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
> @@ -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" <yann.morin.1998@free.fr>
> +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
> diff --git a/package/omxplayer/omxplayer.mk b/package/omxplayer/omxplayer.mk
> new file mode 100644
> index 0000000..8b430d2
> --- /dev/null
> +++ b/package/omxplayer/omxplayer.mk
> @@ -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))
> --
> 1.8.1.2
>
Builded and tested with local files, 720p and 1080p, works as expected.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/3] package/omxplayer: new package
2014-01-24 19:56 ` [Buildroot] [PATCH 3/3] package/omxplayer: " Yann E. MORIN
2014-01-25 14:04 ` Maxime Hadjinlian
@ 2014-01-25 20:39 ` Thomas De Schampheleire
2014-01-26 10:28 ` Yann E. MORIN
1 sibling, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-01-25 20:39 UTC (permalink / raw)
To: buildroot
Op 24-jan.-2014 20:56 schreef "Yann E. MORIN" <yann.morin.1998@free.fr>:
>
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> 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.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> Cc: Samuel Martin <s.martin49@gmail.com>
> ---
> 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
>
> diff --git a/package/Config.in b/package/Config.in
> index 6d3b9c0..2743225 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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"
> diff --git a/package/omxplayer/Config.in b/package/omxplayer/Config.in
> new file mode 100644
> index 0000000..419b0be
> --- /dev/null
> +++ b/package/omxplayer/Config.in
> @@ -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
> diff --git
a/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
> new file mode 100644
> index 0000000..598500d
> --- /dev/null
> +++ b/package/omxplayer/omxplayer-0000-clean-up-Makefile.include.patch
> @@ -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" <yann.morin.1998@free.fr>
> +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
> diff --git a/package/omxplayer/omxplayer.mk b/package/omxplayer/
omxplayer.mk
> new file mode 100644
> index 0000000..8b430d2
> --- /dev/null
> +++ b/package/omxplayer/omxplayer.mk
> @@ -0,0 +1,44 @@
>
+################################################################################
> +#
> +# omxplayer
> +#
>
+################################################################################
> +
> +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>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/3] package/omxplayer: new package
2014-01-25 20:39 ` Thomas De Schampheleire
@ 2014-01-26 10:28 ` Yann E. MORIN
0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-01-26 10:28 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-01-25 21:39 +0100, Thomas De Schampheleire spake thusly:
> Op 24-jan.-2014 20:56 schreef "Yann E. MORIN" <yann.morin.1998@free.fr>:
> > +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.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change
2014-01-24 19:56 ` [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change Yann E. MORIN
@ 2014-01-28 22:55 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2014-01-28 22:55 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 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.
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-01-28 22:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 19:56 [Buildroot] [PATCH 0/3] Add ffmpeg-2 and omxplayer Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 1/3] package/rpi-userland: fix fall-out after cmake infra change Yann E. MORIN
2014-01-28 22:55 ` Peter Korsgaard
2014-01-24 19:56 ` [Buildroot] [PATCH 2/3] package/ffmpeg2: new package Yann E. MORIN
2014-01-24 19:56 ` [Buildroot] [PATCH 3/3] package/omxplayer: " Yann E. MORIN
2014-01-25 14:04 ` Maxime Hadjinlian
2014-01-25 20:39 ` Thomas De Schampheleire
2014-01-26 10:28 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox