diff options
author | Chris Lord <chris@openedhand.com> | 2006-09-01 18:01:05 +0000 |
---|---|---|
committer | Chris Lord <chris@openedhand.com> | 2006-09-01 18:01:05 +0000 |
commit | f1f8c5a6a7234a7b618f98efbb3d28e414890fa9 (patch) | |
tree | c102f2cf6c35a43ba5591eb4f53e01f97408653b | |
parent | b89a8f8820c5322ed060e74bfae6181fb1602251 (diff) | |
download | openembedded-core-f1f8c5a6a7234a7b618f98efbb3d28e414890fa9.tar.gz openembedded-core-f1f8c5a6a7234a7b618f98efbb3d28e414890fa9.tar.bz2 openembedded-core-f1f8c5a6a7234a7b618f98efbb3d28e414890fa9.tar.xz openembedded-core-f1f8c5a6a7234a7b618f98efbb3d28e414890fa9.zip |
Add gstreamer 0.10 - Mostly packages from OE + updates and gstreamer
binary registry patch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@694 311d38ba-8fff-0310-9ca6-ca027cbcb966
26 files changed, 1413 insertions, 0 deletions
diff --git a/meta/packages/flac/flac-1.1.2/disable-xmms-plugin.patch b/meta/packages/flac/flac-1.1.2/disable-xmms-plugin.patch new file mode 100644 index 000000000..e42fcbd84 --- /dev/null +++ b/meta/packages/flac/flac-1.1.2/disable-xmms-plugin.patch @@ -0,0 +1,21 @@ +--- flac-1.1.0/src/Makefile.am.orig 2004-12-25 01:11:45.000000000 +0100 ++++ flac-1.1.0/src/Makefile.am 2004-12-25 01:12:10.000000000 +0100 +@@ -15,10 +15,6 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-if FLaC__HAS_XMMS +-XMMS_DIRS = plugin_xmms +-endif +- + if FLaC__HAS_OGG + OGGFLAC_DIRS = libOggFLAC libOggFLAC++ + OGGFLAC_TEST_DIRS = test_libOggFLAC test_libOggFLAC++ +@@ -33,7 +29,6 @@ + metaflac \ + monkeys_audio_utilities \ + plugin_common \ +- $(XMMS_DIRS) \ + plugin_winamp2 \ + plugin_winamp3 \ + test_grabbag \ diff --git a/meta/packages/flac/flac-1.1.2/xmms.m4 b/meta/packages/flac/flac-1.1.2/xmms.m4 new file mode 100644 index 000000000..6d1489bf1 --- /dev/null +++ b/meta/packages/flac/flac-1.1.2/xmms.m4 @@ -0,0 +1,148 @@ +# CFLAGS and library paths for XMMS +# written 15 December 1999 by Ben Gertzfield <che@debian.org> + +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 <che@debian.org> +# Revised 15 December 1999 by Jim Monty <monty@primenet.com> + + 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/packages/flac/flac_1.1.2.bb b/meta/packages/flac/flac_1.1.2.bb new file mode 100644 index 000000000..ec9d1b719 --- /dev/null +++ b/meta/packages/flac/flac_1.1.2.bb @@ -0,0 +1,82 @@ +DESCRIPTION = "FLAC is a Free Lossless Audio Codec." +MAINTAINER = "Chris Larson <kergoth@handhelds.org>" +LICENSE = "BSD GPL" +SECTION = "libs" +DEPENDS = "libogg" +PR = "r4" + +SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \ + file://disable-xmms-plugin.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 +} + +do_stage () { + install -d ${STAGING_DATADIR}/aclocal + + oe_libinstall -a -so -C src/libOggFLAC libOggFLAC ${STAGING_LIBDIR}/ + install -d ${STAGING_INCDIR}/OggFLAC + install -m 0644 ${S}/include/OggFLAC/export.h ${STAGING_INCDIR}/OggFLAC/export.h + + install -m 0644 ${S}/include/OggFLAC/all.h ${STAGING_INCDIR}/OggFLAC/all.h + install -m 0644 ${S}/include/OggFLAC/stream_encoder.h ${STAGING_INCDIR}/OggFLAC/stream_encoder.h + install -m 0644 ${S}/include/OggFLAC/stream_decoder.h ${STAGING_INCDIR}/OggFLAC/stream_decoder.h + install -m 0644 ${S}/src/libOggFLAC/libOggFLAC.m4 ${STAGING_DATADIR}/aclocal/ + + oe_libinstall -a -so -C src/libFLAC libFLAC ${STAGING_LIBDIR}/ + install -d ${STAGING_INCDIR}/FLAC + install -m 0644 ${S}/include/FLAC/export.h ${STAGING_INCDIR}/FLAC/export.h + install -m 0644 ${S}/include/FLAC/metadata.h ${STAGING_INCDIR}/FLAC/metadata.h + install -m 0644 ${S}/include/FLAC/all.h ${STAGING_INCDIR}/FLAC/all.h + install -m 0644 ${S}/include/FLAC/format.h ${STAGING_INCDIR}/FLAC/format.h + install -m 0644 ${S}/include/FLAC/stream_encoder.h ${STAGING_INCDIR}/FLAC/stream_encoder.h + install -m 0644 ${S}/include/FLAC/stream_decoder.h ${STAGING_INCDIR}/FLAC/stream_decoder.h + install -m 0644 ${S}/include/FLAC/ordinals.h ${STAGING_INCDIR}/FLAC/ordinals.h + install -m 0644 ${S}/include/FLAC/seekable_stream_encoder.h ${STAGING_INCDIR}/FLAC/seekable_stream_encoder.h + install -m 0644 ${S}/include/FLAC/file_encoder.h ${STAGING_INCDIR}/FLAC/file_encoder.h + install -m 0644 ${S}/include/FLAC/seekable_stream_decoder.h ${STAGING_INCDIR}/FLAC/seekable_stream_decoder.h + install -m 0644 ${S}/include/FLAC/file_decoder.h ${STAGING_INCDIR}/FLAC/file_decoder.h + install -m 0644 ${S}/include/FLAC/assert.h ${STAGING_INCDIR}/FLAC/assert.h + install -m 0644 ${S}/include/FLAC/callback.h ${STAGING_INCDIR}/FLAC/callback.h + install -m 0644 ${S}/src/libFLAC/libFLAC.m4 ${STAGING_DATADIR}/aclocal/ + + oe_libinstall -a -so -C src/libFLAC++ libFLAC++ ${STAGING_LIBDIR}/ + install -d ${STAGING_INCDIR}/FLAC++ + install -m 0644 ${S}/include/FLAC++/export.h ${STAGING_INCDIR}/FLAC++/export.h + install -m 0644 ${S}/include/FLAC++/metadata.h ${STAGING_INCDIR}/FLAC++/metadata.h + install -m 0644 ${S}/include/FLAC++/all.h ${STAGING_INCDIR}/FLAC++/all.h + install -m 0644 ${S}/include/FLAC++/encoder.h ${STAGING_INCDIR}/FLAC++/encoder.h + install -m 0644 ${S}/include/FLAC++/decoder.h ${STAGING_INCDIR}/FLAC++/decoder.h + install -m 0644 ${S}/src/libFLAC++/libFLAC++.m4 ${STAGING_DATADIR}/aclocal/ + + oe_libinstall -a -so -C src/libOggFLAC++ libOggFLAC++ ${STAGING_LIBDIR}/ + install -d ${STAGING_INCDIR}/OggFLAC++ + install -m 0644 ${S}/include/OggFLAC++/export.h ${STAGING_INCDIR}/OggFLAC++/export.h + install -m 0644 ${S}/include/OggFLAC++/all.h ${STAGING_INCDIR}/OggFLAC++/all.h + install -m 0644 ${S}/include/OggFLAC++/encoder.h ${STAGING_INCDIR}/OggFLAC++/encoder.h + install -m 0644 ${S}/include/OggFLAC++/decoder.h ${STAGING_INCDIR}/OggFLAC++/decoder.h + install -m 0644 ${S}/src/libOggFLAC++/libOggFLAC++.m4 ${STAGING_DATADIR}/aclocal/ +} diff --git a/meta/packages/gstreamer/gst-plugins-bad_0.10.3.bb b/meta/packages/gstreamer/gst-plugins-bad_0.10.3.bb new file mode 100644 index 000000000..75dc20170 --- /dev/null +++ b/meta/packages/gstreamer/gst-plugins-bad_0.10.3.bb @@ -0,0 +1,6 @@ +require gst-plugins.inc +DEPENDS += "gst-plugins-base" + +EXTRA_OECONF += "--disable-examples --disable-experimental --disable-sdl \ + --with-plugins=divx,libmms,musicbrainz,swfdec,xvid,wavpack" + diff --git a/meta/packages/gstreamer/gst-plugins-base_0.10.9.bb b/meta/packages/gstreamer/gst-plugins-base_0.10.9.bb new file mode 100644 index 000000000..88f3a3157 --- /dev/null +++ b/meta/packages/gstreamer/gst-plugins-base_0.10.9.bb @@ -0,0 +1,11 @@ +require gst-plugins.inc +DEPENDS += "libx11 alsa-lib freetype gnome-vfs liboil libogg libvorbis tremor" +PROVIDES_${PN} += "gst-plugins" + +EXTRA_OECONF += "--with-plugins=ximagesink,alsa,gnomevfs,ogg,vorbis \ + --disable-freetypetest --disable-pango --disable-theora" + +do_stage() { + autotools_stage_all +} + diff --git a/meta/packages/gstreamer/gst-plugins-good_0.10.4.bb b/meta/packages/gstreamer/gst-plugins-good_0.10.4.bb new file mode 100644 index 000000000..cb0a818eb --- /dev/null +++ b/meta/packages/gstreamer/gst-plugins-good_0.10.4.bb @@ -0,0 +1,7 @@ +require gst-plugins.inc +DEPENDS += "gst-plugins-base gconf cairo jpeg libpng gtk+ zlib libid3tag flac \ + speex" + +EXTRA_OECONF += " --with-plugins=ximagesrc,cairo,flac,gconfelements,gdkpixbuf,\ + jpeg,png,speex,taglib \ + --disable-aalib --disable-esd --disable-shout2" diff --git a/meta/packages/gstreamer/gst-plugins-ugly/lame-autoconf.patch b/meta/packages/gstreamer/gst-plugins-ugly/lame-autoconf.patch new file mode 100644 index 000000000..e2f455991 --- /dev/null +++ b/meta/packages/gstreamer/gst-plugins-ugly/lame-autoconf.patch @@ -0,0 +1,11 @@ +--- gst-plugins-ugly-0.10.4/configure.ac.old 2006-09-01 18:55:40.000000000 +0100 ++++ gst-plugins-ugly-0.10.4/configure.ac 2006-09-01 18:56:36.000000000 +0100 +@@ -282,7 +282,7 @@ + LAME_LIBS="-lmp3lame -lm" + dnl is lame presets available + LAME_CFLAGS="" +- AC_TRY_RUN([ ++ AC_TRY_COMPILE([ + #include <lame/lame.h> + int main (int argc, char *argv[]) + { diff --git a/meta/packages/gstreamer/gst-plugins-ugly_0.10.4.bb b/meta/packages/gstreamer/gst-plugins-ugly_0.10.4.bb new file mode 100644 index 000000000..ad287d90a --- /dev/null +++ b/meta/packages/gstreamer/gst-plugins-ugly_0.10.4.bb @@ -0,0 +1,6 @@ +require gst-plugins.inc +DEPENDS += "gst-plugins-base libid3tag libmad mpeg2dec liba52 lame" + +SRC_URI += " file://lame-autoconf.patch;patch=1" +EXTRA_OECONF += "--with-plugins=a52dec,lame,id3tag,mad,mpeg2dec" + diff --git a/meta/packages/gstreamer/gst-plugins.inc b/meta/packages/gstreamer/gst-plugins.inc new file mode 100644 index 000000000..1ce7ef8d9 --- /dev/null +++ b/meta/packages/gstreamer/gst-plugins.inc @@ -0,0 +1,29 @@ +DESCRIPTION = "Plugins for GStreamer" +SECTION = "multimedia" +PRIORITY = "optional" +MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>" +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" + +python populate_packages_prepend () { + gst_libdir = bb.data.expand('${libdir}/gstreamer-${LIBV}', d) + postinst = bb.data.getVar('plugin_postinst', d, 1) + + do_split_packages(d, gst_libdir, '^libgst(.*)\.so$', 'gst-plugin-%s', 'GStreamer plugin for %s', postinst=postinst) + do_split_packages(d, gst_libdir, '^libgst(.*)\.l?a$', 'gst-plugin-%s-dev', 'GStreamer plugin for %s (development files)') +} + +#do_stage() { +# autotools_stage_all +#} + +ALLOW_EMPTY = "1" diff --git a/meta/packages/gstreamer/gstreamer-0.10.9/gstreamer-0.9-binary-registry.patch b/meta/packages/gstreamer/gstreamer-0.10.9/gstreamer-0.9-binary-registry.patch new file mode 100644 index 000000000..e166fc37e --- /dev/null +++ b/meta/packages/gstreamer/gstreamer-0.10.9/gstreamer-0.9-binary-registry.patch @@ -0,0 +1,65 @@ +diff -urNd ../gstreamer-0.10.9-r0/gstreamer-0.10.9/gst/gst.c gstreamer-0.10.9/gst/gst.c +--- ../gstreamer-0.10.9-r0/gstreamer-0.10.9/gst/gst.c 2006-07-11 21:16:04.000000000 +0100 ++++ gstreamer-0.10.9/gst/gst.c 2006-09-01 12:30:36.000000000 +0100 +@@ -553,7 +553,7 @@ + GList *l; + + GST_DEBUG ("reading registry cache: %s", registry_file); +- gst_registry_xml_read_cache (default_registry, registry_file); ++ gst_registry_binary_read_cache (default_registry, registry_file); + + /* scan paths specified via --gst-plugin-path */ + GST_DEBUG ("scanning paths added via --gst-plugin-path"); +@@ -624,7 +624,7 @@ + } + + GST_DEBUG ("writing registry cache"); +- if (!gst_registry_xml_write_cache (default_registry, registry_file)) { ++ if (!gst_registry_binary_write_cache (default_registry, registry_file)) { + g_warning ("Problem writing registry cache to %s: %s", registry_file, + g_strerror (errno)); + return FALSE; +@@ -700,7 +700,7 @@ + + if (WEXITSTATUS (status) == EXIT_SUCCESS) { + GST_DEBUG ("parent reading registry cache"); +- gst_registry_xml_read_cache (default_registry, registry_file); ++ gst_registry_binary_read_cache (default_registry, registry_file); + } else { + GST_DEBUG ("parent re-scanning registry"); + scan_and_update_registry (default_registry, registry_file, FALSE); +@@ -722,7 +722,7 @@ + registry_file = g_strdup (g_getenv ("GST_REGISTRY")); + if (registry_file == NULL) { + registry_file = g_build_filename (g_get_home_dir (), +- ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".xml", NULL); ++ ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL); + } + #ifdef HAVE_FORK + if (g_getenv ("GST_REGISTRY_FORK") == NULL +diff -urNd ../gstreamer-0.10.9-r0/gstreamer-0.10.9/gst/gstregistry.h gstreamer-0.10.9/gst/gstregistry.h +--- ../gstreamer-0.10.9-r0/gstreamer-0.10.9/gst/gstregistry.h 2006-07-11 21:16:04.000000000 +0100 ++++ gstreamer-0.10.9/gst/gstregistry.h 2006-09-01 12:30:36.000000000 +0100 +@@ -105,8 +105,8 @@ + GstPlugin * gst_registry_lookup (GstRegistry *registry, const char *filename); + GstPluginFeature * gst_registry_lookup_feature (GstRegistry *registry, const char *name); + +-gboolean gst_registry_xml_read_cache (GstRegistry * registry, const char *location); +-gboolean gst_registry_xml_write_cache (GstRegistry * registry, const char *location); ++gboolean gst_registry_binary_read_cache (GstRegistry * registry, const char *location); ++gboolean gst_registry_binary_write_cache (GstRegistry * registry, const char *location); + + void _gst_registry_remove_cache_plugins (GstRegistry *registry); + +diff -urNd ../gstreamer-0.10.9-r0/gstreamer-0.10.9/gst/Makefile.am gstreamer-0.10.9/gst/Makefile.am +--- ../gstreamer-0.10.9-r0/gstreamer-0.10.9/gst/Makefile.am 2006-07-13 16:31:47.000000000 +0100 ++++ gstreamer-0.10.9/gst/Makefile.am 2006-09-01 12:30:36.000000000 +0100 +@@ -9,7 +9,7 @@ + if GST_DISABLE_REGISTRY + GST_REGISTRY_SRC = + else +-GST_REGISTRY_SRC = gstregistryxml.c ++GST_REGISTRY_SRC = gstregistrybinary.c + endif + + if GST_DISABLE_PARSE diff --git a/meta/packages/gstreamer/gstreamer/gstregistrybinary.c b/meta/packages/gstreamer/gstreamer/gstregistrybinary.c new file mode 100644 index 000000000..c1f3e71af --- /dev/null +++ b/meta/packages/gstreamer/gstreamer/gstregistrybinary.c @@ -0,0 +1,487 @@ +/* GStreamer + * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> + * 2000 Wim Taymans <wtay@chello.be> + * 2005 David A. Schleef <ds@schleef.org> + * + * 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 <gst/gstregistrybinary.h> + +/* +** 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/packages/gstreamer/gstreamer/gstregistrybinary.h b/meta/packages/gstreamer/gstreamer/gstregistrybinary.h new file mode 100644 index 000000000..2ef24d765 --- /dev/null +++ b/meta/packages/gstreamer/gstreamer/gstregistrybinary.h @@ -0,0 +1,194 @@ +/* GStreamer + * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> + * 2000 Wim Taymans <wim.taymans@chello.be> + * + * 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 <stdio.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <dirent.h> +#include <fcntl.h> +#include <sys/mman.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <gst/gst_private.h> +#include <gst/gstelement.h> +#include <gst/gsttypefind.h> +#include <gst/gsttypefindfactory.h> +#include <gst/gsturi.h> +#include <gst/gstinfo.h> +#include <gst/gstenumtypes.h> +#include <gst/gstregistry.h> +#include <gst/gstpadtemplate.h> + +#include "glib-compat-private.h" +#include <glib/gstdio.h> + +/* 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 (1024) +#define GST_BINARY_REGISTRY_ORIGIN_LEN (1024) + +typedef struct _GstBinaryPluginElement +{ + char name[GST_BINARY_REGISTRY_NAME_LEN]; + char description[GST_BINARY_REGISTRY_DESCRIPTION_LEN]; + char filename[_POSIX_PATH_MAX]; + char version[GST_BINARY_REGISTRY_VERSION_LEN]; + char license[GST_BINARY_REGISTRY_LICENSE_LEN]; + char source[GST_BINARY_REGISTRY_SOURCE_LEN]; + char package[GST_BINARY_REGISTRY_PACKAGE_LEN]; + char origin[GST_BINARY_REGISTRY_ORIGIN_LEN]; + unsigned long size; + unsigned long m32p; + unsigned int nfeatures; +} GstBinaryPluginElement; + + +/* A structure containing the plugin features +** +** Note : +** "npadtemplates" is used to store the number of GstBinaryPadTemplate structures following the structure itself. +** "ninterfaces" is used to store the number of GstBinaryInterface structures following the structure itself. +** "nuritypes" is used to store the number of GstBinaryUriType structures following the structure itself. +*/ +#define GST_BINARY_REGISTRY_TYPENAME_TYPENAME_LEN (256) +#define GST_BINARY_REGISTRY_TYPENAME_NAME_LEN (256) +#define GST_BINARY_REGISTRY_TYPENAME_LONGNAME_LEN (1024) +#define GST_BINARY_REGISTRY_TYPENAME_CLASS_LEN (512) +#define GST_BINARY_REGISTRY_TYPENAME_DESCRIPTION_LEN (1024) +#define GST_BINARY_REGISTRY_TYPENAME_AUTHOR_LEN (256) + +typedef struct _GstBinaryPluginFeature +{ + char typename[GST_BINARY_REGISTRY_TYPENAME_TYPENAME_LEN]; + char name[GST_BINARY_REGISTRY_TYPENAME_NAME_LEN]; + unsigned long rank; + char longname[GST_BINARY_REGISTRY_TYPENAME_LONGNAME_LEN]; + char class[GST_BINARY_REGISTRY_TYPENAME_CLASS_LEN]; + char description[GST_BINARY_REGISTRY_TYPENAME_DESCRIPTION_LEN]; + char author[GST_BINARY_REGISTRY_TYPENAME_AUTHOR_LEN]; + unsigned int npadtemplates; + unsigned int ninterfaces; + unsigned int nuritypes; +} GstBinaryPluginFeature; + + +/* +** A structure containing the static pad templates of a plugin feature +*/ +#define GST_BINARY_REGISTRY_PADTEMPLATE_NAME_LEN (256) +#define GST_BINARY_REGISTRY_PADTEMPLATE_CAP_LEN (1024) + +typedef struct _GstBinaryPadTemplate +{ + char name[GST_BINARY_REGISTRY_PADTEMPLATE_NAME_LEN]; + char cap[GST_BINARY_REGISTRY_PADTEMPLATE_CAP_LEN]; + int direction; /* Either 0:"sink" or 1:"src" */ + GstPadPresence presence; +} GstBinaryPadTemplate; + +/* +** A very simple structure defining the plugin feature interface string +*/ +#define GST_BINARY_REGISTRY_INTERFACE_INTERFACE_LEN (512) +typedef struct _GstBinaryInterface +{ + char interface[GST_BINARY_REGISTRY_INTERFACE_INTERFACE_LEN]; + unsigned long size; +} GstBinaryInterface; + +/* Uri Type */ +typedef struct _GstBinaryUriType +{ + GstURIType type; + unsigned long nuriprotocols; +} GstBinaryUriType; + +/* +** Function prototypes +*/ + +/* Local prototypes */ +inline static gboolean gst_registry_binary_write(GstRegistry *registry, const void *mem, const ssize_t size); +inline static gboolean gst_registry_binary_initialize_magic(GstBinaryRegistryMagic *m); +static gboolean gst_registry_binary_fill_feature(GList **list, GstPluginFeature *, GstBinaryPluginFeature *, const char *); +static gboolean gst_registry_binary_save_plugin(GList **list, GstRegistry *registry, GstPlugin *plugin); +static gchar *gst_registry_binary_check_magic(gchar *in); +static GstPluginFeature *gst_registry_binary_load_feature(GstBinaryPluginFeature *); +static unsigned long gst_registry_binary_get_binary_plugin(GstRegistry *registry, gchar *in); + +/* Exportable */ +gboolean gst_registry_binary_write_cache(GstRegistry *registry, const char *location); +gboolean gst_registry_binary_read_cache(GstRegistry *registry, const char *location); + +#endif /* !__GST_REGISTRYBINARY_H__ */ + + diff --git a/meta/packages/gstreamer/gstreamer_0.10.9.bb b/meta/packages/gstreamer/gstreamer_0.10.9.bb new file mode 100644 index 000000000..66db82752 --- /dev/null +++ b/meta/packages/gstreamer/gstreamer_0.10.9.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ +It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." +SECTION = "multimedia" +PRIORITY = "optional" +LICENSE = "LGPL" +HOMEPAGE = "http://www.gstreamer.net/" +MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>" +DEPENDS = "glib-2.0 gettext-native popt" + +inherit autotools pkgconfig + +SRC_URI = "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.bz2 \ + file://gstregistrybinary.c \ + file://gstregistrybinary.h \ + file://gstreamer-0.9-binary-registry.patch;patch=1" +EXTRA_OECONF = "--disable-docs-build --disable-dependency-tracking --with-check=no" + +do_compile_prepend () { + mv ${WORKDIR}/gstregistrybinary.[ch] ${S}/gst/ +} + +do_stage() { + oe_runmake install prefix=${STAGING_DIR} \ + bindir=${STAGING_BINDIR} \ + includedir=${STAGING_INCDIR} \ + libdir=${STAGING_LIBDIR} \ + datadir=${STAGING_DATADIR} \ + mandir=${STAGING_DIR}/share/man +} + +FILES_${PN} += " ${libdir}/gstreamer-0.10/*.so" +FILES_${PN}-dev += " ${libdir}/gstreamer-0.10/*.la ${libdir}/gstreamer-0.10/*.a" + diff --git a/meta/packages/lame/lame/no-gtk1.patch b/meta/packages/lame/lame/no-gtk1.patch new file mode 100644 index 000000000..4f1a52218 --- /dev/null +++ b/meta/packages/lame/lame/no-gtk1.patch @@ -0,0 +1,16 @@ +--- lame-3.96.1/configure.in~no-gtk1.patch 2004-07-25 15:52:12.000000000 +0100 ++++ lame-3.96.1/configure.in 2004-09-10 15:54:39.000000000 +0100 +@@ -363,7 +363,12 @@ + + dnl configure use of features + +-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no") ++#AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no") ++HAVE_GTK="no" ++GTK_CFLAGS="" ++GTK_LIBS="" ++AC_SUBST(GTK_CFLAGS) ++AC_SUBST(GTK_LIBS) + if test "${HAVE_GTK}" = "yes"; then + AC_DEFINE(HAVE_GTK, 1, have working GTK) + fi diff --git a/meta/packages/lame/lame_3.96.1.bb b/meta/packages/lame/lame_3.96.1.bb new file mode 100644 index 000000000..b732a8cb2 --- /dev/null +++ b/meta/packages/lame/lame_3.96.1.bb @@ -0,0 +1,30 @@ +SECTION = "console/utils" +DESCRIPTION = "Not an MP3 encoder" +LICENSE = "LGPL" +PR = "r2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \ + file://no-gtk1.patch;patch=1" + +inherit autotools + +PACKAGES += "libmp3lame libmp3lame-dev" +FILES_${PN} = "${bindir}/lame" +FILES_libmp3lame = "${libdir}/libmp3lame.so.*" +FILES_libmp3lame-dev = "${includedir} ${libdir}" +FILES_${PN}-dev = "" + +do_configure() { + # no autoreconf please + aclocal + autoconf + libtoolize --force + oe_runconf +} + +do_stage() { + install -d ${STAGING_LIBDIR} + oe_libinstall -C libmp3lame -so -a libmp3lame ${STAGING_LIBDIR} + install -d ${STAGING_INCDIR}/lame + install -m 0644 include/lame.h ${STAGING_INCDIR}/lame/ +} diff --git a/meta/packages/liba52/liba52_0.7.4.bb b/meta/packages/liba52/liba52_0.7.4.bb new file mode 100644 index 000000000..f6894ab4d --- /dev/null +++ b/meta/packages/liba52/liba52_0.7.4.bb @@ -0,0 +1,30 @@ +LICENSE = "GPL" + +DESCRIPTION = "Library for reading some sort of media format." +SECTION = "libs" +PRIORITY = "optional" +DEPENDS = "" + +inherit autotools + +SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz" +S="${WORKDIR}/a52dec-${PV}" + +EXTRA_OECONF = " --enable-shared " + +PACKAGES = "${PN} ${PN}-dev a52dec a52dec-doc" + +FILES_${PN} = " ${libdir}/liba52.so.0 ${libdir}/liba52.so.0.0.0 " +FILES_${PN}-dev = " ${includedir}/a52dec/*.h ${libdir}/liba52.so ${libdir}/liba52.la ${libdir}/liba52.a " +FILES_a52dec = " ${bindir}/* " +FILES_a52dec-doc = " ${mandir}/man1/* " + +do_stage() { + oe_libinstall -a -so -C liba52 liba52 ${STAGING_LIBDIR} + + install -d ${STAGING_INCDIR}/a52dec + install -m 0644 ${S}/include/a52.h ${STAGING_INCDIR}/a52dec/a52.h + install -m 0644 ${S}/include/attributes.h ${STAGING_INCDIR}/a52dec/attributes.h + install -m 0644 ${S}/include/audio_out.h ${STAGING_INCDIR}/a52dec/audio_out.h + install -m 0644 ${S}/include/mm_accel.h ${STAGING_INCDIR}/a52dec/mm_accel.h +} diff --git a/meta/packages/libid3tag/libid3tag_0.15.0b.bb b/meta/packages/libid3tag/libid3tag_0.15.0b.bb new file mode 100644 index 000000000..e47c00e76 --- /dev/null +++ b/meta/packages/libid3tag/libid3tag_0.15.0b.bb @@ -0,0 +1,19 @@ +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Greg Gilbert <greg@treke.net>" +DEPENDS = "zlib" +DESCRIPTION = "Library for interacting with ID3 tags." +LICENSE = "GPL" +PR = "r2" + +SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libid3tag-${PV}.tar.gz " +S = "${WORKDIR}/libid3tag-${PV}" + +inherit autotools + +EXTRA_OECONF = "-enable-speed" + +do_stage() { + oe_libinstall -so libid3tag ${STAGING_LIBDIR} + install -m 0644 id3tag.h ${STAGING_INCDIR} +} diff --git a/meta/packages/libmad/libmad_0.15.0b.bb b/meta/packages/libmad/libmad_0.15.0b.bb new file mode 100644 index 000000000..b3614db05 --- /dev/null +++ b/meta/packages/libmad/libmad_0.15.0b.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "MPEG Audio Decoder Library" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Greg Gilbert <greg@treke.net>" +DEPENDS = "libid3tag" +LICENSE = "GPL" +PR = "r2" + +SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz" +S = "${WORKDIR}/libmad-${PV}" + +inherit autotools + +EXTRA_OECONF = "-enable-speed --enable-shared" +# The ASO's don't take any account of thumb... +EXTRA_OECONF_append_thumb = " --disable-aso --enable-fpm=default" + +do_configure_prepend () { +# damn picky automake... + touch NEWS AUTHORS ChangeLog +} + +do_stage() { + oe_libinstall -so libmad ${STAGING_LIBDIR} + install -m 0644 mad.h ${STAGING_INCDIR} +} diff --git a/meta/packages/libogg/libogg/m4.patch b/meta/packages/libogg/libogg/m4.patch new file mode 100644 index 000000000..66239f4f6 --- /dev/null +++ b/meta/packages/libogg/libogg/m4.patch @@ -0,0 +1,11 @@ +--- libogg-1.1/ogg.m4.orig 2003-03-08 03:44:29 +0100 ++++ libogg-1.1/ogg.m4 2004-08-12 11:26:46 +0200 +@@ -5,7 +5,7 @@ + dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) + dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS + dnl +-AC_DEFUN(XIPH_PATH_OGG, ++AC_DEFUN([XIPH_PATH_OGG], + [dnl + dnl Get the cflags and libraries + dnl diff --git a/meta/packages/libogg/libogg_1.1.bb b/meta/packages/libogg/libogg_1.1.bb new file mode 100644 index 000000000..687b4dece --- /dev/null +++ b/meta/packages/libogg/libogg_1.1.bb @@ -0,0 +1,19 @@ +SECTION = "libs" +DESCRIPTION = "libogg is the bitstream and framing library \ +for the Ogg project. It provides functions which are \ +necessary to codec libraries like libvorbis." +LICENSE = "BSD" +PR = "r3" + +SRC_URI = "http://www.vorbis.com/files/1.0.1/unix/libogg-${PV}.tar.gz \ +file://m4.patch;patch=1" + +inherit autotools pkgconfig + +do_stage () { + oe_libinstall -a -so -C src libogg ${STAGING_LIBDIR} + + install -d ${STAGING_INCDIR}/ogg + (cd ${S}/include/ogg; cp config_types.h ogg.h os_types.h ${STAGING_INCDIR}/ogg/) + install -m 0644 ${S}/ogg.m4 ${STAGING_DATADIR}/aclocal/ +} diff --git a/meta/packages/liboil/liboil_0.3.9.bb b/meta/packages/liboil/liboil_0.3.9.bb new file mode 100644 index 000000000..04a83100b --- /dev/null +++ b/meta/packages/liboil/liboil_0.3.9.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Liboil is a library of simple functions that are optimized for various CPUs." +HOMEPAGE = "http://liboil.freedesktop.org/" +LICENSE = "various" +MAINTAINER = "Koen Kooi <koen@on.kabel.utwente.nl>" + +SRC_URI = "http://liboil.freedesktop.org/download/${P}.tar.gz" + +inherit autotools pkgconfig + +do_stage() { + autotools_stage_all +} diff --git a/meta/packages/libvorbis/libvorbis/m4.patch b/meta/packages/libvorbis/libvorbis/m4.patch new file mode 100644 index 000000000..797a6b62a --- /dev/null +++ b/meta/packages/libvorbis/libvorbis/m4.patch @@ -0,0 +1,11 @@ +--- libvorbis-1.0.1/vorbis.m4.orig 2002-08-14 20:25:39 +0200 ++++ libvorbis-1.0.1/vorbis.m4 2004-08-12 12:58:13 +0200 +@@ -6,7 +6,7 @@ + dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) + dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS + dnl +-AC_DEFUN(XIPH_PATH_VORBIS, ++AC_DEFUN([XIPH_PATH_VORBIS], + [dnl + dnl Get the cflags and libraries + dnl diff --git a/meta/packages/libvorbis/libvorbis_1.0.1.bb b/meta/packages/libvorbis/libvorbis_1.0.1.bb new file mode 100644 index 000000000..8a2d17a0a --- /dev/null +++ b/meta/packages/libvorbis/libvorbis_1.0.1.bb @@ -0,0 +1,32 @@ +SECTION = "libs" +DEPENDS = "libogg" +DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \ +that is free of intellectual property restrictions. libvorbis \ +is the main vorbis codec library." +LICENSE = "BSD" +PR = "r2" + +SRC_URI = "http://www.vorbis.com/files/${PV}/unix/libvorbis-${PV}.tar.gz \ +file://m4.patch;patch=1" + +inherit autotools pkgconfig + +# vorbisfile.c reveals a problem in the gcc register spilling for the +# thumb instruction set... +FULL_OPTIMIZATION_thumb = "-O0" + +EXTRA_OECONF = "--with-ogg-libraries=${STAGING_LIBDIR} \ + --with-ogg-includes=${STAGING_INCDIR}" + +do_stage () { + oe_libinstall -a -so -C lib libvorbis ${STAGING_LIBDIR} + oe_libinstall -a -so -C lib libvorbisfile ${STAGING_LIBDIR} + oe_libinstall -a -so -C lib libvorbisenc ${STAGING_LIBDIR} + + install -d ${STAGING_INCDIR}/vorbis + install -m 0644 include/vorbis/vorbisenc.h \ + include/vorbis/vorbisfile.h \ + include/vorbis/codec.h ${STAGING_INCDIR}/vorbis/ + install -d ${STAGING_DATADIR}/aclocal + install -m 0644 vorbis.m4 ${STAGING_DATADIR}/aclocal/ +} diff --git a/meta/packages/mpeg2dec/mpeg2dec_0.4.0b.bb b/meta/packages/mpeg2dec/mpeg2dec_0.4.0b.bb new file mode 100644 index 000000000..0d07d2065 --- /dev/null +++ b/meta/packages/mpeg2dec/mpeg2dec_0.4.0b.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "Library and test program for decoding mpeg-2 and mpeg-1 video streams" +HOMEPAGE = "http://libmpeg2.sourceforge.net/" +LICENSE = "GPL" +PRIORITY = "optional" +MAINTAINER = "Rene Wagner <rw@handhelds.org>" +SECTION = "libs" +PR = "r1" + +DEPENDS = "libx11" + +SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz" +S = "${WORKDIR}/mpeg2dec-0.4.0" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-shared --disable-sdl --with-x" + +PACKAGES = "mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev" + +FILES_${PN} = "${bindir}" +FILES_libmpeg2 = "${libdir}/libmpeg2.so.*" +FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*" +FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \ + ${libdir}/libmpeg2.*a \ + ${libdir}/pkgconfig/libmpeg2.pc \ + ${includedir}/mpeg2dec/mpeg2.h" +FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \ + ${libdir}/libmpeg2convert.*a \ + ${libdir}/pkgconfig/libmpeg2convert.pc \ + ${includedir}/mpeg2dec/mpeg2convert.h" + +mpeg2dec_include = "mpeg2.h mpeg2convert.h" + +do_stage () { + oe_libinstall -so -C libmpeg2/.libs libmpeg2 ${STAGING_LIBDIR} + oe_libinstall -so -C libmpeg2/convert/.libs libmpeg2convert ${STAGING_LIBDIR} + + mkdir -p ${STAGING_INCDIR}/mpeg2dec/ + for i in ${mpeg2dec_include}; do + install -m 0644 include/$i ${STAGING_INCDIR}/mpeg2dec/ + done +} diff --git a/meta/packages/speex/speex_1.1.7.bb b/meta/packages/speex/speex_1.1.7.bb new file mode 100644 index 000000000..7ce34a80e --- /dev/null +++ b/meta/packages/speex/speex_1.1.7.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech." +SECTION = "libs" +LICENSE = "BSD" +HOMEPAGE = "http://www.speex.org" +DEPENDS = "libogg" +PR = "r0" + +SRC_URI = "http://www.speex.org/download/speex-${PV}.tar.gz" + +inherit autotools + +# Some interesting options are: +# +# --enable-arm4-asm +# --enable-arm5e-asm +# --enable-fixed-point +# + +EXTRA_OECONF_append_openmn = " --enable-arm5e-asm --enable-fixed-point" + +do_configure_append() { + sed -i s/"^OGG_CFLAGS.*$"/"OGG_CFLAGS = "/g Makefile */Makefile */*/Makefile + sed -i s/"^OGG_LIBS.*$"/"OGG_LIBS = -logg"/g Makefile */Makefile */*/Makefile + perl -pi -e 's:^includedir.*$:includedir = ${STAGING_INCDIR}:g' Makefile */Makefile */*/Makefile + perl -pi -e 's:^oldincludedir.*$:includedir = ${STAGING_INCDIR}:g' Makefile */Makefile */*/Makefile + perl -pi -e 's:\s*-I/usr/include$::g' Makefile */Makefile */*/Makefile +} + +do_stage() { + oe_libinstall -C libspeex/.libs -so libspeex ${STAGING_LIBDIR} + install -d ${STAGING_INCDIR}/speex + install -m 0644 include/speex/speex.h ${STAGING_INCDIR}/speex + install -m 0644 include/speex/speex_bits.h ${STAGING_INCDIR}/speex + install -m 0644 include/speex/speex_callbacks.h ${STAGING_INCDIR}/speex + install -m 0644 include/speex/speex_header.h ${STAGING_INCDIR}/speex + install -m 0644 include/speex/speex_stereo.h ${STAGING_INCDIR}/speex +} diff --git a/meta/packages/tremor/tremor_20041119.bb b/meta/packages/tremor/tremor_20041119.bb new file mode 100644 index 000000000..63de7a423 --- /dev/null +++ b/meta/packages/tremor/tremor_20041119.bb @@ -0,0 +1,28 @@ +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Greg Gilbert <greg@treke.net>" +DEPENDS = "libogg" +DESCRIPTION = "tremor is a fixed point implementation of the vorbis codec." +LICENSE = "BSD" +SRCDATE = "${PV}" +PR = "r1" + +SRC_URI = "svn://svn.xiph.org/trunk;module=Tremor;rev=4573;proto=http" + +S = "${WORKDIR}/Tremor" + +inherit autotools + +EXTRA_OECONF=" --enable-shared --disable-rpath " + +#do_configure_prepend() { +# ./autogen.sh +#} + +do_stage() { + oe_runmake install prefix=${STAGING_DIR} \ + bindir=${STAGING_BINDIR} \ + includedir=${STAGING_INCDIR}/tremor \ + libdir=${STAGING_LIBDIR} \ + datadir=${STAGING_DATADIR} +} |