From 29d6678fd546377459ef75cf54abeef5b969b5cf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 27 Aug 2010 15:14:24 +0100 Subject: Major layout change to the packages directory Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie --- meta/recipes-multimedia/alsa/alsa-fpu.inc | 6 + .../alsa-lib-1.0.23/fix-tstamp-declaration.patch | 19 + .../alsa/alsa-lib-1.0.23/unbreak_plugindir.patch | 12 + meta/recipes-multimedia/alsa/alsa-lib_1.0.23.bb | 40 ++ meta/recipes-multimedia/alsa/alsa-oss_1.0.17.bb | 12 + meta/recipes-multimedia/alsa/alsa-tools_1.0.20.bb | 10 + .../alsa/alsa-utils-1.0.23/ncursesfix.patch | 42 ++ meta/recipes-multimedia/alsa/alsa-utils_1.0.23.bb | 67 +++ .../flac/flac-1.2.1/disable-xmms-plugin.patch | 24 + .../flac/flac-1.2.1/flac-gcc43-fixes.patch | 14 + meta/recipes-multimedia/flac/flac-1.2.1/xmms.m4 | 149 +++++++ meta/recipes-multimedia/flac/flac_1.2.1.bb | 49 +++ .../gst-ffmpeg-0.10.1/configure_fix.patch | 13 + .../gstreamer/gst-ffmpeg-0.10.1/no_beos.patch | 55 +++ .../gstreamer/gst-ffmpeg_0.10.1.bb | 32 ++ .../gstreamer/gst-fluendo-mp3/configure_fix.patch | 16 + .../gstreamer/gst-fluendo-mp3_0.10.2.bb | 9 + .../gstreamer/gst-fluendo-mpegdemux_0.10.7.bb | 2 + meta/recipes-multimedia/gstreamer/gst-fluendo.inc | 20 + .../gstreamer/gst-meta-base_0.10.bb | 51 +++ .../gstreamer/gst-openmax_0.10.0.2.bb | 18 + .../gstreamer/gst-plugins-bad_0.10.19.bb | 24 + .../gstreamer/gst-plugins-base_0.10.29.bb | 22 + .../gstreamer/gst-plugins-good_0.10.23.bb | 19 + .../gstreamer/gst-plugins-ugly_0.10.15.bb | 19 + meta/recipes-multimedia/gstreamer/gst-plugins.inc | 33 ++ .../gstreamer/gstreamer-0.10.29/check_fix.patch | 17 + .../gst-inspect-check-error.patch | 14 + .../gstreamer-0.10.29/gstregistrybinary.c | 487 +++++++++++++++++++++ .../gstreamer-0.10.29/gstregistrybinary.h | 194 ++++++++ .../gstreamer/gstreamer_0.10.29.bb | 30 ++ .../lame/lame-3.98.4/no-gtk1.patch | 18 + meta/recipes-multimedia/lame/lame_3.98.4.bb | 28 ++ .../liba52/liba52/buildcleanup.patch | 87 ++++ meta/recipes-multimedia/liba52/liba52_0.7.4.bb | 25 ++ meta/recipes-multimedia/libexif/libexif_0.6.16.bb | 15 + .../libid3tag/libid3tag/addpkgconfig.patch | 41 ++ .../libid3tag/libid3tag_0.15.1b.bb | 20 + .../libmad/libmad/add-pkgconfig.patch | 68 +++ .../libmad/fix_for_mips_with_gcc-4.5.0.patch | 31 ++ .../libmad/libmad/no-force-mem.patch | 16 + meta/recipes-multimedia/libmad/libmad_0.15.1b.bb | 32 ++ meta/recipes-multimedia/libogg/libogg_1.2.0.bb | 15 + meta/recipes-multimedia/libpng/libpng_1.2.44.bb | 23 + .../libtiff/files/libtool2.patch | 19 + meta/recipes-multimedia/libtiff/tiff_3.8.2.bb | 17 + .../libvorbis/libvorbis_1.3.1.bb | 23 + meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb | 31 ++ .../fix_build_issue_for_gcc_4.5.0.patch | 37 ++ .../musicbrainz/libmusicbrainz_3.0.2.bb | 13 + meta/recipes-multimedia/tremor/tremor_20100422.bb | 19 + 51 files changed, 2097 insertions(+) create mode 100644 meta/recipes-multimedia/alsa/alsa-fpu.inc create mode 100644 meta/recipes-multimedia/alsa/alsa-lib-1.0.23/fix-tstamp-declaration.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib-1.0.23/unbreak_plugindir.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib_1.0.23.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-oss_1.0.17.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-tools_1.0.20.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-utils-1.0.23/ncursesfix.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-utils_1.0.23.bb create mode 100644 meta/recipes-multimedia/flac/flac-1.2.1/disable-xmms-plugin.patch create mode 100644 meta/recipes-multimedia/flac/flac-1.2.1/flac-gcc43-fixes.patch create mode 100644 meta/recipes-multimedia/flac/flac-1.2.1/xmms.m4 create mode 100644 meta/recipes-multimedia/flac/flac_1.2.1.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/configure_fix.patch create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/no_beos.patch create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.1.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-fluendo-mp3/configure_fix.patch create mode 100644 meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.2.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-fluendo-mpegdemux_0.10.7.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-fluendo.inc create mode 100644 meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-openmax_0.10.0.2.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.19.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.29.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.23.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.15.bb create mode 100644 meta/recipes-multimedia/gstreamer/gst-plugins.inc create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/check_fix.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gst-inspect-check-error.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.c create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.h create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer_0.10.29.bb create mode 100644 meta/recipes-multimedia/lame/lame-3.98.4/no-gtk1.patch create mode 100644 meta/recipes-multimedia/lame/lame_3.98.4.bb create mode 100644 meta/recipes-multimedia/liba52/liba52/buildcleanup.patch create mode 100644 meta/recipes-multimedia/liba52/liba52_0.7.4.bb create mode 100644 meta/recipes-multimedia/libexif/libexif_0.6.16.bb create mode 100644 meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch create mode 100644 meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb create mode 100644 meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch create mode 100644 meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch create mode 100644 meta/recipes-multimedia/libmad/libmad/no-force-mem.patch create mode 100644 meta/recipes-multimedia/libmad/libmad_0.15.1b.bb create mode 100644 meta/recipes-multimedia/libogg/libogg_1.2.0.bb create mode 100644 meta/recipes-multimedia/libpng/libpng_1.2.44.bb create mode 100644 meta/recipes-multimedia/libtiff/files/libtool2.patch create mode 100644 meta/recipes-multimedia/libtiff/tiff_3.8.2.bb create mode 100644 meta/recipes-multimedia/libvorbis/libvorbis_1.3.1.bb create mode 100644 meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb create mode 100644 meta/recipes-multimedia/musicbrainz/libmusicbrainz/fix_build_issue_for_gcc_4.5.0.patch create mode 100644 meta/recipes-multimedia/musicbrainz/libmusicbrainz_3.0.2.bb create mode 100644 meta/recipes-multimedia/tremor/tremor_20100422.bb (limited to 'meta/recipes-multimedia') diff --git a/meta/recipes-multimedia/alsa/alsa-fpu.inc b/meta/recipes-multimedia/alsa/alsa-fpu.inc new file mode 100644 index 0000000000..ebd3493e6c --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-fpu.inc @@ -0,0 +1,6 @@ + +def get_alsa_fpu_setting(bb, d): + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + return "--with-softfloat" + return "" + diff --git a/meta/recipes-multimedia/alsa/alsa-lib-1.0.23/fix-tstamp-declaration.patch b/meta/recipes-multimedia/alsa/alsa-lib-1.0.23/fix-tstamp-declaration.patch new file mode 100644 index 0000000000..9016b348de --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib-1.0.23/fix-tstamp-declaration.patch @@ -0,0 +1,19 @@ +# Author: Michael Lauer +# Date: Thu Jan 18 00:27:21 2007 +0000 +# alsa-lib: fix "error: field 'tstamp' has incomplete type" when including alsa headers with strict compilation options +# +# Acquired from OpenEmbedded + +Index: alsa-lib-1.0.13/include/global.h +=================================================================== +--- alsa-lib-1.0.13.orig/include/global.h ++++ alsa-lib-1.0.13/include/global.h +@@ -29,6 +29,8 @@ + #define __ALSA_GLOBAL_H_ + + /* for timeval and timespec */ ++#define __need_timeval ++#define __need_timespec + #include + + #ifdef __cplusplus diff --git a/meta/recipes-multimedia/alsa/alsa-lib-1.0.23/unbreak_plugindir.patch b/meta/recipes-multimedia/alsa/alsa-lib-1.0.23/unbreak_plugindir.patch new file mode 100644 index 0000000000..7d13166809 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib-1.0.23/unbreak_plugindir.patch @@ -0,0 +1,12 @@ +diff -Nur alsa-lib-1.0.14.orig/configure.in alsa-lib-1.0.14/configure.in +--- alsa-lib-1.0.14.orig/configure.in 2007-05-31 03:05:13.000000000 -0500 ++++ alsa-lib-1.0.14/configure.in 2007-08-18 13:05:49.000000000 -0500 +@@ -93,7 +93,7 @@ + esac + plugindir="$dir/$PACKAGE" + fi +-AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "plugindir", [directory containing ALSA add-on modules]) ++AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "${plugindir}", [directory containing ALSA add-on modules]) + ALSA_PLUGIN_DIR="$plugindir" + AC_SUBST(ALSA_PLUGIN_DIR) + diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.23.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.23.bb new file mode 100644 index 0000000000..b0a2a305c0 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.23.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Alsa sound library" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" +SECTION = "libs/multimedia" +LICENSE = "LGPLv2.1 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ + file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545" + +# configure.in sets -D__arm__ on the command line for any arm system +# (not just those with the ARM instruction set), this should be removed, +# (or replaced by a permitted #define). +#FIXME: remove the following +ARM_INSTRUCTION_SET = "arm" + +PR = "r0" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ + file://fix-tstamp-declaration.patch;patch=1" + +inherit autotools pkgconfig + +require alsa-fpu.inc +EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} " + +EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python" + +PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev" +FILES_${PN}-dbg += "${libdir}/alsa-lib/*/.debu*" +FILES_libasound = "${libdir}/libasound.so.*" +FILES_alsa-server = "${bindir}/*" +FILES_alsa-conf = "${datadir}/alsa/" +FILES_alsa-dev += "${libdir}/pkgconfig/ /usr/include/ ${datadir}/aclocal/*" +FILES_alsa-conf-base = "\ +${datadir}/alsa/alsa.conf \ +${datadir}/alsa/cards/aliases.conf \ +${datadir}/alsa/pcm/default.conf \ +${datadir}/alsa/pcm/dmix.conf \ +${datadir}/alsa/pcm/dsnoop.conf" + +RDEPENDS_libasound = "alsa-conf-base" diff --git a/meta/recipes-multimedia/alsa/alsa-oss_1.0.17.bb b/meta/recipes-multimedia/alsa/alsa-oss_1.0.17.bb new file mode 100644 index 0000000000..00e00dc62b --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-oss_1.0.17.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Alsa OSS Compatibility Package" +SECTION = "libs/multimedia" +LICENSE = "GPL" +DEPENDS = "alsa-lib" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-${PV}.tar.bz2" + +inherit autotools + +do_configure_prepend () { + touch NEWS README AUTHORS ChangeLog +} diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.20.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.20.bb new file mode 100644 index 0000000000..789b68e438 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.20.bb @@ -0,0 +1,10 @@ +BROKEN = "1" + +DESCRIPTION = "Alsa Tools" +SECTION = "console/utils" +LICENSE = "GPL" +DEPENDS = "alsa-lib ncurses" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/alsa-tools-${PV}.tar.bz2" + +inherit autotools diff --git a/meta/recipes-multimedia/alsa/alsa-utils-1.0.23/ncursesfix.patch b/meta/recipes-multimedia/alsa/alsa-utils-1.0.23/ncursesfix.patch new file mode 100644 index 0000000000..0009c1afe9 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils-1.0.23/ncursesfix.patch @@ -0,0 +1,42 @@ +# alsa-utils: Fix ncurses build failures +# Richard Purdie +# Rebased to 1.0.23, Dongxiao Xu + +diff -ruN alsa-utils-1.0.23-orig/configure.in alsa-utils-1.0.23/configure.in +--- alsa-utils-1.0.23-orig/configure.in 2010-04-16 19:19:12.000000000 +0800 ++++ alsa-utils-1.0.23/configure.in 2010-06-22 15:22:06.731202478 +0800 +@@ -109,34 +109,16 @@ + NCURSESLIBSUFFIX="" + CURSES_NLS="no" + if test "$curseslib" = "ncursesw" -o \( "$curseslib" = "auto" -a "$USE_NLS" = "yes" \); then +- AC_CHECK_PROG([ncursesw5_config], [ncursesw5-config], [yes]) +- if test "$ncursesw5_config" = "yes"; then +- CURSESINC="" +- CURSESLIB=`ncursesw5-config --libs` +- CURSESLIBDIR=`ncursesw5-config --libdir` +- CURSES_CFLAGS=`ncursesw5-config --cflags` +- curseslib="ncursesw" +- else + AC_CHECK_LIB(ncursesw, initscr, + [ CURSESINC=''; CURSESLIB='-lncursesw'; curseslib="ncursesw"]) +- fi + if test -n "$CURSESINC"; then + NCURSESLIBSUFFIX="w" + CURSES_NLS="yes" + fi + fi + if test "$curseslib" = "ncurses" -o "$curseslib" = "auto"; then +- AC_CHECK_PROG([ncurses5_config], [ncurses5-config], [yes]) +- if test "$ncurses5_config" = "yes"; then +- CURSESINC="" +- CURSESLIB=`ncurses5-config --libs` +- CURSESLIBDIR=`ncurses5-config --libdir` +- CURSES_CFLAGS=`ncurses5-config --cflags` +- curseslib="ncurses" +- else + AC_CHECK_LIB(ncurses, initscr, + [ CURSESINC=''; CURSESLIB='-lncurses'; curseslib="ncurses"]) +- fi + fi + if test "$curseslib" = "curses" -o "$curseslib" = "auto"; then + AC_CHECK_LIB(curses, initscr, diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.23.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.23.bb new file mode 100644 index 0000000000..7b30c0d4b0 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.23.bb @@ -0,0 +1,67 @@ +DESCRIPTION = "ALSA Utilities" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" +SECTION = "console/utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ + file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" +DEPENDS = "alsa-lib ncurses gettext" +PR = "r0" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ + file://ncursesfix.patch;patch=1 " + +# lazy hack. needs proper fixing in gettext.m4, see +# http://bugs.openembedded.org/show_bug.cgi?id=2348 +# please close bug and remove this comment when properly fixed +# +EXTRA_OECONF = "--disable-xmlto" +EXTRA_OECONF_linux-uclibc = "--disable-nls" +EXTRA_OECONF_linux-uclibcgnueabi = "--disable-nls" + +inherit autotools + +# This are all packages that we need to make. Also, the now empty alsa-utils +# ipk depend on them. + +PACKAGES += "\ + alsa-utils-alsamixer \ + alsa-utils-midi \ + alsa-utils-aplay \ + alsa-utils-amixer \ + alsa-utils-aconnect \ + alsa-utils-iecset \ + alsa-utils-speakertest \ + alsa-utils-aseqnet \ + alsa-utils-aseqdump \ + alsa-utils-alsaconf \ + alsa-utils-alsactl " + +# We omit alsaconf, because +# a) this is a bash script +# b) it creates config files not suitable for OE-based distros + +FILES_${PN} = "" +FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" +FILES_alsa-utils-amixer = "${bindir}/amixer" +FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" +FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/" +FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" +FILES_alsa-utils-aconnect = "${bindir}/aconnect" +FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" +FILES_alsa-utils-iecset = "${bindir}/iecset" +FILES_alsa-utils-alsactl = "${sbindir}/alsactl" +FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" +FILES_alsa-utils-alsaconf = "${sbindir}/alsaconf" + +DESCRIPTION_alsa-utils-aplay = "play (and record) sound files via ALSA" +DESCRIPTION_alsa-utils-amixer = "command-line based control for ALSA mixer and settings" +DESCRIPTION_alsa-utils-alsamixer = "ncurses based control for ALSA mixer and settings" +DESCRIPTION_alsa-utils-speakertest = "ALSA surround speaker test utility" +DESCRIPTION_alsa-utils-midi = "miscalleanous MIDI utilities for ALSA" +DESCRIPTION_alsa-utils-aconnect = "ALSA sequencer connection manager" +DESCRIPTION_alsa-utils-aseqnet = "network client/server on ALSA sequencer" +DESCRIPTION_alsa-utils-alsactl = "saves/restores ALSA-settings in /etc/asound.state" +DESCRIPTION_alsa-utils-alsaconf = "a bash script that creates ALSA configuration files" + +ALLOW_EMPTY_alsa-utils = "1" diff --git a/meta/recipes-multimedia/flac/flac-1.2.1/disable-xmms-plugin.patch b/meta/recipes-multimedia/flac/flac-1.2.1/disable-xmms-plugin.patch new file mode 100644 index 0000000000..e2f4fa1360 --- /dev/null +++ b/meta/recipes-multimedia/flac/flac-1.2.1/disable-xmms-plugin.patch @@ -0,0 +1,24 @@ +# Acquired from OpenEmbedded + +diff -ruN flac-1.2.1-orig/src/Makefile.am flac-1.2.1-new/src/Makefile.am +--- flac-1.2.1-orig/src/Makefile.am 2010-06-23 15:06:29.167865355 +0800 ++++ flac-1.2.1-new/src/Makefile.am 2010-06-25 16:23:05.555202728 +0800 +@@ -15,10 +15,6 @@ + # restrictive of those mentioned above. See the file COPYING.Xiph in this + # distribution. + +-if FLaC__HAS_XMMS +-XMMS_DIRS = plugin_common plugin_xmms +-endif +- + if FLaC__WITH_CPPLIBS + CPPLIBS_DIRS = libFLAC++ test_libFLAC++ + endif +@@ -29,7 +25,6 @@ + flac \ + metaflac \ + monkeys_audio_utilities \ +- $(XMMS_DIRS) \ + plugin_winamp2 \ + test_grabbag \ + test_libs_common \ diff --git a/meta/recipes-multimedia/flac/flac-1.2.1/flac-gcc43-fixes.patch b/meta/recipes-multimedia/flac/flac-1.2.1/flac-gcc43-fixes.patch new file mode 100644 index 0000000000..fdb6f1337e --- /dev/null +++ b/meta/recipes-multimedia/flac/flac-1.2.1/flac-gcc43-fixes.patch @@ -0,0 +1,14 @@ +# Acquired from OpenEmbedded +# Fix no declaration of memcmp() + +diff -urN flac-1.2.1-orig/examples/cpp/encode/file/main.cpp flac-1.2.1/examples/cpp/encode/file/main.cpp +--- flac-1.2.1-orig/examples/cpp/encode/file/main.cpp 2010-06-23 15:06:29.159481339 +0800 ++++ flac-1.2.1/examples/cpp/encode/file/main.cpp 2010-06-23 15:06:46.233384883 +0800 +@@ -30,6 +30,7 @@ + + #include + #include ++#include + #include "FLAC++/metadata.h" + #include "FLAC++/encoder.h" + diff --git a/meta/recipes-multimedia/flac/flac-1.2.1/xmms.m4 b/meta/recipes-multimedia/flac/flac-1.2.1/xmms.m4 new file mode 100644 index 0000000000..5e250cdd38 --- /dev/null +++ b/meta/recipes-multimedia/flac/flac-1.2.1/xmms.m4 @@ -0,0 +1,149 @@ +# CFLAGS and library paths for XMMS +# written 15 December 1999 by Ben Gertzfield +# Acquired from OpenEmbedded + +dnl Usage: +dnl AM_PATH_XMMS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl +dnl Example: +dnl AM_PATH_XMMS(0.9.5.1, , AC_MSG_ERROR([*** XMMS >= 0.9.5.1 not installed - please install first ***])) +dnl +dnl Defines XMMS_CFLAGS, XMMS_LIBS, XMMS_DATA_DIR, XMMS_PLUGIN_DIR, +dnl XMMS_VISUALIZATION_PLUGIN_DIR, XMMS_INPUT_PLUGIN_DIR, +dnl XMMS_OUTPUT_PLUGIN_DIR, XMMS_GENERAL_PLUGIN_DIR, XMMS_EFFECT_PLUGIN_DIR, +dnl and XMMS_VERSION for your plugin pleasure. +dnl + +dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]]) +AC_DEFUN(XMMS_TEST_VERSION, [ + +# Determine which version number is greater. Prints 2 to stdout if +# the second number is greater, 1 if the first number is greater, +# 0 if the numbers are equal. + +# Written 15 December 1999 by Ben Gertzfield +# Revised 15 December 1999 by Jim Monty + + AC_PROG_AWK + xmms_got_version=[` $AWK ' \ +BEGIN { \ + print vercmp(ARGV[1], ARGV[2]); \ +} \ + \ +function vercmp(ver1, ver2, ver1arr, ver2arr, \ + ver1len, ver2len, \ + ver1int, ver2int, len, i, p) { \ + \ + ver1len = split(ver1, ver1arr, /\./); \ + ver2len = split(ver2, ver2arr, /\./); \ + \ + len = ver1len > ver2len ? ver1len : ver2len; \ + \ + for (i = 1; i <= len; i++) { \ + p = 1000 ^ (len - i); \ + ver1int += ver1arr[i] * p; \ + ver2int += ver2arr[i] * p; \ + } \ + \ + if (ver1int < ver2int) \ + return 2; \ + else if (ver1int > ver2int) \ + return 1; \ + else \ + return 0; \ +}' $1 $2`] + + if test $xmms_got_version -eq 2; then # failure + ifelse([$4], , :, $4) + else # success! + ifelse([$3], , :, $3) + fi +]) + +AC_DEFUN(AM_PATH_XMMS, +[ +AC_ARG_WITH(xmms-prefix,[ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)], + xmms_config_prefix="$withval", xmms_config_prefix="") +AC_ARG_WITH(xmms-exec-prefix,[ --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)], + xmms_config_exec_prefix="$withval", xmms_config_exec_prefix="") + +if test x$xmms_config_exec_prefix != x; then + xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix" + if test x${XMMS_CONFIG+set} != xset; then + XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config + fi +fi + +if test x$xmms_config_prefix != x; then + xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix" + if test x${XMMS_CONFIG+set} != xset; then + XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config + fi +fi + +AC_PATH_PROG(XMMS_CONFIG, xmms-config, no) +min_xmms_version=ifelse([$1], ,0.9.5.1, $1) + +if test "$XMMS_CONFIG" = "no"; then + no_xmms=yes +else + XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags` + XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs` + XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version` + XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir` + XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir` + XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \ + --visualization-plugin-dir` + XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir` + XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir` + XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir` + XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir` + + XMMS_TEST_VERSION($XMMS_VERSION, $min_xmms_version, ,no_xmms=version) +fi + +AC_MSG_CHECKING(for XMMS - version >= $min_xmms_version) + +if test "x$no_xmms" = x; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) + + if test "$XMMS_CONFIG" = "no" ; then + echo "*** The xmms-config script installed by XMMS could not be found." + echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XMMS_CONFIG environment variable to the" + echo "*** full path to xmms-config." + else + if test "$no_xmms" = "version"; then + echo "*** An old version of XMMS, $XMMS_VERSION, was found." + echo "*** You need a version of XMMS newer than $min_xmms_version." + echo "*** The latest version of XMMS is always available from" + echo "*** http://www.xmms.org/" + echo "***" + + echo "*** If you have already installed a sufficiently new version, this error" + echo "*** probably means that the wrong copy of the xmms-config shell script is" + echo "*** being found. The easiest way to fix this is to remove the old version" + echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the" + echo "*** correct copy of xmms-config. (In this case, you will have to" + echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf" + echo "*** so that the correct libraries are found at run-time)" + fi + fi + XMMS_CFLAGS="" + XMMS_LIBS="" + ifelse([$3], , :, [$3]) +fi +AC_SUBST(XMMS_CFLAGS) +AC_SUBST(XMMS_LIBS) +AC_SUBST(XMMS_VERSION) +AC_SUBST(XMMS_DATA_DIR) +AC_SUBST(XMMS_PLUGIN_DIR) +AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR) +AC_SUBST(XMMS_INPUT_PLUGIN_DIR) +AC_SUBST(XMMS_OUTPUT_PLUGIN_DIR) +AC_SUBST(XMMS_GENERAL_PLUGIN_DIR) +AC_SUBST(XMMS_EFFECT_PLUGIN_DIR) +]) diff --git a/meta/recipes-multimedia/flac/flac_1.2.1.bb b/meta/recipes-multimedia/flac/flac_1.2.1.bb new file mode 100644 index 0000000000..30a8cfb933 --- /dev/null +++ b/meta/recipes-multimedia/flac/flac_1.2.1.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless." +HOMEPAGE = "http://flac.sourceforge.net/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=13478&atid=113478" +SECTION = "libs" +LICENSE = "FDLv1.2 & GPLv2+ & LGPLv2.1+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ + file://src/Makefile.am;beginline=1;endline=16;md5=8dee151a56a3122f064a9dce771db37d \ + file://COPYING.GPL;md5=079b27cd65c86dbc1b6997ffde902735 \ + file://src/flac/main.c;beginline=1;endline=17;md5=756c4234516e4266ea45ee7bbbd798cf \ + file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \ + file://src/plugin_common/all.h;beginline=1;endline=17;md5=b2e7960da6b43e4eccabf999bcf7f3a9 \ + file://COPYING.Xiph;md5=df8975c0225f83ed7b567587ed953b83 \ + file://include/FLAC/all.h;beginline=64;endline=69;md5=64474f2b22e9e77b28d8b8b25c983a48" +DEPENDS = "libogg" + +PR = "r0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \ + file://disable-xmms-plugin.patch;patch=1 \ + file://flac-gcc43-fixes.patch;patch=1 \ + file://xmms.m4" + +S = "${WORKDIR}/flac-${PV}" + +inherit autotools + +EXTRA_OECONF = "--disable-oggtest --disable-id3libtest \ + --with-ogg-libraries=${STAGING_LIBDIR} \ + --with-ogg-includes=${STAGING_INCDIR} \ + --without-xmms-prefix \ + --without-xmms-exec-prefix \ + --without-libiconv-prefix \ + --without-id3lib" + +PACKAGES += "libflac libflac++ liboggflac liboggflac++" +FILES_${PN} = "${bindir}/*" +FILES_libflac = "${libdir}/libFLAC.so.*" +FILES_libflac++ = "${libdir}/libFLAC++.so.*" +FILES_liboggflac = "${libdir}/libOggFLAC.so.*" +FILES_liboggflac++ = "${libdir}/libOggFLAC++.so.*" + +do_configure () { + install -d ${S}/m4 + install -m 0644 ${WORKDIR}/xmms.m4 ${S}/m4/ + autotools_do_configure + # removes '-read-only-relocs' which is enabled for PowerPC builds. + # It makes the build fail, other archs are not affected. Fixes #1775. + sed -i 's/-Wl,-read_only_relocs,warning//g' src/libFLAC/Makefile +} diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/configure_fix.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/configure_fix.patch new file mode 100644 index 0000000000..15f56492f7 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/configure_fix.patch @@ -0,0 +1,13 @@ +Index: gst-ffmpeg-0.10.1/gst-libs/ext/ffmpeg/configure.ac +=================================================================== +--- gst-ffmpeg-0.10.1.orig/gst-libs/ext/ffmpeg/configure.ac 2008-03-19 23:21:04.000000000 +0000 ++++ gst-ffmpeg-0.10.1/gst-libs/ext/ffmpeg/configure.ac 2008-03-19 23:21:31.000000000 +0000 +@@ -775,7 +775,7 @@ + + dnl Check for SDL, used in ffplay, and ffserver + AC_FF_ALLOW_DISABLE(CONFIG_FFPLAY, ffplay, ffmpeg media player,[ +- AM_PATH_SDL(, CONFIG_FFPLAY=yes, CONFIG_FPFLAY=no) ++ CONFIG_FPFLAY=no + ]) + + dnl media server or not? diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/no_beos.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/no_beos.patch new file mode 100644 index 0000000000..9ffcafff73 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.1/no_beos.patch @@ -0,0 +1,55 @@ +The AC_LANG sections upset libtool 2.2.2, easiest fix is to remove them. +Using a .cpp file in a Makefile means configure.ac must use AC_PROG_CXX +so patch out the section from the makefile too. + +RP - 14/4/08 + +Index: gst-ffmpeg-0.10.1/gst-libs/ext/ffmpeg/configure.ac +=================================================================== +--- gst-ffmpeg-0.10.1.orig/gst-libs/ext/ffmpeg/configure.ac 2008-04-14 23:55:25.000000000 +0100 ++++ gst-ffmpeg-0.10.1/gst-libs/ext/ffmpeg/configure.ac 2008-04-14 23:56:18.000000000 +0100 +@@ -742,26 +742,7 @@ + + dnl Beos Audio + AC_FF_ALLOW_DISABLE(CONFIG_AUDIO_BEOS, audio-beos, BeOS audio support,[ +- if test x$TARGET_OS = xbeos; then +- AC_LANG_CPLUSPLUS +- AC_CHECK_HEADER(SoundPlayer.h,[ +- OLD_CXXFLAGS="$CXXFLAGS" +- CXXFLAGS="$CXXFLAGS -lbe -lmedia" +- AC_MSG_CHECKING(For BeOS audio libraries) +- AC_TRY_COMPILE([ +-#include +-#include +- ],[ +- BSoundPlayer *p = new BSoundPlayer(NULL,NULL,NULL); +- ],[ CONFIG_AUDIO_BEOS=yes && AC_MSG_RESULT(yes) ],[ +- CONFIG_AUDIO_BEOS=no && AC_MSG_RESULT(no) +- ]) +- CXXFLAGS="$OLD_CXXFLAGS" +- ], CONFIG_AUDIO_BEOS=no) +- AC_LANG_C +- else + CONFIG_AUDIO_BEOS=no +- fi + ]) + + dnl Check for freetype2, used in vook/libdrawtext.so +Index: gst-ffmpeg-0.10.1/gst-libs/ext/ffmpeg/libavformat/Makefile.am +=================================================================== +--- gst-ffmpeg-0.10.1.orig/gst-libs/ext/ffmpeg/libavformat/Makefile.am 2008-04-14 23:58:44.000000000 +0100 ++++ gst-ffmpeg-0.10.1/gst-libs/ext/ffmpeg/libavformat/Makefile.am 2008-04-14 23:58:55.000000000 +0100 +@@ -24,13 +24,6 @@ + audiooss_SRC = audio.c + endif + +-if CONFIG_AUDIO_BEOS +-audiobeos_SRC = beosaudio.cpp +-audiobeos_LIBS = \ +- -lbe \ +- -lmedia +-endif +- + if CONFIG_VIDEO4LINUX + v4l_SRC = grab.c v4l2.c + endif diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.1.bb b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.1.bb new file mode 100644 index 0000000000..65d60f9cea --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.1.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "FFmpeg-based GStreamer plug-in" +SECTION = "multimedia" +PRIORITY = "optional" +LICENSE = "LGPL" +HOMEPAGE = "http://www.gstreamer.net/" +DEPENDS = "gstreamer zlib gst-plugins-base" +PR = "r4" + +inherit autotools pkgconfig + +SRC_URI = "http://gstreamer.freedesktop.org/src/${PN}/${PN}-${PV}.tar.bz2 \ + file://no_beos.patch;patch=1 \ + file://configure_fix.patch;patch=1" + +FILES_${PN} += "${libdir}/gstreamer-0.10/*.so" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la ${libdir}/gstreamer-0.10/*.a" + +EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \ + --disable-vorbis --disable-vorbistest --disable-encoders \ + --disable-v4l --disable-audio-oss --disable-dv1394 \ + --disable-vhook --disable-ffmpeg --disable-ffserver \ + --enable-pp --disable-decoder-vorbis --with-pic=no" + +# We do this because the install program is called with -s which causes it to +# call "strip" and it then mangles cross compiled stuff.. +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:" + +# Hack to get STAGING_LIBDIR into the linker path when building ffmpeg +CC = "${CCACHE} ${HOST_PREFIX}gcc -L${STAGING_LIBDIR}" + +acpaths = "-I ${S}/common/m4" diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3/configure_fix.patch b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3/configure_fix.patch new file mode 100644 index 0000000000..d8b213b3e9 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3/configure_fix.patch @@ -0,0 +1,16 @@ +Index: gst-fluendo-mp3-0.10.2/configure.ac +=================================================================== +--- gst-fluendo-mp3-0.10.2.orig/configure.ac 2008-03-19 23:00:15.000000000 +0000 ++++ gst-fluendo-mp3-0.10.2/configure.ac 2008-03-19 23:00:31.000000000 +0000 +@@ -19,10 +19,9 @@ + AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4") + + dnl check for tools +-AS_LIBTOOL_TAGS + AM_PROG_LIBTOOL + dnl AC_PROG_CC +-dnl AC_PROG_LIBTOOL ++AC_PROG_LIBTOOL + + dnl decide on error flags + AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no") diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.2.bb b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.2.bb new file mode 100644 index 0000000000..9e33b30824 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.2.bb @@ -0,0 +1,9 @@ +require gst-fluendo.inc + +acpaths = "-I ${S}/common/m4 -I ${S}/m4" + +SRC_URI += "file://configure_fix.patch;patch=1" + +PR = "r1" + +DESCRIPTION = "Fluendo closed-format mp3 GStreamer plug-in" diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo-mpegdemux_0.10.7.bb b/meta/recipes-multimedia/gstreamer/gst-fluendo-mpegdemux_0.10.7.bb new file mode 100644 index 0000000000..81645accd6 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-fluendo-mpegdemux_0.10.7.bb @@ -0,0 +1,2 @@ +require gst-fluendo.inc +DESCRIPTION = "Fluendo closed-format mpeg video GStreamer plug-in" diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo.inc b/meta/recipes-multimedia/gstreamer/gst-fluendo.inc new file mode 100644 index 0000000000..76b76c2b02 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-fluendo.inc @@ -0,0 +1,20 @@ +DESCRIPTION = "Fluendo closed-format GStreamer plug-in" +SECTION = "multimedia" +PRIORITY = "optional" +LICENSE = "MIT" +HOMEPAGE = "http://www.fluendo.com/resources/source-plugins.php" +DEPENDS = "gstreamer zlib" + +inherit autotools pkgconfig + +SRC_URI = "http://core.fluendo.com/gstreamer/src/${PN}/${PN}-${PV}.tar.bz2" + +FILES_${PN} += "${libdir}/gstreamer-0.10/*.so" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la ${libdir}/gstreamer-0.10/*.a" + +EXTRA_OECONF = "--disable-debug --disable-valgrind" + +# Hack to get STAGING_LIBDIR into the linker path when building +CC = "${CCACHE} ${HOST_PREFIX}gcc -L${STAGING_LIBDIR}" + diff --git a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb new file mode 100644 index 0000000000..36f30e0619 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb @@ -0,0 +1,51 @@ +DESCRIPTION = "Gstreamer package groups" +LICENSE = "MIT" +DEPENDS = "gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly" +PR = "r5" + +PACKAGES = "\ + gst-meta-base \ + gst-meta-audio \ + gst-meta-debug \ + gst-meta-video" + +ALLOW_EMPTY = "1" + +RDEPENDS_gst-meta-base = "\ + gstreamer \ + gst-plugins-base-playbin \ + gst-plugins-base-decodebin \ + gst-plugins-base-gnomevfs \ + gst-plugins-base-alsa \ + gst-plugins-base-volume \ + gst-plugins-base-ximagesink \ + gst-plugins-base-audioconvert \ + gst-plugins-base-audioresample \ + gst-plugins-base-typefindfunctions \ + gst-plugins-base-videoscale \ + gst-plugins-base-ffmpegcolorspace \ + gst-plugins-good-autodetect" + + +RDEPENDS_gst-meta-audio = "\ + gst-meta-base \ + gst-plugins-base-vorbis \ + gst-plugins-base-ogg \ + gst-plugins-ugly-mad" + + +RDEPENDS_gst-meta-debug = "\ + gst-meta-base \ + gst-plugins-good-debug \ + gst-plugins-base-audiotestsrc \ + gst-plugins-base-videotestsrc" + + +RDEPENDS_gst-meta-video = "\ + gst-meta-base \ + gst-plugins-good-avi \ + gst-plugins-good-matroska \ + gst-plugins-ugly-mpeg2dec" + +RRECOMMENDS_gst-meta-video = "\ + gst-meta-audio" diff --git a/meta/recipes-multimedia/gstreamer/gst-openmax_0.10.0.2.bb b/meta/recipes-multimedia/gstreamer/gst-openmax_0.10.0.2.bb new file mode 100644 index 0000000000..825cccb83c --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-openmax_0.10.0.2.bb @@ -0,0 +1,18 @@ +DEPENDS = "gstreamer" +RDEPENDS = "libomxil" + +SRC_URI = "http://gstreamer.freedesktop.org/src/gst-openmax/pre/gst-openmax-0.10.0.2.tar.bz2" + +inherit autotools + +EXTRA_OECONF += "--disable-valgrind" + +do_configure_prepend() { + + install -d ${S}/m4/ + install -m 0644 ${S}/common/m4/*.m4 ${S}/m4/ +} + +FILES_${PN} += "${libdir}/gstreamer-0.10/libgstomx.so" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/libgstomx.*a" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug/" diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.19.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.19.bb new file mode 100644 index 0000000000..8f1821a7be --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.19.bb @@ -0,0 +1,24 @@ +require gst-plugins.inc + +LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+ " +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://gst/tta/filters.h;beginline=12;endline=29;md5=629b0c7a665d155a6677778f4460ec06 \ + file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \ + file://gst/qtmux/gstqtmuxmap.h;beginline=1;endline=19;md5=2da8f56a44697c1527c5a4bcf8d5d69b \ + file://gst/tta/crc32.h;beginline=12;endline=29;md5=71a904d99ce7ae0c1cf129891b98145c" + +DEPENDS += "gst-plugins-base libmusicbrainz tremor" + +PR = "r1" + +inherit gettext + +EXTRA_OECONF += "--disable-examples --disable-experimental --disable-sdl --disable-cdaudio \ + --with-plugins=musicbrainz,wavpack,ivorbis, --disable-vdpau --disable-apexsink" + +ARM_INSTRUCTION_SET = "arm" + +do_configure_prepend() { + # This m4 file contains nastiness which conflicts with libtool 2.2.2 + rm ${S}/m4/lib-link.m4 || true +} diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.29.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.29.bb new file mode 100644 index 0000000000..bfbe28108d --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.29.bb @@ -0,0 +1,22 @@ +require gst-plugins.inc + +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=622921ffad8cb18ab906c56052788a3f \ + file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \ + file://gst/ffmpegcolorspace/utils.c;beginline=1;endline=20;md5=9c83a200b8e597b26ca29df20fc6ecd0" + +DEPENDS += "virtual/libx11 alsa-lib freetype gnome-vfs liboil libogg libvorbis libxv" +RDEPENDS += "gnome-vfs-plugin-file gnome-vfs-plugin-http gnome-vfs-plugin-ftp \ + gnome-vfs-plugin-sftp" + +PR = "r0" + +inherit gettext + +EXTRA_OECONF += "--disable-freetypetest --disable-pango --disable-theora" + +do_configure_prepend() { + # This m4 file contains nastiness which conflicts with libtool 2.2.2 + rm -f ${S}/m4/lib-link.m4 +} diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.23.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.23.bb new file mode 100644 index 0000000000..528dcbf540 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.23.bb @@ -0,0 +1,19 @@ +require gst-plugins.inc + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=622921ffad8cb18ab906c56052788a3f \ + file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" + +DEPENDS += "gst-plugins-base gconf cairo jpeg libpng gtk+ zlib libid3tag flac \ + speex" +PR = "r0" + +inherit gettext + +EXTRA_OECONF += "--disable-aalib --disable-esd --disable-shout2 --disable-libcaca --without-check" + +do_configure_prepend() { + # This m4 file contains nastiness which conflicts with libtool 2.2.2 + rm ${S}/m4/lib-link.m4 || true +} diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.15.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.15.bb new file mode 100644 index 0000000000..7dda685002 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.15.bb @@ -0,0 +1,19 @@ +require gst-plugins.inc + +LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://gst/synaesthesia/synaescope.h;beginline=1;endline=20;md5=99f301df7b80490c6ff8305fcc712838 \ + file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 \ + file://gst/mpegstream/gstmpegparse.h;beginline=1;endline=18;md5=ff65467b0c53cdfa98d0684c1bc240a9" + +DEPENDS += "gst-plugins-base libid3tag libmad mpeg2dec liba52 lame" +PR = "r0" + +inherit gettext + +EXTRA_OECONF += "--with-plugins=a52dec,lame,id3tag,mad,mpeg2dec,mpegstream,mpegaudioparse,asfdemux,realmedia" + +do_configure_prepend() { + # This m4 file contains nastiness which conflicts with libtool 2.2.2 + rm ${S}/m4/lib-link.m4 || true +} diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins.inc b/meta/recipes-multimedia/gstreamer/gst-plugins.inc new file mode 100644 index 0000000000..f7f0a2d7c5 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-plugins.inc @@ -0,0 +1,33 @@ +DESCRIPTION = "Plugins for GStreamer" +HOMEPAGE = "http://gstreamer.freedesktop.org/" +BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" +SECTION = "multimedia" +PRIORITY = "optional" +DEPENDS = "gstreamer" + +inherit autotools pkgconfig + +SRC_URI = "http://gstreamer.freedesktop.org/src/${PN}/${PN}-${PV}.tar.bz2" + +EXTRA_OECONF = "--disable-valgrind --disable-debug --disable-examples " + +acpaths = "-I ${S}/common/m4 -I ${S}/m4" + +LIBV = "0.10" +#FILES_${PN} += "${libdir}/gstreamer-${LIBV}/*.so" +#FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/*.la ${libdir}/gstreamer-${LIBV}/*.a" +FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug" + +PACKAGES_DYNAMIC = "${PN}-*" + +python populate_packages_prepend () { + gst_libdir = bb.data.expand('${libdir}/gstreamer-${LIBV}', d) + postinst = bb.data.getVar('plugin_postinst', d, 1) + +# Can't package separate debug packages yet +# do_split_packages(d, gst_libdir, '\.debug/libgst(.*)\.so$', bb.data.expand('${PN}-%s-dbg', d), 'GStreamer plugin for %s (with debugging symbols)', recursive=True, extra_depends=bb.data.expand('${PN}-dbg', d), match_path=True) + do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', bb.data.expand('${PN}-%s', d), 'GStreamer plugin for %s', postinst=postinst, extra_depends=bb.data.expand('${PN}',d)) + do_split_packages(d, gst_libdir, 'libgst(.*)\.l?a$', bb.data.expand('${PN}-%s-dev', d), 'GStreamer plugin for %s (development files)', extra_depends=bb.data.expand('${PN}-dev',d)) +} + +ALLOW_EMPTY = "1" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/check_fix.patch b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/check_fix.patch new file mode 100644 index 0000000000..72c3f6407e --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/check_fix.patch @@ -0,0 +1,17 @@ +# gstreamer: Fix a problem with configure if check has already been built +# Richard Purdie + +diff -urN gstreamer-0.10.29-orig/configure.ac gstreamer-0.10.29/configure.ac +--- gstreamer-0.10.29-orig/configure.ac 2010-06-26 12:49:27.774930773 +0800 ++++ gstreamer-0.10.29/configure.ac 2010-06-26 12:51:12.899200233 +0800 +@@ -543,8 +543,10 @@ + *) BUILD_CHECK=yes ;; + esac + ]) ++ + dnl bit of a misnomer, but keep the conditional named like this so we don't + dnl have to change too much elsewhere ++HAVE_CHECK=no + AM_CONDITIONAL(HAVE_CHECK, test "x$BUILD_CHECK" = "xyes") + + dnl configure the desired buffer alignment diff --git a/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gst-inspect-check-error.patch b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gst-inspect-check-error.patch new file mode 100644 index 0000000000..4ca1dbe6ab --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gst-inspect-check-error.patch @@ -0,0 +1,14 @@ +# Fix crash with gst-inspect +# Chris Lord + +--- gstreamer-0.10.9/tools/gst-inspect.c.old 2006-09-12 11:56:53.000000000 +0100 ++++ gstreamer-0.10.9/tools/gst-inspect.c 2006-09-12 11:57:27.000000000 +0100 +@@ -1123,7 +1123,7 @@ + g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); + g_option_context_add_group (ctx, gst_init_get_option_group ()); + if (!g_option_context_parse (ctx, &argc, &argv, &err)) { +- g_print ("Error initializing: %s\n", err->message); ++ g_print ("Error initializing: %s\n", err ? err->message : "(null)"); + exit (1); + } + g_option_context_free (ctx); diff --git a/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.c b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.c new file mode 100644 index 0000000000..c1f3e71af6 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.c @@ -0,0 +1,487 @@ +/* GStreamer + * Copyright (C) 1999,2000 Erik Walthinsen + * 2000 Wim Taymans + * 2005 David A. Schleef + * + * gstregistryxml.c: GstRegistry object, support routines + * + * This library is free software; you can redistribute it and/or + * modify it ulnder the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#include + +/* +** Simple handy function to write a memory location to the registry cache file +*/ +inline static gboolean +gst_registry_binary_write(GstRegistry *registry, const void *mem, const ssize_t size) +{ + if (write(registry->cache_file, mem, size) != size) + { + GST_ERROR("Failed to write binary registry element: ptr=%p size=%u error=%s\n", + mem, size, strerror(errno)); + return FALSE; + } + return TRUE; +} + +/* +** Save features GstBinary style +*/ +static gboolean +gst_registry_binary_fill_feature(GList **list, GstPluginFeature *orig, GstBinaryPluginFeature *dest, const char *name) +{ + GstBinaryChunck *chk; + + if ((chk = calloc(1, sizeof (GstBinaryChunck))) == NULL) + return FALSE; + + chk->data = dest; + chk->size = sizeof (GstBinaryPluginFeature); + + *list = g_list_append(*list, chk); + + dest->rank = orig->rank; + if (!strncpy(dest->typename, name, GST_BINARY_REGISTRY_TYPENAME_TYPENAME_LEN) || + !strncpy(dest->name, orig->name, GST_BINARY_REGISTRY_TYPENAME_NAME_LEN)) + { + GST_ERROR("Failed to write binary registry feature"); + goto fail; + } + + if (GST_IS_ELEMENT_FACTORY(orig)) + { + GstElementFactory *factory = GST_ELEMENT_FACTORY(orig); + + if (!strncpy(dest->longname, factory->details.longname, GST_BINARY_REGISTRY_TYPENAME_LONGNAME_LEN) || + !strncpy(dest->class, factory->details.klass, GST_BINARY_REGISTRY_TYPENAME_CLASS_LEN) || + !strncpy(dest->description, factory->details.description, GST_BINARY_REGISTRY_TYPENAME_DESCRIPTION_LEN) || + !strncpy(dest->author, factory->details.author, GST_BINARY_REGISTRY_TYPENAME_AUTHOR_LEN)) + { + GST_ERROR("Failed to write binary registry feature"); + goto fail; + } + } + + dest->npadtemplates = dest->ninterfaces = dest->nuritypes = 0; + return TRUE; + + fail: + free(chk); + return FALSE; +} + + +/* +** Initialize the GstBinaryRegistryMagic, setting both our magic number and gstreamer major/minor version +*/ +inline static gboolean +gst_registry_binary_initialize_magic(GstBinaryRegistryMagic *m) +{ + if (!strncpy(m->magic, GST_MAGIC_BINARY_REGISTRY_STR, GST_MAGIC_BINARY_REGISTRY_LEN) || + !strncpy(m->version, GST_MAJORMINOR, GST_BINARY_REGISTRY_VERSION_LEN)) + { + GST_ERROR("Failed to write magic to the registry magic structure"); + return FALSE; + } + return TRUE; +} + +/* +** Check GstBinaryRegistryMagic validity. +** Return a pointer pointing right after the magic structure +*/ +static gchar * +gst_registry_binary_check_magic(gchar *in) +{ + GstBinaryRegistryMagic *m = (GstBinaryRegistryMagic *) in; + + if (m == NULL || m->magic == NULL || m->version == NULL) + { + GST_ERROR("Binary registry magic structure is broken"); + return NULL; + } + if (strncmp(m->magic, GST_MAGIC_BINARY_REGISTRY_STR, GST_MAGIC_BINARY_REGISTRY_LEN) != 0) + { + GST_ERROR("Binary registry magic is different : %02x%02x%02x%02x != %02x%02x%02x%02x", + GST_MAGIC_BINARY_REGISTRY_STR[0] & 0xff, GST_MAGIC_BINARY_REGISTRY_STR[1] & 0xff, + GST_MAGIC_BINARY_REGISTRY_STR[2] & 0xff, GST_MAGIC_BINARY_REGISTRY_STR[3] & 0xff, + m->magic[0] & 0xff, m->magic[1] & 0xff, m->magic[2] & 0xff, m->magic[3] & 0xff); + return NULL; + } + if (strncmp(m->version, GST_MAJORMINOR, GST_BINARY_REGISTRY_VERSION_LEN)) + { + GST_ERROR("Binary registry magic version is different : %s != %s", + GST_MAJORMINOR, m->version); + return NULL; + } + return (in + sizeof (GstBinaryRegistryMagic)); +} + +/* +** Adapt a GstPlugin to our GstBinaryPluginElement structure, and write it to the +** registry file. +*/ +static gboolean +gst_registry_binary_save_plugin(GList **list, GstRegistry *registry, GstPlugin *plugin) +{ + GstBinaryPluginElement *e; + GstBinaryChunck *chk; + GList *walk; + + if ((e = calloc(1, sizeof (GstBinaryPluginElement))) == NULL || + (chk = calloc(1, sizeof (GstBinaryChunck))) == NULL) + return FALSE; + + chk->data = e; + chk->size = sizeof (GstBinaryPluginElement); + *list = g_list_append(*list, chk); + + if (!strncpy(e->name, plugin->desc.name, GST_BINARY_REGISTRY_NAME_LEN) || + !strncpy(e->description, plugin->desc.description, GST_BINARY_REGISTRY_DESCRIPTION_LEN) || + !strncpy(e->filename, plugin->filename, _POSIX_PATH_MAX) || + !strncpy(e->version, plugin->desc.version, GST_BINARY_REGISTRY_VERSION_LEN) || + !strncpy(e->license, plugin->desc.license, GST_BINARY_REGISTRY_LICENSE_LEN) || + !strncpy(e->source, plugin->desc.source, GST_BINARY_REGISTRY_SOURCE_LEN) || + !strncpy(e->package, plugin->desc.package, GST_BINARY_REGISTRY_PACKAGE_LEN) || + !strncpy(e->origin, plugin->desc.origin, GST_BINARY_REGISTRY_ORIGIN_LEN)) + { + GST_DEBUG("Can't adapt GstPlugin to GstBinaryPluginElement"); + goto fail; + } + + e->size = plugin->file_size; + e->m32p = plugin->file_mtime; + + GList *ft_list = gst_registry_get_feature_list_by_plugin(registry, plugin->desc.name); + + for (walk = ft_list; walk; walk = g_list_next(walk), e->nfeatures++) + { + GstPluginFeature *curfeat = GST_PLUGIN_FEATURE (walk->data); + GstBinaryPluginFeature *newfeat; + const char *feat_name = g_type_name(G_OBJECT_TYPE(curfeat)); + + if ((newfeat = calloc(1, sizeof (GstBinaryPluginFeature))) == NULL) + goto fail; + + if (!feat_name || !gst_registry_binary_fill_feature(list, curfeat, newfeat, feat_name)) + { + GST_ERROR("Can't fill plugin feature, aborting."); + goto fail; + } + } + + GST_DEBUG("Found %d features in plugin \"%s\"\n", e->nfeatures, e->name); + return TRUE; + + fail: + free(chk); + free(e); + return FALSE; +} + +/* +** Write the cache to file. Part of the code was taken from gstregistryxml.c +*/ +gboolean +gst_registry_binary_write_cache(GstRegistry *registry, const char *location) +{ + GList *walk; + char *tmp_location; + GstBinaryRegistryMagic *magic; + GstBinaryChunck *magic_chunck; + GList *to_write = NULL; + + GST_INFO("Writing binary registry cache"); + + g_return_val_if_fail (GST_IS_REGISTRY (registry), FALSE); + tmp_location = g_strconcat (location, ".tmpXXXXXX", NULL); + registry->cache_file = g_mkstemp (tmp_location); + if (registry->cache_file == -1) + { + char *dir; + + /* oops, I bet the directory doesn't exist */ + dir = g_path_get_dirname (location); + g_mkdir_with_parents (dir, 0777); + g_free (dir); + + registry->cache_file = g_mkstemp (tmp_location); + } + + if (registry->cache_file == -1) + goto fail; + + if ((magic = calloc(1, sizeof (GstBinaryRegistryMagic))) == NULL || + !gst_registry_binary_initialize_magic(magic)) + goto fail; + + if ((magic_chunck = calloc(1, sizeof (GstBinaryChunck))) == NULL) + goto fail; + + magic_chunck->data = magic; + magic_chunck->size = sizeof (GstBinaryRegistryMagic); + to_write = g_list_append(to_write, magic_chunck); + + /* Iterate trough the list of plugins in the GstRegistry and adapt them to our structures */ + for (walk = g_list_last(registry->plugins); walk; walk = g_list_previous(walk)) + { + GstPlugin *plugin = GST_PLUGIN(walk->data); + + if (!plugin->filename) + continue; + + if (plugin->flags & GST_PLUGIN_FLAG_CACHED) + { + int ret; + struct stat statbuf; + + ret = g_stat (plugin->filename, &statbuf); + if ((ret = g_stat (plugin->filename, &statbuf)) < 0 || + plugin->file_mtime != statbuf.st_mtime || + plugin->file_size != statbuf.st_size) + continue; + } + + if (!gst_registry_binary_save_plugin(&to_write, registry, plugin)) + { + GST_ERROR("Can't write binary plugin information for \"%s\"", plugin->filename); + continue; /* Try anyway */ + } + } + + for (walk = g_list_first(to_write); walk; walk = g_list_next(walk)) + { + GstBinaryChunck *cur = walk->data; + + if (!gst_registry_binary_write(registry, cur->data, cur->size)) + { + free(cur->data); + free(cur); + g_list_free(to_write); + goto fail; + } + free(cur->data); + free(cur); + } + g_list_free(to_write); + + if (close(registry->cache_file) < 0) + { + GST_DEBUG("Can't close registry file : %s", strerror(errno)); + goto fail; + } + + if (g_file_test (tmp_location, G_FILE_TEST_EXISTS)) { +#ifdef WIN32 + remove (location); +#endif + rename (tmp_location, location); + } + + g_free (tmp_location); + return TRUE; + + fail: + g_free(tmp_location); + return FALSE; +} + +static GstPluginFeature* +gst_registry_binary_load_feature(GstBinaryPluginFeature *in) +{ + GstPluginFeature *feature; + GType type; + + if (!in->typename || !*(in->typename)) + return NULL; + + /* GST_INFO("Plugin feature typename : %s", in->typename);*/ + + if (!(type = g_type_from_name(in->typename))) + { + GST_ERROR("Unknown type from typename"); + return NULL; + } + feature = g_object_new (type, NULL); + + if (!feature) { + GST_ERROR("Can't create feature from type"); + return NULL; + } + + if (!GST_IS_PLUGIN_FEATURE (feature)) { + /* don't really know what it is */ + if (GST_IS_OBJECT (feature)) + gst_object_unref (feature); + else + g_object_unref (feature); + return NULL; + } + + feature->name = g_strdup(in->name); + feature->rank = in->rank; + + if (GST_IS_ELEMENT_FACTORY(feature)) + { + GstElementFactory *factory = GST_ELEMENT_FACTORY(feature); + + factory->details.longname = g_strdup(in->longname); + factory->details.klass = g_strdup(in->class); + factory->details.description = g_strdup(in->description); + factory->details.author = g_strdup(in->author); + + /* GST_INFO("Element factory : %s", factory->details.longname); */ + } + + GST_DEBUG("Added feature %p with name %s", feature, feature->name); + return feature; +} + +/* +** Make a new plugin from current GstBinaryPluginElement structure +** and save it to the GstRegistry. Return an offset to the next +** GstBinaryPluginElement structure. +*/ +static unsigned long +gst_registry_binary_get_binary_plugin(GstRegistry *registry, gchar *in) +{ + GstBinaryPluginElement *p = (GstBinaryPluginElement *) in; + GstPlugin *plugin = NULL; + GList *plugin_features = NULL; + GstBinaryPluginFeature *feat; + unsigned int i; + unsigned long offset; + + plugin = g_object_new (GST_TYPE_PLUGIN, NULL); + + plugin->flags |= GST_PLUGIN_FLAG_CACHED; + + plugin->desc.name = g_strdup(p->name); + plugin->desc.description= g_strdup(p->description); + plugin->filename = g_strdup(p->filename); + plugin->desc.version = g_strdup(p->version); + plugin->desc.license = g_strdup(p->license); + plugin->desc.source = g_strdup(p->source); + plugin->desc.package = g_strdup(p->package); + plugin->desc.origin = g_strdup(p->origin); + plugin->file_mtime = p->m32p; + plugin->file_size = p->size; + plugin->basename = g_path_get_basename (plugin->filename); + + if (plugin->file_mtime < 0 || plugin->file_size < 0) + { + GST_ERROR("Plugin time or file size is not valid !"); + g_free(plugin); + return -1; + } + + if (p->nfeatures < 0) + { + GST_ERROR("The number of feature structure is not valid !"); + gst_object_unref(plugin); + return -1; + } + + for (feat = (GstBinaryPluginFeature *) (in + sizeof (GstBinaryPluginElement)), i = 0; + i < p->nfeatures; i++, feat++) + { + GstPluginFeature *gstfeat; + + if ((gstfeat = gst_registry_binary_load_feature(feat)) == NULL) + { + g_list_free(plugin_features); + g_free(plugin); + GST_ERROR("Error while loading binary feature"); + return -1; + } + gstfeat->plugin_name = g_strdup(plugin->desc.name); + plugin_features = g_list_prepend(plugin_features, gstfeat); + } + + GST_DEBUG("Added plugin \"%s\" to global registry from binary registry", plugin->desc.name); + GList *g; + + gst_registry_add_plugin (registry, plugin); + for (g = plugin_features; g; g = g_list_next (g)) + gst_registry_add_feature (registry, GST_PLUGIN_FEATURE (g->data)); + /* g_list_free(plugin_features); */ + + offset = sizeof (GstBinaryPluginElement) + p->nfeatures * sizeof (GstBinaryPluginFeature); + return offset; +} + + +/* +** Read the cache and adapt it to fill GstRegistry +*/ +gboolean +gst_registry_binary_read_cache(GstRegistry *registry, const char *location) +{ + GMappedFile *mapped = NULL; + GTimer *timer = NULL; + gchar *contents = NULL; + gdouble seconds; + unsigned long offset, inc; + gsize size; + + /* make sure these types exist */ + GST_TYPE_ELEMENT_FACTORY; + GST_TYPE_TYPE_FIND_FACTORY; + GST_TYPE_INDEX_FACTORY; + + timer = g_timer_new (); + + if ((mapped = g_mapped_file_new(location, FALSE, NULL)) == NULL || + (contents = g_mapped_file_get_contents(mapped)) == NULL) + { + GST_ERROR("Can't load file : %s", strerror(errno)); + return FALSE; + } + if ((contents = gst_registry_binary_check_magic(contents)) == NULL) + { + GST_ERROR("Binary registry type not recognized (invalid magic)"); + g_mapped_file_free(mapped); + return FALSE; + } + + if ((size = g_mapped_file_get_length(mapped)) < sizeof (GstBinaryPluginElement)) + { + GST_INFO("No binary plugins structure to read"); + return TRUE; /* This is not really an error */ + } + + for (offset = inc = 0; (offset + sizeof (GstBinaryPluginElement)) < size && + (inc = gst_registry_binary_get_binary_plugin(registry, contents + offset)) > 0; + offset += inc) + ; /* May want in the future to do something here */ + if (inc < 0) + { + GST_DEBUG("Problem while reading binary registry"); + return FALSE; + } + + g_timer_stop (timer); + seconds = g_timer_elapsed (timer, NULL); + g_timer_destroy (timer); + + GST_INFO ("loaded %s in %f seconds", location, seconds); + + if (mapped) + g_mapped_file_free (mapped); + return TRUE; +} diff --git a/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.h b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.h new file mode 100644 index 0000000000..2ef24d765d --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.29/gstregistrybinary.h @@ -0,0 +1,194 @@ +/* GStreamer + * Copyright (C) 1999,2000 Erik Walthinsen + * 2000 Wim Taymans + * + * gstregistry.h: Header for registry handling + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* SUGGESTIONS AND TODO : +** ==================== +** - Use a compressed registry, but would induce performance loss +** - Encrypt the registry, for security purpose, but would also reduce performances +** - Also have a non-mmap based cache reading (work with file descriptors) +*/ + +#ifndef __GST_REGISTRYBINARY_H__ +#define __GST_REGISTRYBINARY_H__ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "glib-compat-private.h" +#include + +/* A magic, written at the beginning of the file */ +#define GST_MAGIC_BINARY_REGISTRY_STR "\xc0\xde\xf0\x0d" +#define GST_MAGIC_BINARY_REGISTRY_LEN (4) +#define GST_MAGIC_BINARY_VERSION_LEN (64) + +typedef struct _GstBinaryRegistryMagic +{ + char magic[GST_MAGIC_BINARY_REGISTRY_LEN]; + char version[GST_MAGIC_BINARY_VERSION_LEN]; +} GstBinaryRegistryMagic; + + +/* Used to store pointers to write */ +typedef struct _GstBinaryChunck +{ + void *data; + unsigned int size; +} GstBinaryChunck; + + +/* A structure containing (staticely) every information needed for a plugin +** +** Notes : +** "nfeatures" is used to say how many GstBinaryPluginFeature structures we will have +** right after the structure itself. +*/ + +/* Various lenght defines for our GstBinaryPluginElement structure +** Note : We could eventually use smaller size +*/ +#define GST_BINARY_REGISTRY_NAME_LEN (256) +#define GST_BINARY_REGISTRY_DESCRIPTION_LEN (1024) +#define GST_BINARY_REGISTRY_VERSION_LEN (64) +#define GST_BINARY_REGISTRY_LICENSE_LEN (256) +#define GST_BINARY_REGISTRY_SOURCE_LEN (256) +#define GST_BINARY_REGISTRY_PACKAGE_LEN