mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 06:36:41 +00:00
merging trunk
This commit is contained in:
commit
7af6afbf03
@ -9,10 +9,11 @@ mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/modules/mixer/simple/.libs/*.so $INSTALL/usr/lib
|
||||
|
||||
mkdir -p $INSTALL/usr/share/alsa
|
||||
sed 's%.*~/\.asoundrc.*%%' $PKG_BUILD/src/conf/alsa.conf > $INSTALL/usr/share/alsa/alsa.conf
|
||||
cp -PR $PKG_BUILD/src/conf/smixer.conf $INSTALL/usr/share/alsa
|
||||
cp -PR $PKG_BUILD/src/conf/*.alisp $INSTALL/usr/share/alsa
|
||||
cp -rf $PKG_BUILD/src/conf/cards $INSTALL/usr/share/alsa/
|
||||
cp -rf $PKG_BUILD/src/conf/pcm $INSTALL/usr/share/alsa/
|
||||
sed 's%~/\.asoundrc%/storage/\.config/asound.conf%' \
|
||||
$PKG_BUILD/src/conf/alsa.conf > $INSTALL/usr/share/alsa/alsa.conf
|
||||
cp -P $PKG_BUILD/src/conf/smixer.conf $INSTALL/usr/share/alsa
|
||||
cp -P $PKG_BUILD/src/conf/*.alisp $INSTALL/usr/share/alsa
|
||||
cp -PR $PKG_BUILD/src/conf/cards $INSTALL/usr/share/alsa/
|
||||
cp -PR $PKG_BUILD/src/conf/pcm $INSTALL/usr/share/alsa/
|
||||
rm -f $INSTALL/usr/share/alsa/cards/Makefile*
|
||||
rm -f $INSTALL/usr/share/alsa/pcm/Makefile*
|
||||
|
@ -88,8 +88,10 @@ else
|
||||
mixer 'Analog Rear' 100%
|
||||
mixer 'Analog Center/LFE' 100%
|
||||
|
||||
# ASRock ION 330 (and perhaps others) has 2 IEC958 channels
|
||||
mixer IEC958,1 on
|
||||
|
||||
# asrock ion 330 has Master Front set to 0
|
||||
# ASRock ION 330 has Master Front set to 0
|
||||
mixer 'Master Front' 100%
|
||||
|
||||
fi
|
||||
|
@ -20,4 +20,4 @@ options snd-hda-intel model=auto
|
||||
|
||||
# fix some Audio Problems with HDMI on ION based Hardware
|
||||
# see: http://xbmc.org/forum/showthread.php?t=69479
|
||||
alias snd-card-0 snd-hda-codec-nvhdmi
|
||||
alias snd-card-0 snd-hda-codec-nvhdmi
|
||||
|
@ -8,5 +8,6 @@ $SCRIPTS/install alsa-lib
|
||||
$SCRIPTS/install alsa-utils
|
||||
|
||||
mkdir -p $INSTALL/etc/modprobe.d
|
||||
cp $PKG_DIR/config/alsa-base.conf $INSTALL/etc/modprobe.d
|
||||
cp $PKG_DIR/config/audio $INSTALL/etc
|
||||
cp -P $PKG_DIR/config/alsa-base.conf $INSTALL/etc/modprobe.d
|
||||
cp -P $PKG_DIR/config/audio $INSTALL/etc
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build libiconv
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
|
@ -2,7 +2,5 @@
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install libiconv
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/lib/*/.libs/*.so*[.0-9] $INSTALL/usr/lib
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install gettext
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib
|
@ -1 +0,0 @@
|
||||
http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
|
@ -1 +1 @@
|
||||
http://sources.openelec.tv/svn/bootchart-1.2.tar.gz
|
||||
http://sources.openelec.tv/svn/bootchart-1.3.tar.gz
|
||||
|
@ -3,7 +3,6 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build gettext
|
||||
$SCRIPTS/build dbus
|
||||
$SCRIPTS/build glib
|
||||
$SCRIPTS/build expat
|
||||
|
@ -5,7 +5,6 @@
|
||||
$SCRIPTS/install dbus
|
||||
$SCRIPTS/install glib
|
||||
$SCRIPTS/install expat
|
||||
$SCRIPTS/install gettext
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/.build-target/dbus/.libs/*.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/.build-target/dbus/.libs/*.so* $INSTALL/usr/lib
|
||||
|
@ -1 +1 @@
|
||||
http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.82.tar.gz
|
||||
http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.86.tar.gz
|
||||
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
|
||||
cd $PKG_BUILD/gettext-runtime
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--with-included-gettext \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--disable-dependency-tracking \
|
||||
--disable-java \
|
||||
--disable-native-java \
|
||||
--disable-libasprintf
|
||||
|
||||
make
|
||||
|
||||
$MAKEINSTALL
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/gettext-runtime/intl/.libs/libintl.so* $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/gettext-runtime/intl/charset.alias $INSTALL/usr/lib
|
@ -1,29 +0,0 @@
|
||||
diff -Naur gettext-0.17/gettext-runtime/gnulib-lib/mbchar.h gettext-0.17a/gettext-runtime/gnulib-lib/mbchar.h
|
||||
--- gettext-0.17/gettext-runtime/gnulib-lib/mbchar.h 2007-10-07 22:28:16.000000000 +0200
|
||||
+++ gettext-0.17a/gettext-runtime/gnulib-lib/mbchar.h 2009-05-17 10:09:49.000000000 +0200
|
||||
@@ -147,6 +147,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
+typedef unsigned int wint_t;
|
||||
+
|
||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||
<wchar.h>.
|
||||
BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
|
||||
diff -Naur gettext-0.17/gettext-runtime/gnulib-lib/wchar.in.h gettext-0.17a/gettext-runtime/gnulib-lib/wchar.in.h
|
||||
--- gettext-0.17/gettext-runtime/gnulib-lib/wchar.in.h 2007-10-04 00:23:31.000000000 +0200
|
||||
+++ gettext-0.17a/gettext-runtime/gnulib-lib/wchar.in.h 2009-05-17 10:15:26.000000000 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#if @HAVE_WCHAR_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
|
||||
-#endif
|
||||
+#else
|
||||
|
||||
#ifndef _GL_WCHAR_H
|
||||
#define _GL_WCHAR_H
|
||||
@@ -80,3 +80,4 @@
|
||||
|
||||
#endif /* _GL_WCHAR_H */
|
||||
#endif /* _GL_WCHAR_H */
|
||||
+#endif
|
@ -1 +0,0 @@
|
||||
http://mirrors.ircam.fr/pub/gnu/gnu/gettext/gettext-0.17.tar.gz
|
@ -3,7 +3,7 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build libiconv
|
||||
#$SCRIPTS/build libiconv
|
||||
$SCRIPTS/build zlib
|
||||
$SCRIPTS/build glib-host
|
||||
|
||||
@ -31,11 +31,12 @@ glib_cv_stack_grows='no' \
|
||||
--enable-regex \
|
||||
--with-gnu-ld \
|
||||
--with-threads=posix \
|
||||
--with-libiconv=gnu \
|
||||
--disable-man \
|
||||
--disable-rebuilds \
|
||||
--disable-gtk-doc \
|
||||
|
||||
# --with-libiconv=gnu \
|
||||
|
||||
make
|
||||
|
||||
$MAKEINSTALL
|
||||
|
@ -3,8 +3,8 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install zlib
|
||||
$SCRIPTS/install libiconv
|
||||
#$SCRIPTS/install libiconv
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -P `find $PKG_BUILD/.build-target/g{lib,module,object,thread,io} -name *.so*` $INSTALL/usr/lib
|
||||
rm -rf $INSTALL/usr/lib/libg{lib,module,object,thread,io}*.so*T
|
||||
rm -rf $INSTALL/usr/lib/libg{lib,module,object,thread,io}*.so*T
|
||||
|
@ -1 +1 @@
|
||||
http://sources.openelec.tv/svn/libdrm-20100318.tar.bz2
|
||||
http://dri.freedesktop.org/libdrm/libdrm-2.4.20.tar.bz2
|
||||
|
@ -58,10 +58,10 @@ case "$2" in
|
||||
$SCRIPTS/install plymouth-lite
|
||||
$SCRIPTS/install util-linux-ng
|
||||
|
||||
echo $TARGET_ARCH > $INSTALL/etc/arch
|
||||
echo "OpenELEC" > $INSTALL/etc/distribution
|
||||
echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch
|
||||
echo "$OPENELEC_VERSION" > $INSTALL/etc/version
|
||||
echo "OpenELEC.tv - Date of build: $BUILD_DATE Build: $BZR_BUILD" > $INSTALL/etc/openelec-release
|
||||
echo "OpenELEC.tv - Date of build: $BUILD_DATE Build: $BZR_BUILD" > $INSTALL/etc/lsb-release
|
||||
|
||||
# Network support
|
||||
[ "$NETWORK" = yes ] && $SCRIPTS/install network
|
||||
|
File diff suppressed because it is too large
Load Diff
84
packages/linux/patches/linux-2.6.33-hda_beep-0.1.diff
Normal file
84
packages/linux/patches/linux-2.6.33-hda_beep-0.1.diff
Normal file
@ -0,0 +1,84 @@
|
||||
diff -Naur linux-2.6.33.2/sound/pci/hda/hda_beep.c linux-2.6.33.2.patch/sound/pci/hda/hda_beep.c
|
||||
--- linux-2.6.33.2/sound/pci/hda/hda_beep.c 2010-04-02 01:02:33.000000000 +0200
|
||||
+++ linux-2.6.33.2.patch/sound/pci/hda/hda_beep.c 2010-04-09 03:19:43.846329981 +0200
|
||||
@@ -1,3 +1,5 @@
|
||||
+#define __NO_VERSION__
|
||||
+#include "adriver.h"
|
||||
/*
|
||||
* Digital Beep Input Interface for HD-audio codec
|
||||
*
|
||||
@@ -92,7 +94,11 @@
|
||||
static int snd_hda_beep_event(struct input_dev *dev, unsigned int type,
|
||||
unsigned int code, int hz)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
|
||||
+ struct hda_beep *beep = dev->private;
|
||||
+#else
|
||||
struct hda_beep *beep = input_get_drvdata(dev);
|
||||
+#endif
|
||||
|
||||
switch (code) {
|
||||
case SND_BELL:
|
||||
@@ -116,8 +122,13 @@
|
||||
static void snd_hda_do_detach(struct hda_beep *beep)
|
||||
{
|
||||
input_unregister_device(beep->dev);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)
|
||||
+ kfree(beep->dev);
|
||||
+#endif
|
||||
beep->dev = NULL;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
|
||||
cancel_work_sync(&beep->beep_work);
|
||||
+#endif
|
||||
/* turn off beep for sure */
|
||||
snd_hda_codec_write(beep->codec, beep->nid, 0,
|
||||
AC_VERB_SET_BEEP_CONTROL, 0);
|
||||
@@ -129,7 +140,11 @@
|
||||
struct hda_codec *codec = beep->codec;
|
||||
int err;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
|
||||
input_dev = input_allocate_device();
|
||||
+#else
|
||||
+ input_dev = kzalloc(sizeof(*input_dev), GFP_KERNEL);
|
||||
+#endif
|
||||
if (!input_dev) {
|
||||
printk(KERN_INFO "hda_beep: unable to allocate input device\n");
|
||||
return -ENOMEM;
|
||||
@@ -147,15 +162,26 @@
|
||||
input_dev->evbit[0] = BIT_MASK(EV_SND);
|
||||
input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
|
||||
input_dev->event = snd_hda_beep_event;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
|
||||
input_dev->dev.parent = &codec->bus->pci->dev;
|
||||
input_set_drvdata(input_dev, beep);
|
||||
+#else
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
|
||||
+ input_dev->cdev.dev = &codec->bus->pci->dev;
|
||||
+#endif
|
||||
+ input_dev->private = beep;
|
||||
+#endif /* 2.6.22 */
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
|
||||
err = input_register_device(input_dev);
|
||||
if (err < 0) {
|
||||
input_free_device(input_dev);
|
||||
printk(KERN_INFO "hda_beep: unable to register input device\n");
|
||||
return err;
|
||||
}
|
||||
+#else
|
||||
+ input_register_device(input_dev);
|
||||
+#endif
|
||||
beep->dev = input_dev;
|
||||
return 0;
|
||||
}
|
||||
@@ -255,7 +281,9 @@
|
||||
{
|
||||
struct hda_beep *beep = codec->beep;
|
||||
if (beep) {
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
|
||||
cancel_work_sync(&beep->register_work);
|
||||
+#endif
|
||||
cancel_delayed_work(&beep->unregister_work);
|
||||
if (beep->dev)
|
||||
snd_hda_do_detach(beep);
|
@ -1 +1 @@
|
||||
http://eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.1.tar.bz2
|
||||
http://eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.2.tar.bz2
|
@ -3,4 +3,4 @@
|
||||
. config/options
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/skin/Confluence
|
||||
cp -PR $PKG_BUILD/* $INSTALL/usr/share/xbmc/skin/Confluence
|
||||
cp -R $PKG_BUILD/* $INSTALL/usr/share/xbmc/skin/Confluence
|
||||
|
@ -1 +1 @@
|
||||
http://sources.openelec.tv/svn/xbmc-theme-Confluence-28910.tar.bz2
|
||||
http://sources.openelec.tv/svn/xbmc-theme-Confluence-29203.tar.bz2
|
||||
|
@ -66,6 +66,13 @@ else
|
||||
XBMC_VDPAU="--disable-vdpau"
|
||||
fi
|
||||
|
||||
if [ "$VAAPI" = yes ]; then
|
||||
$SCRIPTS/build libva
|
||||
XBMC_VAAPI="--enable-vaapi"
|
||||
else
|
||||
XBMC_VAAPI="--disable-vaapi"
|
||||
fi
|
||||
|
||||
if [ "$CRYSTALHD" = yes ]; then
|
||||
$SCRIPTS/build crystalhd
|
||||
XBMC_CRYSTALHD="--enable-crystalhd"
|
||||
@ -73,15 +80,6 @@ else
|
||||
XBMC_CRYSTALHD="--disable-crystalhd"
|
||||
fi
|
||||
|
||||
if [ "$FFMPEG" = external ]; then
|
||||
$SCRIPTS/build ffmpeg
|
||||
XBMC_FFMPEG="--enable-external-ffmpeg"
|
||||
else
|
||||
XBMC_FFMPEG="--disable-external-ffmpeg"
|
||||
fi
|
||||
|
||||
LDFLAGS="$LDFLAGS -lpython2.6"
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
cd xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss
|
||||
@ -117,8 +115,9 @@ cd -
|
||||
--enable-hal \
|
||||
--enable-webserver \
|
||||
$XBMC_VDPAU \
|
||||
$XBMC_VAAPI \
|
||||
$XBMC_CRYSTALHD \
|
||||
$XBMC_FFMPEG \
|
||||
--disable-external-ffmpeg \
|
||||
--disable-external-liba52 \
|
||||
--disable-external-libdts \
|
||||
--disable-external-libass \
|
||||
|
@ -16,7 +16,7 @@ $SCRIPTS/install libssh
|
||||
|
||||
$SCRIPTS/install dbus
|
||||
$SCRIPTS/install hal
|
||||
$SCRIPTS/install DeviceKit-disks
|
||||
$SCRIPTS/install udisks
|
||||
$SCRIPTS/install ConsoleKit
|
||||
|
||||
$SCRIPTS/install libXt
|
||||
@ -26,6 +26,7 @@ $SCRIPTS/install libXrandr
|
||||
|
||||
$SCRIPTS/install Mesa
|
||||
[ "$VDPAU" = yes ] && $SCRIPTS/install libvdpau
|
||||
[ "$VAAPI" = yes ] && $SCRIPTS/install libva
|
||||
[ "$CRYSTALHD" = yes ] && $SCRIPTS/install crystalhd
|
||||
$SCRIPTS/install glew
|
||||
$SCRIPTS/install fontconfig
|
||||
@ -52,7 +53,6 @@ $SCRIPTS/install flac
|
||||
$SCRIPTS/install wavpack
|
||||
$SCRIPTS/install libmpeg2
|
||||
# $SCRIPTS/install musepack
|
||||
[ "$FFMPEG" = external ] && $SCRIPTS/install ffmpeg
|
||||
|
||||
$SCRIPTS/install SDL
|
||||
$SCRIPTS/install SDL_mixer
|
||||
@ -64,23 +64,25 @@ $SCRIPTS/install mysql
|
||||
$SCRIPTS/install samba
|
||||
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`"
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -PR $PKG_DIR/scripts/xbmc-session $INSTALL/usr/bin
|
||||
cp -P $PKG_DIR/scripts/xbmc-session $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc
|
||||
cp -PR $PKG_BUILD/xbmc.bin $INSTALL/usr/share/xbmc
|
||||
cp -PR $PKG_BUILD/xbmc-xrandr $INSTALL/usr/share/xbmc
|
||||
cp -P $PKG_BUILD/xbmc.bin $INSTALL/usr/share/xbmc
|
||||
cp -P $PKG_BUILD/xbmc-xrandr $INSTALL/usr/share/xbmc
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/language
|
||||
cp -PR $PKG_BUILD/language/* $INSTALL/usr/share/xbmc/language
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/media/Fonts
|
||||
cp -PR $PKG_BUILD/media/Fonts/*.ttf $INSTALL/usr/share/xbmc/media/Fonts
|
||||
cp -P $PKG_BUILD/media/Fonts/*.ttf $INSTALL/usr/share/xbmc/media/Fonts
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/media
|
||||
cp -PR $PKG_BUILD/media/weather.zip $INSTALL/usr/share/xbmc/media/
|
||||
cp -PR $PKG_BUILD/media/icon.png $INSTALL/usr/share/xbmc/media/
|
||||
cp -P $PKG_BUILD/media/weather.zip $INSTALL/usr/share/xbmc/media/
|
||||
cp -P $PKG_BUILD/media/icon.png $INSTALL/usr/share/xbmc/media/
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/skin
|
||||
|
||||
@ -88,22 +90,22 @@ mkdir -p $INSTALL/usr/share/xbmc/sounds
|
||||
cp -PR $PKG_BUILD/sounds/* $INSTALL/usr/share/xbmc/sounds
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system
|
||||
cp -PR $PKG_BUILD/system/*linux.so $INSTALL/usr/share/xbmc/system
|
||||
cp -PR $PKG_BUILD/system/*.xml $INSTALL/usr/share/xbmc/system
|
||||
cp -PR $PKG_BUILD/system/*.conf $INSTALL/usr/share/xbmc/system
|
||||
cp -P $PKG_BUILD/system/*linux.so $INSTALL/usr/share/xbmc/system
|
||||
cp -P $PKG_BUILD/system/*.xml $INSTALL/usr/share/xbmc/system
|
||||
cp -P $PKG_BUILD/system/*.conf $INSTALL/usr/share/xbmc/system
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system/keymaps
|
||||
cp -PR $PKG_BUILD/system/keymaps/* $INSTALL/usr/share/xbmc/system/keymaps
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system/players/dvdplayer
|
||||
cp -PR $PKG_BUILD/system/players/dvdplayer/*.so $INSTALL/usr/share/xbmc/system/players/dvdplayer
|
||||
cp -P $PKG_BUILD/system/players/dvdplayer/*.so $INSTALL/usr/share/xbmc/system/players/dvdplayer
|
||||
cp -PR $PKG_BUILD/system/players/dvdplayer/etc $INSTALL/usr/share/xbmc/system/players/dvdplayer
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system/players/paplayer
|
||||
cp -PR $PKG_BUILD/system/players/paplayer/*.so $INSTALL/usr/share/xbmc/system/players/paplayer
|
||||
cp -P $PKG_BUILD/system/players/paplayer/*.so $INSTALL/usr/share/xbmc/system/players/paplayer
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system/python
|
||||
cp -PR $PKG_BUILD/system/python/*.so $INSTALL/usr/share/xbmc/system/python
|
||||
cp -P $PKG_BUILD/system/python/*.so $INSTALL/usr/share/xbmc/system/python
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system/scrapers
|
||||
cp -PR $PKG_BUILD/system/scrapers/* $INSTALL/usr/share/xbmc/system/scrapers
|
||||
@ -111,6 +113,9 @@ mkdir -p $INSTALL/usr/share/xbmc/system/scrapers
|
||||
mkdir -p $INSTALL/usr/share/xbmc/system/shaders
|
||||
cp -PR $PKG_BUILD/system/shaders/* $INSTALL/usr/share/xbmc/system/shaders
|
||||
|
||||
mkdir -p $PYTHON_LIBDIR/site-packages
|
||||
cp -PR $PKG_BUILD/tools/EventClients/lib/python/* $PYTHON_LIBDIR/site-packages
|
||||
|
||||
mkdir -p $INSTALL/usr/share/xbmc/userdata
|
||||
cp -PR $PKG_BUILD/userdata/* $INSTALL/usr/share/xbmc/userdata
|
||||
|
||||
@ -124,3 +129,5 @@ mkdir -p $INSTALL/usr/share/xbmc/addons
|
||||
# other programs needed to run
|
||||
$SCRIPTS/install alsa
|
||||
$SCRIPTS/install lirc
|
||||
|
||||
$SCRIPTS/install autoupdate
|
||||
|
@ -1,49 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 17:12:32.000000000 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 19:39:55.720627540 +0200
|
||||
@@ -10,6 +10,10 @@
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
+tolower(){
|
||||
+ echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
|
||||
+}
|
||||
+
|
||||
# General message strings
|
||||
configure_debug="ERROR: this is a configure debug statement"
|
||||
missing_library="Could not find a required library. Please see the README for your platform."
|
||||
@@ -88,6 +92,18 @@
|
||||
[use_debug=$enableval],
|
||||
[use_debug=yes])
|
||||
|
||||
+AC_ARG_WITH([arch],
|
||||
+ [AS_HELP_STRING([--with-arch],
|
||||
+ [build with given arch passing to internal ffmpeg (default is no, needed for crosscompiling)])],
|
||||
+ [use_arch=$withval],
|
||||
+ [use_arch=no])
|
||||
+
|
||||
+AC_ARG_WITH([cpu],
|
||||
+ [AS_HELP_STRING([--with-cpu],
|
||||
+ [build with given cpu passing to ffmpeg (default is no)])],
|
||||
+ [use_cpu=$withval],
|
||||
+ [use_cpu=no])
|
||||
+
|
||||
AC_ARG_ENABLE([optimizations],
|
||||
[AS_HELP_STRING([--enable-optimizations],
|
||||
[enable optimization (default is yes)])],
|
||||
@@ -791,6 +807,15 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+if test "$cross_compiling" = "yes"; then
|
||||
+ final_message="$final_message\n Crosscomp.:\tYes"
|
||||
+else
|
||||
+ final_message="$final_message\n Crosscomp.:\tNo"
|
||||
+fi
|
||||
+
|
||||
+final_message="$final_message\n target ARCH:\t$use_arch"
|
||||
+final_message="$final_message\n target CPU:\t$use_cpu"
|
||||
+
|
||||
if test "$use_optimizations" = "yes"; then
|
||||
final_message="$final_message\n Optimization:\tYes"
|
||||
CXXFLAGS="$CXXFLAGS -O2"
|
@ -1,14 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:08:22.992628860 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:09:49.166752941 +0200
|
||||
@@ -1171,7 +1171,9 @@
|
||||
cp pyconfig.h Include
|
||||
else
|
||||
./configure \
|
||||
- --enable-ipv6 \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
+ --disable-ipv6 \
|
||||
--enable-unicode=ucs4 \
|
||||
--without-cxx \
|
||||
--enable-shared \
|
@ -1,14 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:12:19.728751863 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:21:43.927662015 +0200
|
||||
@@ -1236,6 +1236,10 @@
|
||||
./configure \
|
||||
--disable-static \
|
||||
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
|
||||
+ `if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
|
||||
+ `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
|
||||
+ `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
|
||||
+ --target-os=$(tolower $(uname -s)) \
|
||||
--disable-muxers \
|
||||
--enable-muxer=spdif \
|
||||
--enable-muxer=adts \
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:24:56.419753331 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:25:57.248628460 +0200
|
||||
@@ -1275,6 +1275,8 @@
|
||||
--disable-win
|
||||
else
|
||||
./configure \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--disable-oss \
|
||||
--disable-solaris-audio \
|
||||
--disable-al-audio \
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:30:55.221751668 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:31:27.299751431 +0200
|
||||
@@ -1294,6 +1294,8 @@
|
||||
--with-pic
|
||||
else
|
||||
./configure \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--disable-doc \
|
||||
--enable-static \
|
||||
--with-pic
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:35:03.335660103 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:36:09.419753169 +0200
|
||||
@@ -1316,6 +1316,8 @@
|
||||
./configure2 \
|
||||
--extra-cflags="$CFLAGS $DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../libdvdcss/src" \
|
||||
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-strip \
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:39:54.548661415 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:40:31.570753522 +0200
|
||||
@@ -1344,6 +1344,8 @@
|
||||
--extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../includes" \
|
||||
--extra-ldflags="-L`pwd`/../libdvdread/obj" \
|
||||
--with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--cc="$CC"
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:43:26.857628415 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:44:02.530754199 +0200
|
||||
@@ -1375,6 +1375,8 @@
|
||||
--disable-al-audio
|
||||
else
|
||||
./configure \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--with-pic \
|
||||
--disable-static \
|
||||
--enable-shared \
|
@ -1,14 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:46:17.449635092 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:46:54.862753477 +0200
|
||||
@@ -1412,7 +1412,9 @@
|
||||
./configure MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
else
|
||||
CFLAGS="$CFLAGS -fPIC" \
|
||||
- ./configure
|
||||
+ ./configure \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias
|
||||
fi
|
||||
], [$USE_EXTERNAL_LIBASS])
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:47:39.398628679 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:48:18.635753312 +0200
|
||||
@@ -1432,6 +1432,8 @@
|
||||
CFLAGS="$CFLAGS -fPIC" \
|
||||
CXXFLAGS="$CXXFLAGS -fPIC" \
|
||||
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--disable-static \
|
||||
--with-pic
|
||||
fi
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:48:58.963753796 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:49:38.035627532 +0200
|
||||
@@ -1460,6 +1460,8 @@
|
||||
CFLAGS="$CFLAGS -fPIC" \
|
||||
CXXFLAGS="$CXXFLAGS -fPIC" \
|
||||
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-pic
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:50:17.774753500 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:50:47.902628564 +0200
|
||||
@@ -1492,6 +1492,8 @@
|
||||
CFLAGS="$CFLAGS -fPIC" \
|
||||
CXXFLAGS="$CXXFLAGS -fPIC" \
|
||||
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias \
|
||||
--without-xscreensaver \
|
||||
--disable-sound \
|
||||
--disable-cyclone \
|
@ -1,17 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:51:28.016629554 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:52:26.372628570 +0200
|
||||
@@ -1509,9 +1509,11 @@
|
||||
|
||||
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libbdnav/], [
|
||||
if test "$host_vendor" = "apple" ; then
|
||||
- ./configure --with-ssl-dir=/opt/local/include
|
||||
+ ./configure --with-ssl-dir=/opt/local/include
|
||||
else
|
||||
- ./configure --without-openssl
|
||||
+ ./configure --without-openssl \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias
|
||||
fi
|
||||
], [0])
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:53:11.478628728 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:53:46.132627622 +0200
|
||||
@@ -1522,7 +1522,9 @@
|
||||
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -fno-common" \
|
||||
./configure MACOSX_DEPLOYMENT_TARGET=10.4 --disable-shared
|
||||
else
|
||||
- ./configure
|
||||
+ ./configure \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias
|
||||
fi
|
||||
], [0])
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
|
||||
--- xbmc-28910/configure.in 2010-03-28 18:54:17.023663284 +0200
|
||||
+++ xbmc-28910.patch/configure.in 2010-03-28 18:55:01.867627572 +0200
|
||||
@@ -1552,7 +1552,9 @@
|
||||
if test "$host_vendor" = "apple" ; then
|
||||
./configure --disable-nls --with-libiconv-prefix=/opt/local --with-libintl-prefix=/opt/local --without-readline
|
||||
else
|
||||
- ./configure --disable-nls
|
||||
+ ./configure --disable-nls \
|
||||
+ --host=$host_alias \
|
||||
+ --build=$build_alias
|
||||
fi
|
||||
], [0])
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
XBMC_ARGS="--standalone -fs --lircdev $LIRC_OUTPUT"
|
||||
XBMC_ARGS="--standalone -fs --lircdev /dev/lircd"
|
||||
|
||||
if test "$XBMC_CACHING" = "yes" ; then
|
||||
wait_for_xbmc_cache
|
||||
@ -11,11 +11,9 @@ else
|
||||
XBMC_BIN="/usr/share/xbmc/xbmc.bin"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
[ -f /usr/bin/autoupdate ] && /usr/bin/autoupdate &
|
||||
|
||||
if [ "$START_WM" = "yes" ]; then
|
||||
$WINDOWMANAGER &
|
||||
fi
|
||||
while true; do
|
||||
|
||||
$IONICE $XBMC_BIN $XBMC_ARGS $@ > /dev/null 2>&1
|
||||
RET=$?
|
||||
|
@ -1 +1 @@
|
||||
http://sources.openelec.tv/svn/xbmc-28910.tar.bz2
|
||||
http://sources.openelec.tv/svn/xbmc-29203.tar.bz2
|
||||
|
@ -1,95 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build faad2
|
||||
$SCRIPTS/build zlib
|
||||
|
||||
if [ "$VDPAU" = yes ]; then
|
||||
$SCRIPTS/build libvdpau
|
||||
FFMPEG_VDPAU="--enable-vdpau"
|
||||
else
|
||||
FFMPEG_VDPAU="--disable-vdpau"
|
||||
fi
|
||||
|
||||
if [ "$VAAPI" = yes ]; then
|
||||
$SCRIPTS/build libva
|
||||
FFMPEG_VAAPI="--enable-vaapi"
|
||||
else
|
||||
FFMPEG_VAAPI="--disable-vaapi"
|
||||
fi
|
||||
|
||||
cd $PKG_BUILD/
|
||||
./configure --prefix=/usr \
|
||||
--cpu=$TARGET_CPU \
|
||||
--arch=$TARGET_ARCH \
|
||||
--enable-cross-compile \
|
||||
--cross-prefix=$TARGET_PREFIX \
|
||||
--sysroot=$SYSROOT_PREFIX \
|
||||
--extra-cflags="$CFLAGS" \
|
||||
--disable-debug \
|
||||
--enable-stripping \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--enable-gpl \
|
||||
--enable-yasm \
|
||||
--disable-ffplay \
|
||||
--disable-ffserver \
|
||||
--disable-ffmpeg \
|
||||
--enable-postproc \
|
||||
--disable-avfilter \
|
||||
--disable-avfilter-lavf \
|
||||
--enable-pthreads \
|
||||
--disable-x11grab \
|
||||
--disable-ipv6 \
|
||||
--disable-mpegaudio-hp \
|
||||
--disable-gray \
|
||||
--enable-swscale-alpha \
|
||||
--enable-fastdiv \
|
||||
--enable-small \
|
||||
--enable-aandct \
|
||||
--enable-fft \
|
||||
--enable-golomb \
|
||||
--enable-mdct \
|
||||
--enable-rdft \
|
||||
$FFMPEG_VAAPI \
|
||||
$FFMPEG_VDPAU \
|
||||
--disable-encoders \
|
||||
--enable-decoders \
|
||||
--disable-decoder=mpeg_xvmc \
|
||||
--disable-muxers \
|
||||
--enable-demuxers \
|
||||
--enable-parsers \
|
||||
--enable-bsfs \
|
||||
--enable-protocols \
|
||||
--enable-protocol=http \
|
||||
--disable-indevs \
|
||||
--disable-outdevs \
|
||||
--disable-devices \
|
||||
--enable-filters \
|
||||
--disable-avisynth \
|
||||
--disable-bzlib \
|
||||
--disable-libopencore-amrnb \
|
||||
--disable-libopencore-amrwb \
|
||||
--disable-libdc1394 \
|
||||
--disable-libdirac \
|
||||
--disable-libfaac \
|
||||
--enable-libfaad \
|
||||
--disable-libfaadbin \
|
||||
--disable-libgsm \
|
||||
--disable-libmp3lame \
|
||||
--disable-libnut \
|
||||
--disable-libopenjpeg \
|
||||
--disable-libschroedinger \
|
||||
--disable-libspeex \
|
||||
--disable-libtheora \
|
||||
--disable-libvorbis \
|
||||
--disable-libx264 \
|
||||
--disable-libxvid \
|
||||
--disable-mlib \
|
||||
--enable-zlib \
|
||||
|
||||
make
|
||||
|
||||
$MAKEINSTALL
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install zlib
|
||||
$SCRIPTS/install faad2
|
||||
[ "$VAAPI" = yes ] && $SCRIPTS/install libva
|
||||
[ "$VDPAU" = yes ] && $SCRIPTS/install libvdpau
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/libavcodec/libavcodec.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/libavformat/libavformat.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/libavutil/libavutil.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/libswscale/libswscale.so.* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/libpostproc/libpostproc.so.* $INSTALL/usr/lib
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
||||
diff -Naur ffmpeg-21029.30224-old/libavcodec/Makefile ffmpeg-21029.30224-new/libavcodec/Makefile
|
||||
--- ffmpeg-21029.30224-old/libavcodec/Makefile 2010-01-04 22:46:31.000000000 -0800
|
||||
+++ ffmpeg-21029.30224-new/libavcodec/Makefile 2010-01-05 15:22:26.000000000 -0800
|
||||
@@ -3,7 +3,7 @@
|
||||
NAME = avcodec
|
||||
FFLIBS = avutil
|
||||
|
||||
-HEADERS = avcodec.h opt.h vdpau.h xvmc.h
|
||||
+HEADERS = avcodec.h opt.h vaapi.h vdpau.h xvmc.h
|
||||
|
||||
OBJS = allcodecs.o \
|
||||
audioconvert.o \
|
@ -1 +0,0 @@
|
||||
http://sources.openelec.tv/svn/ffmpeg-21030.tar.bz2
|
@ -10,6 +10,8 @@ $SCRIPTS/build libdrm
|
||||
$SCRIPTS/build Mesa
|
||||
|
||||
cd $PKG_BUILD
|
||||
libtoolize
|
||||
autoreconf
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
|
@ -9,7 +9,8 @@ $SCRIPTS/install libdrm
|
||||
$SCRIPTS/install Mesa
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/src/.libs/*.so*[.0-9] $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/va/.libs/libva*.so* $INSTALL/usr/lib
|
||||
rm -rf $INSTALL/usr/lib/libva-*.so*T
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/va
|
||||
# cp -PR $PKG_BUILD/dummy_drv_video/.libs/*.so $INSTALL/usr/lib/va
|
||||
|
7
packages/multimedia/libva/patches/000_README
Normal file
7
packages/multimedia/libva/patches/000_README
Normal file
@ -0,0 +1,7 @@
|
||||
SDS patches organisation
|
||||
------------------------
|
||||
|
||||
0xx - Patches from upstream sources
|
||||
1xx - Patches that are trivial or fix bugs brought by upstream
|
||||
2xx - Patches that relate to build system and driver detection
|
||||
3xx - Patches that provide API extensions to upstream
|
@ -0,0 +1,19 @@
|
||||
commit d6e726b80766c669dffe846fcd31fcfe5dc89847
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 12:13:41 2009 +0000
|
||||
|
||||
[G45] Fix subpictures formats array terminator.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 6a60ecc..e476ca2 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -76,7 +76,7 @@ static const i965_subpic_format_map_t *
|
||||
get_subpic_format(const VAImageFormat *va_format)
|
||||
{
|
||||
unsigned int i;
|
||||
- for (i = 0; i < sizeof(i965_subpic_formats_map)/sizeof(i965_subpic_formats_map[0]); i++) {
|
||||
+ for (i = 0; i965_subpic_formats_map[i].type != 0; i++) {
|
||||
const i965_subpic_format_map_t * const m = &i965_subpic_formats_map[i];
|
||||
if (m->va_format.fourcc == va_format->fourcc &&
|
||||
(m->type == I965_SURFACETYPE_RGBA ?
|
103
packages/multimedia/libva/patches/033_g45_add_rgba_subpic.diff
Normal file
103
packages/multimedia/libva/patches/033_g45_add_rgba_subpic.diff
Normal file
@ -0,0 +1,103 @@
|
||||
commit 98edda85a2d734763a5f40478a063d3e289e1389
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 10:56:54 2009 +0000
|
||||
|
||||
[G45] Add RGBA subpictures.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index e476ca2..637e304 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -70,6 +70,14 @@ i965_subpic_formats_map[I965_MAX_SUBPIC_FORMATS + 1] = {
|
||||
{ I965_SURFACETYPE_INDEXED, I965_SURFACEFORMAT_A4P4_UNORM,
|
||||
{ VA_FOURCC('A','I','4','4'), VA_MSB_FIRST, 8, },
|
||||
0 },
|
||||
+ { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_B8G8R8A8_UNORM,
|
||||
+ { VA_FOURCC('B','G','R','A'), VA_LSB_FIRST, 32,
|
||||
+ 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 },
|
||||
+ 0 },
|
||||
+ { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_R8G8B8A8_UNORM,
|
||||
+ { VA_FOURCC('R','G','B','A'), VA_LSB_FIRST, 32,
|
||||
+ 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 },
|
||||
+ 0 },
|
||||
};
|
||||
|
||||
static const i965_subpic_format_map_t *
|
||||
@@ -467,6 +475,7 @@ i965_CreateSubpicture(VADriverContextP ctx,
|
||||
obj_subpic->format = m->format;
|
||||
obj_subpic->width = obj_image->image.width;
|
||||
obj_subpic->height = obj_image->image.height;
|
||||
+ obj_subpic->pitch = obj_image->image.pitches[0];
|
||||
obj_subpic->bo = obj_image->bo;
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1218,6 +1227,15 @@ i965_CreateImage(VADriverContextP ctx,
|
||||
image->component_order[1] = 'G';
|
||||
image->component_order[2] = 'B';
|
||||
break;
|
||||
+ case VA_FOURCC('A','R','G','B'):
|
||||
+ case VA_FOURCC('A','B','G','R'):
|
||||
+ case VA_FOURCC('B','G','R','A'):
|
||||
+ case VA_FOURCC('R','G','B','A'):
|
||||
+ image->num_planes = 1;
|
||||
+ image->pitches[0] = width * 4;
|
||||
+ image->offsets[0] = 0;
|
||||
+ image->data_size = image->offsets[0] + image->pitches[0] * height;
|
||||
+ break;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
|
||||
index fa09869..2f538c2 100644
|
||||
--- a/i965_drv_video/i965_drv_video.h
|
||||
+++ b/i965_drv_video/i965_drv_video.h
|
||||
@@ -44,7 +44,7 @@
|
||||
#define I965_MAX_ENTRYPOINTS 5
|
||||
#define I965_MAX_CONFIG_ATTRIBUTES 10
|
||||
#define I965_MAX_IMAGE_FORMATS 10
|
||||
-#define I965_MAX_SUBPIC_FORMATS 2
|
||||
+#define I965_MAX_SUBPIC_FORMATS 4
|
||||
#define I965_MAX_DISPLAY_ATTRIBUTES 4
|
||||
#define I965_STR_VENDOR "i965 Driver 0.1"
|
||||
|
||||
@@ -126,6 +126,7 @@ struct object_subpic
|
||||
unsigned int format;
|
||||
int width;
|
||||
int height;
|
||||
+ int pitch;
|
||||
dri_bo *bo;
|
||||
};
|
||||
|
||||
diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
|
||||
index 4a4f041..c738d22 100644
|
||||
--- a/i965_drv_video/i965_render.c
|
||||
+++ b/i965_drv_video/i965_render.c
|
||||
@@ -587,7 +587,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
|
||||
int index,
|
||||
dri_bo *region,
|
||||
unsigned long offset,
|
||||
- int w, int h, int format)
|
||||
+ int w, int h, int p, int format)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct i965_render_state *render_state = &i965->render_state;
|
||||
@@ -621,7 +621,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
|
||||
ss->ss2.mip_count = 0;
|
||||
ss->ss2.render_target_rotation = 0;
|
||||
|
||||
- ss->ss3.pitch = w - 1;
|
||||
+ ss->ss3.pitch = p - 1;
|
||||
|
||||
dri_bo_emit_reloc(ss_bo,
|
||||
I915_GEM_DOMAIN_SAMPLER, 0,
|
||||
@@ -679,8 +679,8 @@ i965_subpic_render_src_surfaces_state(VADriverContextP ctx,
|
||||
region = obj_surface->bo;
|
||||
subpic_region = obj_image->bo;
|
||||
/*subpicture surface*/
|
||||
- i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format);
|
||||
- i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format);
|
||||
+ i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format);
|
||||
+ i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format);
|
||||
}
|
||||
|
||||
static void
|
@ -0,0 +1,77 @@
|
||||
commit ff263433c32aac08574b58b26f3f4be7abe05bdf
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 13:23:40 2009 +0000
|
||||
|
||||
[G45] Don't return VA_STATUS_SUCCESS for unimplemented functions.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 637e304..9e8502a 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -496,7 +496,8 @@ i965_SetSubpictureImage(VADriverContextP ctx,
|
||||
VASubpictureID subpicture,
|
||||
VAImageID image)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -506,7 +507,8 @@ i965_SetSubpictureChromakey(VADriverContextP ctx,
|
||||
unsigned int chromakey_max,
|
||||
unsigned int chromakey_mask)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -514,7 +516,8 @@ i965_SetSubpictureGlobalAlpha(VADriverContextP ctx,
|
||||
VASubpictureID subpicture,
|
||||
float global_alpha)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -1103,7 +1106,7 @@ i965_GetDisplayAttributes(VADriverContextP ctx,
|
||||
int num_attributes)
|
||||
{
|
||||
/* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1118,7 +1121,7 @@ i965_SetDisplayAttributes(VADriverContextP ctx,
|
||||
int num_attributes)
|
||||
{
|
||||
/* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -1128,7 +1131,7 @@ i965_DbgCopySurfaceToBuffer(VADriverContextP ctx,
|
||||
unsigned int *stride) /* out */
|
||||
{
|
||||
/* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
static VAStatus
|
||||
@@ -1270,7 +1273,8 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
VAImage *image) /* out */
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
static void
|
@ -0,0 +1,95 @@
|
||||
commit c5cb995d6cd49f5f2988b1721cb6b5da8a9b2c09
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 13:01:44 2009 +0000
|
||||
|
||||
[G45] Add YV12 image format.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 9e8502a..6488570 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -54,6 +54,36 @@ enum {
|
||||
I965_SURFACETYPE_INDEXED
|
||||
};
|
||||
|
||||
+/* List of supported image formats */
|
||||
+typedef struct {
|
||||
+ unsigned int type;
|
||||
+ VAImageFormat va_format;
|
||||
+} i965_image_format_map_t;
|
||||
+
|
||||
+static const i965_image_format_map_t
|
||||
+i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
|
||||
+ { I965_SURFACETYPE_YUV,
|
||||
+ { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
|
||||
+};
|
||||
+
|
||||
+static const i965_image_format_map_t *
|
||||
+get_image_format(const VAImageFormat *va_format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ for (i = 0; i965_image_formats_map[i].type != 0; i++) {
|
||||
+ const i965_image_format_map_t * const m = &i965_image_formats_map[i];
|
||||
+ if (m->va_format.fourcc == va_format->fourcc &&
|
||||
+ (m->type == I965_SURFACETYPE_RGBA ?
|
||||
+ (m->va_format.byte_order == va_format->byte_order &&
|
||||
+ m->va_format.red_mask == va_format->red_mask &&
|
||||
+ m->va_format.green_mask == va_format->green_mask &&
|
||||
+ m->va_format.blue_mask == va_format->blue_mask &&
|
||||
+ m->va_format.alpha_mask == va_format->alpha_mask) : 1))
|
||||
+ return m;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/* List of supported subpicture formats */
|
||||
typedef struct {
|
||||
unsigned int type;
|
||||
@@ -398,8 +428,16 @@ i965_QueryImageFormats(VADriverContextP ctx,
|
||||
VAImageFormat *format_list, /* out */
|
||||
int *num_formats) /* out */
|
||||
{
|
||||
+ int n;
|
||||
+
|
||||
+ for (n = 0; i965_image_formats_map[n].va_format.fourcc != 0; n++) {
|
||||
+ const i965_image_format_map_t * const m = &i965_image_formats_map[n];
|
||||
+ if (format_list)
|
||||
+ format_list[n] = m->va_format;
|
||||
+ }
|
||||
+
|
||||
if (num_formats)
|
||||
- *num_formats = 0;
|
||||
+ *num_formats = n;
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1239,6 +1277,16 @@ i965_CreateImage(VADriverContextP ctx,
|
||||
image->offsets[0] = 0;
|
||||
image->data_size = image->offsets[0] + image->pitches[0] * height;
|
||||
break;
|
||||
+ case VA_FOURCC('Y','V','1','2'):
|
||||
+ image->num_planes = 3;
|
||||
+ image->pitches[0] = width;
|
||||
+ image->offsets[0] = 0;
|
||||
+ image->pitches[1] = width2;
|
||||
+ image->offsets[1] = size + size2;
|
||||
+ image->pitches[2] = width2;
|
||||
+ image->offsets[2] = size;
|
||||
+ image->data_size = size + 2 * size2;
|
||||
+ break;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
|
||||
index 2f538c2..be253ed 100644
|
||||
--- a/i965_drv_video/i965_drv_video.h
|
||||
+++ b/i965_drv_video/i965_drv_video.h
|
||||
@@ -43,7 +43,7 @@
|
||||
#define I965_MAX_PROFILES 11
|
||||
#define I965_MAX_ENTRYPOINTS 5
|
||||
#define I965_MAX_CONFIG_ATTRIBUTES 10
|
||||
-#define I965_MAX_IMAGE_FORMATS 10
|
||||
+#define I965_MAX_IMAGE_FORMATS 1
|
||||
#define I965_MAX_SUBPIC_FORMATS 4
|
||||
#define I965_MAX_DISPLAY_ATTRIBUTES 4
|
||||
#define I965_STR_VENDOR "i965 Driver 0.1"
|
@ -0,0 +1,62 @@
|
||||
commit c833a4ef4efa20ab8df18d13bdab1e5c5e4671a8
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 13:16:34 2009 +0000
|
||||
|
||||
[G45] Implement vaGetImage() for full-sized surface readback.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index ebaf1ae..59ebdd7 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -1392,7 +1392,50 @@ i965_GetImage(VADriverContextP ctx,
|
||||
unsigned int height,
|
||||
VAImageID image)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
+ struct object_image *obj_image = IMAGE(image);
|
||||
+ if (!obj_image)
|
||||
+ return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
+
|
||||
+ /* XXX: we only support full-size surface readback */
|
||||
+ if (x != 0 ||
|
||||
+ y != 0 ||
|
||||
+ width != obj_surface->width ||
|
||||
+ height != obj_surface->height)
|
||||
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
|
||||
+
|
||||
+ /* XXX: we only support 1:1 image copies */
|
||||
+ if (width != obj_image->image.width ||
|
||||
+ height != obj_image->image.height)
|
||||
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
|
||||
+
|
||||
+ VAStatus va_status;
|
||||
+ void *image_data = NULL;
|
||||
+
|
||||
+ va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data);
|
||||
+ if (va_status != VA_STATUS_SUCCESS)
|
||||
+ return va_status;
|
||||
+
|
||||
+ dri_bo_map(obj_surface->bo, 0);
|
||||
+
|
||||
+ switch (obj_image->image.format.fourcc) {
|
||||
+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
|
||||
+ memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
|
||||
+ break;
|
||||
+ default:
|
||||
+ va_status = VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_unmap(obj_surface->bo);
|
||||
+
|
||||
+ i965_UnmapBuffer(ctx, obj_image->image.buf);
|
||||
+ return va_status;
|
||||
}
|
||||
|
||||
VAStatus
|
102
packages/multimedia/libva/patches/037_g45_add_vaPutImage.diff
Normal file
102
packages/multimedia/libva/patches/037_g45_add_vaPutImage.diff
Normal file
@ -0,0 +1,102 @@
|
||||
commit c00ac73b0fa1f5c4ff9cdc76b7556c5db03c5335
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 13:36:39 2009 +0000
|
||||
|
||||
[G45] Implement vaPutImage() for full-sized surface uploads.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 59ebdd7..5c15439 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -443,22 +443,6 @@ i965_QueryImageFormats(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus
|
||||
-i965_PutImage(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- VAImageID image,
|
||||
- int src_x,
|
||||
- int src_y,
|
||||
- unsigned int src_width,
|
||||
- unsigned int src_height,
|
||||
- int dest_x,
|
||||
- int dest_y,
|
||||
- unsigned int dest_width,
|
||||
- unsigned int dest_height)
|
||||
-{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
-}
|
||||
-
|
||||
-VAStatus
|
||||
i965_QuerySubpictureFormats(VADriverContextP ctx,
|
||||
VAImageFormat *format_list, /* out */
|
||||
unsigned int *flags, /* out */
|
||||
@@ -1439,6 +1423,68 @@ i965_GetImage(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus
|
||||
+i965_PutImage(VADriverContextP ctx,
|
||||
+ VASurfaceID surface,
|
||||
+ VAImageID image,
|
||||
+ int src_x,
|
||||
+ int src_y,
|
||||
+ unsigned int src_width,
|
||||
+ unsigned int src_height,
|
||||
+ int dest_x,
|
||||
+ int dest_y,
|
||||
+ unsigned int dest_width,
|
||||
+ unsigned int dest_height)
|
||||
+{
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
+ struct object_image *obj_image = IMAGE(image);
|
||||
+ if (!obj_image)
|
||||
+ return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
+
|
||||
+ /* XXX: we don't support partial video surface updates */
|
||||
+ if (src_x != 0 ||
|
||||
+ src_y != 0 ||
|
||||
+ src_width != obj_image->image.width ||
|
||||
+ src_height != obj_image->image.height)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ if (dest_x != 0 ||
|
||||
+ dest_y != 0 ||
|
||||
+ dest_width != obj_surface->width ||
|
||||
+ dest_height != obj_surface->height)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ if (src_width != dest_width ||
|
||||
+ src_height != dest_height)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+
|
||||
+ VAStatus va_status;
|
||||
+ void *image_data = NULL;
|
||||
+
|
||||
+ va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data);
|
||||
+ if (va_status != VA_STATUS_SUCCESS)
|
||||
+ return va_status;
|
||||
+
|
||||
+ dri_bo_map(obj_surface->bo, 1);
|
||||
+
|
||||
+ switch (obj_image->image.format.fourcc) {
|
||||
+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
|
||||
+ memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
|
||||
+ break;
|
||||
+ default:
|
||||
+ va_status = VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_unmap(obj_surface->bo);
|
||||
+
|
||||
+ i965_UnmapBuffer(ctx, obj_image->image.buf);
|
||||
+ return va_status;
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
i965_PutSurface(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
Drawable draw, /* X Drawable */
|
@ -0,0 +1,523 @@
|
||||
commit ab248483d89c6cf7beb7a3a87c9b9a55464023cc
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Nov 4 17:34:53 2009 +0000
|
||||
|
||||
[G45] Handle cliprects in vaPutSurface().
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 5c15439..d4ad6e1 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -1507,13 +1507,23 @@ i965_PutSurface(VADriverContextP ctx,
|
||||
union dri_buffer *buffer;
|
||||
struct intel_region *dest_region;
|
||||
struct object_surface *obj_surface;
|
||||
- int ret;
|
||||
+ int ret;
|
||||
uint32_t name;
|
||||
+ VARectangle src_rect, dst_rect;
|
||||
Bool new_region = False;
|
||||
+
|
||||
/* Currently don't support DRI1 */
|
||||
if (dri_state->driConnectedFlag != VA_DRI2)
|
||||
return VA_STATUS_ERROR_UNKNOWN;
|
||||
|
||||
+ /* XXX: we currently only support up to 64 cliprects */
|
||||
+ if (number_cliprects > MAX_CLIP_RECTS)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+
|
||||
+ obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
dri_drawable = dri_get_drawable(ctx, draw);
|
||||
assert(dri_drawable);
|
||||
|
||||
@@ -1552,17 +1562,24 @@ i965_PutSurface(VADriverContextP ctx,
|
||||
assert(ret == 0);
|
||||
}
|
||||
|
||||
- i965_render_put_surface(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- obj_surface = SURFACE(surface);
|
||||
- if(obj_surface->subpic != VA_INVALID_ID) {
|
||||
- i965_render_put_subpic(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- }
|
||||
- dri_swap_buffer(ctx, dri_drawable);
|
||||
+ src_rect.x = srcx;
|
||||
+ src_rect.y = srcy;
|
||||
+ src_rect.width = srcw;
|
||||
+ src_rect.height = srch;
|
||||
+
|
||||
+ dst_rect.x = destx;
|
||||
+ dst_rect.y = desty;
|
||||
+ dst_rect.width = destw;
|
||||
+ dst_rect.height = desth;
|
||||
|
||||
+ i965_render_put_surface(ctx, surface, &src_rect, &dst_rect,
|
||||
+ cliprects, number_cliprects);
|
||||
+
|
||||
+ if (obj_surface->subpic != VA_INVALID_ID)
|
||||
+ i965_render_put_subpic(ctx, surface, &src_rect, &dst_rect,
|
||||
+ cliprects, number_cliprects);
|
||||
+
|
||||
+ dri_swap_buffer(ctx, dri_drawable);
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
|
||||
index c738d22..301d51d 100644
|
||||
--- a/i965_drv_video/i965_render.c
|
||||
+++ b/i965_drv_video/i965_render.c
|
||||
@@ -788,13 +788,81 @@ i965_render_binding_table(VADriverContextP ctx)
|
||||
dri_bo_unmap(render_state->wm.binding_table);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static unsigned int
|
||||
+i965_render_do_upload_vertex(VADriverContextP ctx,
|
||||
+ unsigned int width,
|
||||
+ unsigned int height,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
+{
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+ struct i965_render_state *render_state = &i965->render_state;
|
||||
+ struct intel_region *dest_region = render_state->draw_region;
|
||||
+ float *vb, tx1, tx2, ty1, ty2;
|
||||
+ int x1, x2, y1, y2;
|
||||
+ unsigned int i, n;
|
||||
+
|
||||
+ if (!cliprects || num_cliprects == 0) {
|
||||
+ cliprects = dst_rect;
|
||||
+ num_cliprects = 1;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_map(render_state->vb.vertex_buffer, 1);
|
||||
+ assert(render_state->vb.vertex_buffer->virtual);
|
||||
+ vb = render_state->vb.vertex_buffer->virtual;
|
||||
+
|
||||
+ for (n = 0, i = 0; i < num_cliprects; i++) {
|
||||
+ x1 = dest_region->x + cliprects[i].x;
|
||||
+ y1 = dest_region->y + cliprects[i].y;
|
||||
+ x2 = x1 + cliprects[i].width;
|
||||
+ y2 = y1 + cliprects[i].height;
|
||||
+ x1 = MAX(x1, dst_rect->x);
|
||||
+ y1 = MAX(y1, dst_rect->y);
|
||||
+ x2 = MIN(x2, dst_rect->x + dst_rect->width);
|
||||
+ y2 = MIN(y2, dst_rect->y + dst_rect->height);
|
||||
+
|
||||
+ if (x2 <= x1 || y2 <= y1)
|
||||
+ continue;
|
||||
+
|
||||
+ const float sx1 = (float)(x1 - dst_rect->x) / (float)dst_rect->width;
|
||||
+ const float sy1 = (float)(y1 - dst_rect->y) / (float)dst_rect->height;
|
||||
+ const float sx2 = (float)(x2 - dst_rect->x) / (float)dst_rect->width;
|
||||
+ const float sy2 = (float)(y2 - dst_rect->y) / (float)dst_rect->height;
|
||||
+ tx1 = ((float)src_rect->x + sx1 * (float)src_rect->width) / width;
|
||||
+ ty1 = ((float)src_rect->y + sy1 * (float)src_rect->height) / height;
|
||||
+ tx2 = ((float)src_rect->x + sx2 * (float)src_rect->width) / width;
|
||||
+ ty2 = ((float)src_rect->y + sy2 * (float)src_rect->height) / height;
|
||||
+
|
||||
+ vb[n++] = tx2;
|
||||
+ vb[n++] = ty2;
|
||||
+ vb[n++] = x2;
|
||||
+ vb[n++] = y2;
|
||||
+
|
||||
+ vb[n++] = tx1;
|
||||
+ vb[n++] = ty2;
|
||||
+ vb[n++] = x1;
|
||||
+ vb[n++] = y2;
|
||||
+
|
||||
+ vb[n++] = tx1;
|
||||
+ vb[n++] = ty1;
|
||||
+ vb[n++] = x1;
|
||||
+ vb[n++] = y1;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_unmap(render_state->vb.vertex_buffer);
|
||||
+ return n / 12;
|
||||
+}
|
||||
+
|
||||
+static unsigned int
|
||||
i965_subpic_render_upload_vertex(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- const VARectangle *output_rect)
|
||||
-{
|
||||
+ const VARectangle *output_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
+{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
- struct i965_render_state *render_state = &i965->render_state;
|
||||
struct object_surface *obj_surface = SURFACE(surface);
|
||||
struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
|
||||
|
||||
@@ -804,8 +872,6 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
|
||||
const float ssy = (float)output_rect->height / (float)obj_surface->height;
|
||||
const float sx = psx * ssx;
|
||||
const float sy = psy * ssy;
|
||||
- float *vb, tx1, tx2, ty1, ty2, x1, x2, y1, y2;
|
||||
- int i = 0;
|
||||
|
||||
VARectangle dst_rect;
|
||||
dst_rect.x = output_rect->x + sx * (float)obj_subpic->dst_rect.x;
|
||||
@@ -813,106 +879,38 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
|
||||
dst_rect.width = sx * (float)obj_subpic->dst_rect.width;
|
||||
dst_rect.height = sy * (float)obj_subpic->dst_rect.height;
|
||||
|
||||
- dri_bo_map(render_state->vb.vertex_buffer, 1);
|
||||
- assert(render_state->vb.vertex_buffer->virtual);
|
||||
- vb = render_state->vb.vertex_buffer->virtual;
|
||||
-
|
||||
- tx1 = (float)obj_subpic->src_rect.x / (float)obj_subpic->width;
|
||||
- ty1 = (float)obj_subpic->src_rect.y / (float)obj_subpic->height;
|
||||
- tx2 = (float)(obj_subpic->src_rect.x + obj_subpic->src_rect.width) / (float)obj_subpic->width;
|
||||
- ty2 = (float)(obj_subpic->src_rect.y + obj_subpic->src_rect.height) / (float)obj_subpic->height;
|
||||
-
|
||||
- x1 = (float)dst_rect.x;
|
||||
- y1 = (float)dst_rect.y;
|
||||
- x2 = (float)(dst_rect.x + dst_rect.width);
|
||||
- y2 = (float)(dst_rect.y + dst_rect.height);
|
||||
-
|
||||
- vb[i++] = tx2;
|
||||
- vb[i++] = ty2;
|
||||
- vb[i++] = x2;
|
||||
- vb[i++] = y2;
|
||||
-
|
||||
- vb[i++] = tx1;
|
||||
- vb[i++] = ty2;
|
||||
- vb[i++] = x1;
|
||||
- vb[i++] = y2;
|
||||
-
|
||||
- vb[i++] = tx1;
|
||||
- vb[i++] = ty1;
|
||||
- vb[i++] = x1;
|
||||
- vb[i++] = y1;
|
||||
- dri_bo_unmap(render_state->vb.vertex_buffer);
|
||||
+ return i965_render_do_upload_vertex(ctx,
|
||||
+ obj_subpic->width, obj_subpic->height,
|
||||
+ &obj_subpic->src_rect, &dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static unsigned int
|
||||
i965_render_upload_vertex(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
- struct i965_render_state *render_state = &i965->render_state;
|
||||
- struct intel_region *dest_region = render_state->draw_region;
|
||||
- struct object_surface *obj_surface;
|
||||
- float *vb;
|
||||
-
|
||||
- float u1, v1, u2, v2;
|
||||
- int i, width, height;
|
||||
- int box_x1 = dest_region->x + destx;
|
||||
- int box_y1 = dest_region->y + desty;
|
||||
- int box_x2 = box_x1 + destw;
|
||||
- int box_y2 = box_y1 + desth;
|
||||
-
|
||||
- obj_surface = SURFACE(surface);
|
||||
- assert(surface);
|
||||
- width = obj_surface->width;
|
||||
- height = obj_surface->height;
|
||||
-
|
||||
- u1 = (float)srcx / width;
|
||||
- v1 = (float)srcy / height;
|
||||
- u2 = (float)(srcx + srcw) / width;
|
||||
- v2 = (float)(srcy + srch) / height;
|
||||
-
|
||||
- dri_bo_map(render_state->vb.vertex_buffer, 1);
|
||||
- assert(render_state->vb.vertex_buffer->virtual);
|
||||
- vb = render_state->vb.vertex_buffer->virtual;
|
||||
-
|
||||
- i = 0;
|
||||
- vb[i++] = u2;
|
||||
- vb[i++] = v2;
|
||||
- vb[i++] = (float)box_x2;
|
||||
- vb[i++] = (float)box_y2;
|
||||
-
|
||||
- vb[i++] = u1;
|
||||
- vb[i++] = v2;
|
||||
- vb[i++] = (float)box_x1;
|
||||
- vb[i++] = (float)box_y2;
|
||||
-
|
||||
- vb[i++] = u1;
|
||||
- vb[i++] = v1;
|
||||
- vb[i++] = (float)box_x1;
|
||||
- vb[i++] = (float)box_y1;
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ assert(obj_surface);
|
||||
|
||||
- dri_bo_unmap(render_state->vb.vertex_buffer);
|
||||
+ return i965_render_do_upload_vertex(ctx,
|
||||
+ obj_surface->width, obj_surface->height,
|
||||
+ src_rect,
|
||||
+ dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static unsigned int
|
||||
i965_surface_render_state_setup(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
i965_render_vs_unit(ctx);
|
||||
i965_render_sf_unit(ctx);
|
||||
@@ -923,21 +921,17 @@ i965_surface_render_state_setup(VADriverContextP ctx,
|
||||
i965_render_cc_viewport(ctx);
|
||||
i965_render_cc_unit(ctx);
|
||||
i965_render_binding_table(ctx);
|
||||
- i965_render_upload_vertex(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
+ return i965_render_upload_vertex(ctx, surface, src_rect, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
-static void
|
||||
+
|
||||
+static unsigned int
|
||||
i965_subpic_render_state_setup(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
i965_render_vs_unit(ctx);
|
||||
i965_render_sf_unit(ctx);
|
||||
@@ -948,16 +942,10 @@ i965_subpic_render_state_setup(VADriverContextP ctx,
|
||||
i965_render_cc_viewport(ctx);
|
||||
i965_subpic_render_cc_unit(ctx);
|
||||
i965_render_binding_table(ctx);
|
||||
-
|
||||
- VARectangle output_rect;
|
||||
- output_rect.x = destx;
|
||||
- output_rect.y = desty;
|
||||
- output_rect.width = destw;
|
||||
- output_rect.height = desth;
|
||||
- i965_subpic_render_upload_vertex(ctx, surface, &output_rect);
|
||||
+ return i965_subpic_render_upload_vertex(ctx, surface, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
|
||||
-
|
||||
static void
|
||||
i965_render_pipeline_select(VADriverContextP ctx)
|
||||
{
|
||||
@@ -1193,7 +1181,7 @@ i965_render_upload_image_palette(
|
||||
}
|
||||
|
||||
static void
|
||||
-i965_render_startup(VADriverContextP ctx)
|
||||
+i965_render_startup(VADriverContextP ctx, unsigned int vb_offset)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct i965_render_state *render_state = &i965->render_state;
|
||||
@@ -1204,7 +1192,7 @@ i965_render_startup(VADriverContextP ctx)
|
||||
(0 << VB0_BUFFER_INDEX_SHIFT) |
|
||||
VB0_VERTEXDATA |
|
||||
((4 * 4) << VB0_BUFFER_PITCH_SHIFT));
|
||||
- OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0);
|
||||
+ OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, vb_offset);
|
||||
|
||||
if (IS_IGDNG(i965->intel.device_id))
|
||||
OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 12 * 4);
|
||||
@@ -1269,8 +1257,10 @@ i965_clear_dest_region(VADriverContextP ctx)
|
||||
}
|
||||
|
||||
static void
|
||||
-i965_surface_render_pipeline_setup(VADriverContextP ctx)
|
||||
+i965_surface_render_pipeline_setup(VADriverContextP ctx, unsigned int n_rects)
|
||||
{
|
||||
+ unsigned int i;
|
||||
+
|
||||
intel_batchbuffer_start_atomic(ctx, 0x1000);
|
||||
intel_batchbuffer_emit_mi_flush(ctx);
|
||||
i965_clear_dest_region(ctx);
|
||||
@@ -1284,13 +1274,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx)
|
||||
i965_render_cs_urb_layout(ctx);
|
||||
i965_render_drawing_rectangle(ctx);
|
||||
i965_render_vertex_elements(ctx);
|
||||
- i965_render_startup(ctx);
|
||||
+ for (i = 0; i < n_rects; i++)
|
||||
+ i965_render_startup(ctx, 48 * i);
|
||||
intel_batchbuffer_end_atomic(ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
-i965_subpic_render_pipeline_setup(VADriverContextP ctx)
|
||||
+i965_subpic_render_pipeline_setup(VADriverContextP ctx, unsigned int n_rects)
|
||||
{
|
||||
+ unsigned int i;
|
||||
+
|
||||
intel_batchbuffer_start_atomic(ctx, 0x1000);
|
||||
intel_batchbuffer_emit_mi_flush(ctx);
|
||||
i965_render_pipeline_select(ctx);
|
||||
@@ -1303,7 +1296,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx)
|
||||
i965_render_cs_urb_layout(ctx);
|
||||
i965_render_drawing_rectangle(ctx);
|
||||
i965_render_vertex_elements(ctx);
|
||||
- i965_render_startup(ctx);
|
||||
+ for (i = 0; i < n_rects; i++)
|
||||
+ i965_render_startup(ctx, 48 * i);
|
||||
intel_batchbuffer_end_atomic(ctx);
|
||||
}
|
||||
|
||||
@@ -1397,45 +1391,39 @@ i965_render_initialize(VADriverContextP ctx)
|
||||
void
|
||||
i965_render_put_surface(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
+ unsigned int n_rects;
|
||||
+
|
||||
i965_render_initialize(ctx);
|
||||
- i965_surface_render_state_setup(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- i965_surface_render_pipeline_setup(ctx);
|
||||
+ n_rects = i965_surface_render_state_setup(ctx, surface,
|
||||
+ src_rect, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
+ i965_surface_render_pipeline_setup(ctx, n_rects);
|
||||
intel_batchbuffer_flush(ctx);
|
||||
}
|
||||
|
||||
void
|
||||
i965_render_put_subpic(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct object_surface *obj_surface = SURFACE(surface);
|
||||
struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
|
||||
+ unsigned int n_rects;
|
||||
assert(obj_subpic);
|
||||
|
||||
i965_render_initialize(ctx);
|
||||
- i965_subpic_render_state_setup(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- i965_subpic_render_pipeline_setup(ctx);
|
||||
+ n_rects = i965_subpic_render_state_setup(ctx, surface, src_rect, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
+ i965_subpic_render_pipeline_setup(ctx, n_rects);
|
||||
i965_render_upload_image_palette(ctx, obj_subpic->image, 0xff);
|
||||
intel_batchbuffer_flush(ctx);
|
||||
}
|
||||
diff --git a/i965_drv_video/i965_render.h b/i965_drv_video/i965_render.h
|
||||
index e3dce02..d2e23f1 100644
|
||||
--- a/i965_drv_video/i965_render.h
|
||||
+++ b/i965_drv_video/i965_render.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef _I965_RENDER_H_
|
||||
#define _I965_RENDER_H_
|
||||
|
||||
+#define MAX_CLIP_RECTS 80 /* vb_bo:4096 / vb:(3*4*4) */
|
||||
#define MAX_RENDER_SURFACES 16
|
||||
#define MAX_SAMPLERS 16
|
||||
|
||||
@@ -65,27 +66,20 @@ struct i965_render_state
|
||||
|
||||
Bool i965_render_init(VADriverContextP ctx);
|
||||
Bool i965_render_terminate(VADriverContextP ctx);
|
||||
+
|
||||
void i965_render_put_surface(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth);
|
||||
-
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects);
|
||||
|
||||
void
|
||||
i965_render_put_subpic(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth);
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects);
|
||||
+
|
||||
#endif /* _I965_RENDER_H_ */
|
305
packages/multimedia/libva/patches/039_g45_add_vaDeriveImage.diff
Normal file
305
packages/multimedia/libva/patches/039_g45_add_vaDeriveImage.diff
Normal file
@ -0,0 +1,305 @@
|
||||
commit 1eb1e3e56d3c7a83aea7361a02167d382619fea8
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Mon Mar 8 17:22:06 2010 +0100
|
||||
|
||||
[G45] Implement vaDeriveImage().
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index eb3b49d..98a824f 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -336,12 +336,27 @@ VAStatus i965_QueryConfigAttributes(VADriverContextP ctx,
|
||||
return vaStatus;
|
||||
}
|
||||
|
||||
+static struct object_image *
|
||||
+i965_CreateImage_impl(
|
||||
+ VADriverContextP ctx,
|
||||
+ const VAImageFormat *format,
|
||||
+ unsigned int width,
|
||||
+ unsigned int height,
|
||||
+ VASurfaceID surface
|
||||
+);
|
||||
+
|
||||
+static void
|
||||
+i965_DestroyImage_impl(
|
||||
+ VADriverContextP ctx,
|
||||
+ struct object_image *obj_image,
|
||||
+ int from_surface
|
||||
+);
|
||||
+
|
||||
static void
|
||||
i965_destroy_surface(struct object_heap *heap, struct object_base *obj)
|
||||
{
|
||||
struct object_surface *obj_surface = (struct object_surface *)obj;
|
||||
|
||||
- dri_bo_unreference(obj_surface->bo);
|
||||
obj_surface->bo = NULL;
|
||||
object_heap_free(heap, obj);
|
||||
}
|
||||
@@ -358,6 +373,13 @@ i965_CreateSurfaces(VADriverContextP ctx,
|
||||
int i;
|
||||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
|
||||
+ /* Internal format: linear I420 (compatible with YV12 VA image) */
|
||||
+ static const VAImageFormat vaFormat = {
|
||||
+ .fourcc = VA_FOURCC('Y','V','1','2'),
|
||||
+ .byte_order = VA_LSB_FIRST,
|
||||
+ .bits_per_pixel = 12
|
||||
+ };
|
||||
+
|
||||
/* We only support one format */
|
||||
if (VA_RT_FORMAT_YUV420 != format) {
|
||||
return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
|
||||
@@ -366,28 +388,36 @@ i965_CreateSurfaces(VADriverContextP ctx,
|
||||
for (i = 0; i < num_surfaces; i++) {
|
||||
int surfaceID = NEW_SURFACE_ID();
|
||||
struct object_surface *obj_surface = SURFACE(surfaceID);
|
||||
+ struct object_image *obj_image;
|
||||
+ struct object_buffer *obj_buffer;
|
||||
|
||||
if (NULL == obj_surface) {
|
||||
vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
break;
|
||||
}
|
||||
|
||||
+ obj_image = i965_CreateImage_impl(ctx, &vaFormat, width, height, surfaceID);
|
||||
+ if (!obj_image) {
|
||||
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ obj_buffer = BUFFER(obj_image->image.buf);
|
||||
+ if (!obj_buffer) {
|
||||
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
+ break;
|
||||
+ }
|
||||
+ assert(obj_buffer->buffer_store);
|
||||
+
|
||||
surfaces[i] = surfaceID;
|
||||
obj_surface->status = VASurfaceReady;
|
||||
obj_surface->subpic = VA_INVALID_ID;
|
||||
obj_surface->width = width;
|
||||
obj_surface->height = height;
|
||||
obj_surface->size = SIZE_YUV420(width, height);
|
||||
- obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr,
|
||||
- "vaapi surface",
|
||||
- obj_surface->size,
|
||||
- 64);
|
||||
-
|
||||
- assert(obj_surface->bo);
|
||||
- if (NULL == obj_surface->bo) {
|
||||
- vaStatus = VA_STATUS_ERROR_UNKNOWN;
|
||||
- break;
|
||||
- }
|
||||
+ obj_surface->image = obj_image->image;
|
||||
+ obj_surface->is_derived = 0;
|
||||
+ obj_surface->bo = obj_buffer->buffer_store->bo;
|
||||
}
|
||||
|
||||
/* Error recovery */
|
||||
@@ -417,6 +447,7 @@ i965_DestroySurfaces(VADriverContextP ctx,
|
||||
struct object_surface *obj_surface = SURFACE(surface_list[i]);
|
||||
|
||||
assert(obj_surface);
|
||||
+ i965_DestroyImage_impl(ctx, IMAGE(obj_surface->image.image_id), 1);
|
||||
i965_destroy_surface(&i965->surface_heap, (struct object_base *)obj_surface);
|
||||
}
|
||||
|
||||
@@ -1200,29 +1231,28 @@ i965_destroy_heap(struct object_heap *heap,
|
||||
VAStatus
|
||||
i965_DestroyImage(VADriverContextP ctx, VAImageID image);
|
||||
|
||||
-VAStatus
|
||||
-i965_CreateImage(VADriverContextP ctx,
|
||||
- VAImageFormat *format,
|
||||
- int width,
|
||||
- int height,
|
||||
- VAImage *out_image) /* out */
|
||||
+static struct object_image *
|
||||
+i965_CreateImage_impl(
|
||||
+ VADriverContextP ctx,
|
||||
+ const VAImageFormat *format,
|
||||
+ unsigned int width,
|
||||
+ unsigned int height,
|
||||
+ VASurfaceID surface
|
||||
+)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct object_image *obj_image;
|
||||
- VAStatus va_status = VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
VAImageID image_id;
|
||||
unsigned int width2, height2, size2, size;
|
||||
|
||||
- out_image->image_id = VA_INVALID_ID;
|
||||
- out_image->buf = VA_INVALID_ID;
|
||||
-
|
||||
image_id = NEW_IMAGE_ID();
|
||||
if (image_id == VA_INVALID_ID)
|
||||
- return VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
+ return NULL;
|
||||
|
||||
obj_image = IMAGE(image_id);
|
||||
if (!obj_image)
|
||||
- return VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
+ return NULL;
|
||||
+ obj_image->surface = surface;
|
||||
obj_image->bo = NULL;
|
||||
obj_image->palette = NULL;
|
||||
|
||||
@@ -1275,9 +1305,9 @@ i965_CreateImage(VADriverContextP ctx,
|
||||
goto error;
|
||||
}
|
||||
|
||||
- va_status = i965_CreateBuffer(ctx, 0, VAImageBufferType,
|
||||
- image->data_size, 1, NULL, &image->buf);
|
||||
- if (va_status != VA_STATUS_SUCCESS)
|
||||
+ if (i965_CreateBuffer(ctx, 0, VAImageBufferType,
|
||||
+ image->data_size, 1, NULL,
|
||||
+ &image->buf) != VA_STATUS_SUCCESS)
|
||||
goto error;
|
||||
|
||||
obj_image->bo = BUFFER(image->buf)->buffer_store->bo;
|
||||
@@ -1292,21 +1322,47 @@ i965_CreateImage(VADriverContextP ctx,
|
||||
image->format = *format;
|
||||
image->width = width;
|
||||
image->height = height;
|
||||
-
|
||||
- *out_image = *image;
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ return obj_image;
|
||||
|
||||
error:
|
||||
- i965_DestroyImage(ctx, image_id);
|
||||
- return va_status;
|
||||
+ i965_DestroyImage_impl(ctx, obj_image, 0);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+i965_CreateImage(VADriverContextP ctx,
|
||||
+ VAImageFormat *format,
|
||||
+ int width,
|
||||
+ int height,
|
||||
+ VAImage *out_image) /* out */
|
||||
+{
|
||||
+ struct object_image *obj_image;
|
||||
+
|
||||
+ obj_image = i965_CreateImage_impl(ctx, format, width, height, VA_INVALID_ID);
|
||||
+ if (!obj_image)
|
||||
+ return VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
+
|
||||
+ *out_image = obj_image->image;
|
||||
+ return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
VAStatus i965_DeriveImage(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
VAImage *image) /* out */
|
||||
{
|
||||
- /* TODO */
|
||||
- return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
+ struct object_image *obj_image = IMAGE(obj_surface->image.image_id);
|
||||
+ if (!obj_image)
|
||||
+ return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
+
|
||||
+ obj_surface->is_derived = 1;
|
||||
+ *image = obj_surface->image;
|
||||
+ return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1315,15 +1371,24 @@ i965_destroy_image(struct object_heap *heap, struct object_base *obj)
|
||||
object_heap_free(heap, obj);
|
||||
}
|
||||
|
||||
-
|
||||
-VAStatus
|
||||
-i965_DestroyImage(VADriverContextP ctx, VAImageID image)
|
||||
+static void
|
||||
+i965_DestroyImage_impl(
|
||||
+ VADriverContextP ctx,
|
||||
+ struct object_image *obj_image,
|
||||
+ int from_surface
|
||||
+)
|
||||
{
|
||||
- struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
- struct object_image *obj_image = IMAGE(image);
|
||||
+ struct i965_driver_data * const i965 = i965_driver_data(ctx);
|
||||
|
||||
if (!obj_image)
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ return;
|
||||
+
|
||||
+ if (!from_surface && obj_image->surface != VA_INVALID_ID) {
|
||||
+ /* only destroy when called from vaDestroySurfaces() */
|
||||
+ struct object_surface *obj_surface = SURFACE(obj_image->surface);
|
||||
+ obj_surface->is_derived = 0;
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
if (obj_image->image.buf != VA_INVALID_ID) {
|
||||
i965_DestroyBuffer(ctx, obj_image->image.buf);
|
||||
@@ -1336,6 +1401,15 @@ i965_DestroyImage(VADriverContextP ctx, VAImageID image)
|
||||
}
|
||||
|
||||
i965_destroy_image(&i965->image_heap, (struct object_base *)obj_image);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+i965_DestroyImage(VADriverContextP ctx, VAImageID image)
|
||||
+{
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+ struct object_image *obj_image = IMAGE(image);
|
||||
+
|
||||
+ i965_DestroyImage_impl(ctx, obj_image, 0);
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1382,6 +1456,9 @@ i965_GetImage(VADriverContextP ctx,
|
||||
if (!obj_surface)
|
||||
return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
|
||||
+ if (obj_surface->is_derived)
|
||||
+ return VA_STATUS_ERROR_SURFACE_BUSY;
|
||||
+
|
||||
struct object_image *obj_image = IMAGE(image);
|
||||
if (!obj_image)
|
||||
return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
@@ -1441,6 +1518,9 @@ i965_PutImage(VADriverContextP ctx,
|
||||
if (!obj_surface)
|
||||
return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
|
||||
+ if (obj_surface->is_derived)
|
||||
+ return VA_STATUS_ERROR_SURFACE_BUSY;
|
||||
+
|
||||
struct object_image *obj_image = IMAGE(image);
|
||||
if (!obj_image)
|
||||
return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
|
||||
index be253ed..7f410ab 100644
|
||||
--- a/i965_drv_video/i965_drv_video.h
|
||||
+++ b/i965_drv_video/i965_drv_video.h
|
||||
@@ -96,6 +96,8 @@ struct object_surface
|
||||
int width;
|
||||
int height;
|
||||
int size;
|
||||
+ VAImage image;
|
||||
+ int is_derived;
|
||||
dri_bo *bo;
|
||||
};
|
||||
|
||||
@@ -113,6 +115,7 @@ struct object_image
|
||||
{
|
||||
struct object_base base;
|
||||
VAImage image;
|
||||
+ VASurfaceID surface;
|
||||
dri_bo *bo;
|
||||
unsigned int *palette;
|
||||
};
|
@ -0,0 +1,69 @@
|
||||
commit 0b18b60ccc4df5e2dc30ad301451c3bd8b55b49d
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Mar 18 12:25:20 2010 +0100
|
||||
|
||||
[G45] Add I420 image format.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 98a824f..7b3a206 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -64,6 +64,8 @@ static const i965_image_format_map_t
|
||||
i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
|
||||
{ I965_SURFACETYPE_YUV,
|
||||
{ VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
|
||||
+ { I965_SURFACETYPE_YUV,
|
||||
+ { VA_FOURCC('I','4','2','0'), VA_LSB_FIRST, 12, } },
|
||||
};
|
||||
|
||||
static const i965_image_format_map_t *
|
||||
@@ -1301,6 +1303,16 @@ i965_CreateImage_impl(
|
||||
image->offsets[2] = size;
|
||||
image->data_size = size + 2 * size2;
|
||||
break;
|
||||
+ case VA_FOURCC('I','4','2','0'):
|
||||
+ image->num_planes = 3;
|
||||
+ image->pitches[0] = width;
|
||||
+ image->offsets[0] = 0;
|
||||
+ image->pitches[1] = width2;
|
||||
+ image->offsets[1] = size;
|
||||
+ image->pitches[2] = width2;
|
||||
+ image->offsets[2] = size + size2;
|
||||
+ image->data_size = size + 2 * size2;
|
||||
+ break;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
@@ -1485,7 +1497,8 @@ i965_GetImage(VADriverContextP ctx,
|
||||
dri_bo_map(obj_surface->bo, 0);
|
||||
|
||||
switch (obj_image->image.format.fourcc) {
|
||||
- case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
|
||||
+ case VA_FOURCC('Y','V','1','2'):
|
||||
+ case VA_FOURCC('I','4','2','0'): /* I420 is native format here */
|
||||
memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
|
||||
break;
|
||||
default:
|
||||
@@ -1550,7 +1563,8 @@ i965_PutImage(VADriverContextP ctx,
|
||||
dri_bo_map(obj_surface->bo, 1);
|
||||
|
||||
switch (obj_image->image.format.fourcc) {
|
||||
- case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
|
||||
+ case VA_FOURCC('Y','V','1','2'):
|
||||
+ case VA_FOURCC('I','4','2','0'): /* I420 is native format here */
|
||||
memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
|
||||
break;
|
||||
default:
|
||||
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
|
||||
index 7f410ab..9e5707b 100644
|
||||
--- a/i965_drv_video/i965_drv_video.h
|
||||
+++ b/i965_drv_video/i965_drv_video.h
|
||||
@@ -43,7 +43,7 @@
|
||||
#define I965_MAX_PROFILES 11
|
||||
#define I965_MAX_ENTRYPOINTS 5
|
||||
#define I965_MAX_CONFIG_ATTRIBUTES 10
|
||||
-#define I965_MAX_IMAGE_FORMATS 1
|
||||
+#define I965_MAX_IMAGE_FORMATS 2
|
||||
#define I965_MAX_SUBPIC_FORMATS 4
|
||||
#define I965_MAX_DISPLAY_ATTRIBUTES 4
|
||||
#define I965_STR_VENDOR "i965 Driver 0.1"
|
@ -0,0 +1,41 @@
|
||||
commit 26db277f8e028be83d9ab16ef8e4077e9f745c17
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 3 15:46:37 2009 +0000
|
||||
|
||||
Check for __attribute__((visibility("hidden"))).
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index eedfe4c..f2d0ea4 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -100,6 +100,30 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
|
||||
|
||||
+dnl Check for __attribute__((visibility()))
|
||||
+AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
|
||||
+ libva_cv_visibility_attribute,
|
||||
+ [cat > conftest.c <<EOF
|
||||
+int foo __attribute__ ((visibility ("hidden"))) = 1;
|
||||
+int bar __attribute__ ((visibility ("protected"))) = 1;
|
||||
+EOF
|
||||
+ libva_cv_visibility_attribute=no
|
||||
+ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
|
||||
+ if grep '\.hidden.*foo' conftest.s >/dev/null; then
|
||||
+ if grep '\.protected.*bar' conftest.s >/dev/null; then
|
||||
+ libva_cv_visibility_attribute=yes
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ rm -f conftest.[cs]
|
||||
+])
|
||||
+ATTRIBUTE_HIDDEN=""
|
||||
+if test $libva_cv_visibility_attribute = yes; then
|
||||
+ ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))"
|
||||
+fi
|
||||
+AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
|
||||
+ [Defined to __attribute__((visibility("hidden"))) when available])
|
||||
+
|
||||
# We only need the headers, we don't link against the DRM libraries
|
||||
LIBVA_CFLAGS="$DRM_CFLAGS"
|
||||
AC_SUBST(LIBVA_CFLAGS)
|
22
packages/multimedia/libva/patches/103_fix_vainfo_deps.diff
Normal file
22
packages/multimedia/libva/patches/103_fix_vainfo_deps.diff
Normal file
@ -0,0 +1,22 @@
|
||||
commit a07468c4f0e30b5f207a2bdf1b362f5584d748a7
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 12:29:56 2009 +0000
|
||||
|
||||
Fix vainfo dependencies (Konstantin Pavlov).
|
||||
|
||||
diff --git a/test/Makefile.am b/test/Makefile.am
|
||||
index d7e1b1f..8785259 100644
|
||||
--- a/test/Makefile.am
|
||||
+++ b/test/Makefile.am
|
||||
@@ -25,9 +25,8 @@ bin_PROGRAMS = vainfo
|
||||
|
||||
AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/test/basic -I$(top_srcdir)/src/x11
|
||||
|
||||
-
|
||||
-vainfo_LDADD = $(top_srcdir)/va/$(libvabackendlib)
|
||||
-vainfo_DEPENDENCIES = $(top_srcdir)/va/$(libvabackendlib)
|
||||
+vainfo_LDADD = $(top_srcdir)/va/libva.la $(top_srcdir)/va/$(libvabackendlib)
|
||||
+vainfo_DEPENDENCIES = $(top_srcdir)/va/libva.la $(top_srcdir)/va/$(libvabackendlib)
|
||||
vainfo_SOURCES = vainfo.c
|
||||
|
||||
SUBDIRS = basic decode encode putsurface
|
@ -0,0 +1,18 @@
|
||||
commit 5f1314d188c4ecc2e0d5be54bcd663013e8b0077
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 13:00:34 2009 +0000
|
||||
|
||||
Fix libva-x11 dependencies. Ensure this grabs libva so that people don't have to check for that themselves.
|
||||
|
||||
diff --git a/libva-x11.pc.in b/libva-x11.pc.in
|
||||
index 75e4f0b..6dde07f 100644
|
||||
--- a/libva-x11.pc.in
|
||||
+++ b/libva-x11.pc.in
|
||||
@@ -6,6 +6,7 @@ display=x11
|
||||
|
||||
Name: libva-${display}
|
||||
Description: Userspace Video Acceleration (VA) ${display} interface
|
||||
+Requires: libva
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lva-${display}
|
||||
Cflags: -I${includedir}
|
@ -0,0 +1,21 @@
|
||||
commit ecc7b5f332674ee57ad11a0d6bb58a252549c762
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 13:03:23 2009 +0000
|
||||
|
||||
Don't search LIBGL_DRIVERS_PATH, stick to LIBVA_DRIVERS_PATH only or the default path.
|
||||
|
||||
diff --git a/va/va.c b/va/va.c
|
||||
index c8e036e..ada70ce 100644
|
||||
--- a/va/va.c
|
||||
+++ b/va/va.c
|
||||
@@ -127,10 +127,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
|
||||
{
|
||||
/* don't allow setuid apps to use LIBVA_DRIVERS_PATH */
|
||||
search_path = getenv("LIBVA_DRIVERS_PATH");
|
||||
- if (!search_path)
|
||||
- {
|
||||
- search_path = getenv("LIBGL_DRIVERS_PATH");
|
||||
- }
|
||||
}
|
||||
if (!search_path)
|
||||
{
|
19
packages/multimedia/libva/patches/108_drivers_path.diff
Normal file
19
packages/multimedia/libva/patches/108_drivers_path.diff
Normal file
@ -0,0 +1,19 @@
|
||||
commit 43becedcfa2b9b040006868a63c686a131c9ba74
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Jun 24 08:12:13 2009 +0000
|
||||
|
||||
Install drivers into pkglibdir/va/.
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f2d0ea4..ebe5df6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -73,7 +73,7 @@ AC_ARG_ENABLE(i965-driver,
|
||||
|
||||
AC_ARG_WITH(drivers-path,
|
||||
[AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
|
||||
- [with_drivers_path="$libdir/dri"])
|
||||
+ [with_drivers_path="$libdir/va/drivers"])
|
||||
|
||||
LIBVA_DRIVERS_PATH="$with_drivers_path"
|
||||
AC_SUBST(LIBVA_DRIVERS_PATH)
|
@ -0,0 +1,97 @@
|
||||
commit 1f9ee94ab4ac60459048bef5a2aa348cdf88c390
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Feb 23 09:11:22 2010 +0000
|
||||
|
||||
Move LIBVA_DRIVER_NAME check in vaInitialize().
|
||||
|
||||
diff --git a/va/va.c b/va/va.c
|
||||
index ada70ce..b5940e5 100644
|
||||
--- a/va/va.c
|
||||
+++ b/va/va.c
|
||||
@@ -320,30 +320,42 @@ VAStatus vaInitialize (
|
||||
int *minor_version /* out */
|
||||
)
|
||||
{
|
||||
- char *driver_name = NULL;
|
||||
- VAStatus vaStatus;
|
||||
-
|
||||
- CHECK_DISPLAY(dpy);
|
||||
+ const char *driver_name_env = NULL;
|
||||
+ char *driver_name = NULL;
|
||||
+ VAStatus vaStatus;
|
||||
|
||||
- va_debug_trace = (getenv("LIBVA_DEBUG_TRACE") != NULL);
|
||||
+ CHECK_DISPLAY(dpy);
|
||||
|
||||
- va_infoMessage("libva version %s\n", VA_VERSION_S);
|
||||
+ va_debug_trace = (getenv("LIBVA_DEBUG_TRACE") != NULL);
|
||||
|
||||
- vaStatus = va_getDriverName(dpy, &driver_name);
|
||||
- va_infoMessage("va_getDriverName() returns %d\n", vaStatus);
|
||||
-
|
||||
- if (VA_STATUS_SUCCESS == vaStatus)
|
||||
- {
|
||||
- vaStatus = va_openDriver(dpy, driver_name);
|
||||
- va_infoMessage("va_openDriver() returns %d\n", vaStatus);
|
||||
-
|
||||
- *major_version = VA_MAJOR_VERSION;
|
||||
- *minor_version = VA_MINOR_VERSION;
|
||||
- }
|
||||
+ va_infoMessage("libva version %s\n", VA_VERSION_S);
|
||||
|
||||
- if (driver_name)
|
||||
- free(driver_name);
|
||||
- return vaStatus;
|
||||
+ driver_name_env = getenv("LIBVA_DRIVER_NAME");
|
||||
+ if (driver_name_env && geteuid() == getuid())
|
||||
+ {
|
||||
+ /* Don't allow setuid apps to use LIBVA_DRIVER_NAME */
|
||||
+ driver_name = strdup(driver_name_env);
|
||||
+ vaStatus = VA_STATUS_SUCCESS;
|
||||
+ va_infoMessage("User requested driver '%s'\n", driver_name);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ vaStatus = va_getDriverName(dpy, &driver_name);
|
||||
+ va_infoMessage("va_getDriverName() returns %d\n", vaStatus);
|
||||
+ }
|
||||
+
|
||||
+ if (VA_STATUS_SUCCESS == vaStatus)
|
||||
+ {
|
||||
+ vaStatus = va_openDriver(dpy, driver_name);
|
||||
+ va_infoMessage("va_openDriver() returns %d\n", vaStatus);
|
||||
+
|
||||
+ *major_version = VA_MAJOR_VERSION;
|
||||
+ *minor_version = VA_MINOR_VERSION;
|
||||
+ }
|
||||
+
|
||||
+ if (driver_name)
|
||||
+ free(driver_name);
|
||||
+ return vaStatus;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
|
||||
index 29e81c8..78e38de 100644
|
||||
--- a/va/x11/va_x11.c
|
||||
+++ b/va/x11/va_x11.c
|
||||
@@ -136,19 +136,10 @@ static VAStatus va_DisplayContextGetDriverName (
|
||||
)
|
||||
{
|
||||
VAStatus vaStatus;
|
||||
- char *driver_name_env;
|
||||
|
||||
if (driver_name)
|
||||
*driver_name = NULL;
|
||||
|
||||
- if ((driver_name_env = getenv("LIBVA_DRIVER_NAME")) != NULL
|
||||
- && geteuid() == getuid())
|
||||
- {
|
||||
- /* don't allow setuid apps to use LIBVA_DRIVER_NAME */
|
||||
- *driver_name = strdup(driver_name_env);
|
||||
- return VA_STATUS_SUCCESS;
|
||||
- }
|
||||
-
|
||||
vaStatus = va_DRI2GetDriverName(pDisplayContext, driver_name);
|
||||
if (vaStatus != VA_STATUS_SUCCESS)
|
||||
vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name);
|
155
packages/multimedia/libva/patches/202_check_crystalhd.diff
Normal file
155
packages/multimedia/libva/patches/202_check_crystalhd.diff
Normal file
@ -0,0 +1,155 @@
|
||||
commit 0eeee71bcd334512a6b86702ee612b35feb644b2
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Feb 23 10:05:25 2010 +0000
|
||||
|
||||
Detect Broadcom Crystal HD chip.
|
||||
|
||||
diff --git a/va/Makefile.am b/va/Makefile.am
|
||||
index aeaf82f..f382c0e 100644
|
||||
--- a/va/Makefile.am
|
||||
+++ b/va/Makefile.am
|
||||
@@ -42,7 +42,7 @@ libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
|
||||
SUBDIRS = x11
|
||||
|
||||
-libva_la_SOURCES = va.c
|
||||
+libva_la_SOURCES = va.c va_crystalhd.c
|
||||
|
||||
libvaincludedir = ${includedir}/va
|
||||
libvainclude_HEADERS = va.h va_x11.h va_backend.h va_version.h
|
||||
@@ -51,4 +51,5 @@ DISTCLEANFILES = \
|
||||
va_version.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
- va_version.h.in
|
||||
+ va_version.h.in \
|
||||
+ va_crystalhd.h
|
||||
diff --git a/va/va.c b/va/va.c
|
||||
index b5940e5..fd68481 100644
|
||||
--- a/va/va.c
|
||||
+++ b/va/va.c
|
||||
@@ -24,8 +24,10 @@
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
+#include "config.h"
|
||||
#include "va.h"
|
||||
#include "va_backend.h"
|
||||
+#include "va_crystalhd.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
@@ -349,6 +351,15 @@ VAStatus vaInitialize (
|
||||
vaStatus = va_openDriver(dpy, driver_name);
|
||||
va_infoMessage("va_openDriver() returns %d\n", vaStatus);
|
||||
|
||||
+ if (vaStatus != VA_STATUS_SUCCESS && !driver_name_env)
|
||||
+ {
|
||||
+ if (va_hasCrystalHD())
|
||||
+ {
|
||||
+ vaStatus = va_openDriver(dpy, "crystalhd");
|
||||
+ va_infoMessage("va_openDriver() returns %d\n", vaStatus);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
*major_version = VA_MAJOR_VERSION;
|
||||
*minor_version = VA_MINOR_VERSION;
|
||||
}
|
||||
diff --git a/va/va_crystalhd.c b/va/va_crystalhd.c
|
||||
new file mode 100644
|
||||
index 0000000..1ddd4fe
|
||||
--- /dev/null
|
||||
+++ b/va/va_crystalhd.c
|
||||
@@ -0,0 +1,54 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include "config.h"
|
||||
+#include "va_crystalhd.h"
|
||||
+
|
||||
+/* Checks if the Broadcom Crystal HD decoder is available */
|
||||
+int va_hasCrystalHD(void)
|
||||
+{
|
||||
+ char line[1024];
|
||||
+ int len, vendor, device, dummy, found = 0;
|
||||
+ FILE *fp;
|
||||
+
|
||||
+ fp = fopen("/proc/bus/pci/devices", "r");
|
||||
+ if (!fp)
|
||||
+ return 0;
|
||||
+
|
||||
+ while (!found && fgets(line, sizeof(line), fp)) {
|
||||
+ len = strlen(line);
|
||||
+ if (len == 0)
|
||||
+ continue;
|
||||
+ line[len - 1] = 0;
|
||||
+ if (sscanf(line, "%x %04x%04x", &dummy, &vendor, &device) == 3) {
|
||||
+ if (vendor == 0x14e4 && device == 0x1612) /* BCM70012 */
|
||||
+ found = 1;
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(fp);
|
||||
+ return found;
|
||||
+}
|
||||
diff --git a/va/va_crystalhd.h b/va/va_crystalhd.h
|
||||
new file mode 100644
|
||||
index 0000000..44a39d9
|
||||
--- /dev/null
|
||||
+++ b/va/va_crystalhd.h
|
||||
@@ -0,0 +1,32 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef VA_CRYSTALHD_H
|
||||
+#define VA_CRYSTALHD_H
|
||||
+
|
||||
+/** Checks if the Broadcom Crystal HD decoder is available */
|
||||
+int va_hasCrystalHD(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+#endif /* VA_CRYSTALHD_H */
|
538
packages/multimedia/libva/patches/203_fix_fglrx_detection.diff
Normal file
538
packages/multimedia/libva/patches/203_fix_fglrx_detection.diff
Normal file
@ -0,0 +1,538 @@
|
||||
commit 02c2bb46ae11a1674927e6e65f990df1dc9ed1ce
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Mon Mar 8 09:17:09 2010 +0100
|
||||
|
||||
Don't link against libdrm to workaround XvBA / fglrx >= 8.66-RC1 bugs.
|
||||
|
||||
diff --git a/va/Makefile.am b/va/Makefile.am
|
||||
index f382c0e..3b9ccfc 100644
|
||||
--- a/va/Makefile.am
|
||||
+++ b/va/Makefile.am
|
||||
@@ -36,7 +36,7 @@ libva_la_LDFLAGS = $(LDADD) -no-undefined
|
||||
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
|
||||
|
||||
libva_x11_la_SOURCES =
|
||||
-libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
|
||||
+libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS)
|
||||
libva_x11_la_LDFLAGS = $(LDADD)
|
||||
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
|
||||
diff --git a/va/x11/Makefile.am b/va/x11/Makefile.am
|
||||
index 40346f1..7466fda 100644
|
||||
--- a/va/x11/Makefile.am
|
||||
+++ b/va/x11/Makefile.am
|
||||
@@ -25,6 +25,6 @@ noinst_LTLIBRARIES = libva_x11.la
|
||||
libva_x11includedir = ${includedir}/va
|
||||
libva_x11include_HEADERS = va_dri.h va_dri2.h va_dricommon.h
|
||||
|
||||
-libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c
|
||||
+libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c
|
||||
|
||||
-EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h
|
||||
+EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
|
||||
diff --git a/va/x11/dri1_util.c b/va/x11/dri1_util.c
|
||||
index 3e67e2a..f6ce1ba 100644
|
||||
--- a/va/x11/dri1_util.c
|
||||
+++ b/va/x11/dri1_util.c
|
||||
@@ -1,10 +1,13 @@
|
||||
+#include "config.h"
|
||||
+#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <strings.h> /* strcasecmp() */
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <assert.h>
|
||||
|
||||
-#include <xf86drm.h>
|
||||
+#include "libdrm_glue.h"
|
||||
|
||||
#include "X11/Xlib.h"
|
||||
#include "va.h"
|
||||
@@ -21,6 +24,75 @@ struct dri1_drawable
|
||||
int height;
|
||||
};
|
||||
|
||||
+static int
|
||||
+firegl_drmOpenMinor(int minor)
|
||||
+{
|
||||
+ char buf[64];
|
||||
+ int fd;
|
||||
+
|
||||
+ sprintf(buf, "/dev/ati/card%d", minor);
|
||||
+ if ((fd = open(buf, O_RDWR, 0)) >= 0)
|
||||
+ return fd;
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+firegl_drmOpenByBusID(const char *busid)
|
||||
+{
|
||||
+ int i, fd;
|
||||
+ drmSetVersion sv;
|
||||
+ const char *buf;
|
||||
+
|
||||
+ for (i = 0; i < DRM_MAX_MINOR; i++) {
|
||||
+ if ((fd = firegl_drmOpenMinor(i)) < 0)
|
||||
+ continue;
|
||||
+ sv.drm_di_major = 1;
|
||||
+ sv.drm_di_minor = 1;
|
||||
+ sv.drm_dd_major = -1;
|
||||
+ sv.drm_dd_minor = -1;
|
||||
+ libdrm_drmSetInterfaceVersion(fd, &sv);
|
||||
+ buf = libdrm_drmGetBusid(fd);
|
||||
+ if (buf && strcasecmp(buf, busid) == 0) { /* XXX: drmMatchBusID() */
|
||||
+ libdrm_drmFreeBusid(buf);
|
||||
+ return fd;
|
||||
+ }
|
||||
+ if (buf)
|
||||
+ libdrm_drmFreeBusid(buf);
|
||||
+ close(fd);
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+drm_open_once(struct dri_state *dri_state, const char *BusID, int *newlyopened)
|
||||
+{
|
||||
+ dri_state->driConnectedFlag = VA_NONE;
|
||||
+ dri_state->fd = libdrm_drmOpenOnce(NULL, BusID, newlyopened);
|
||||
+ if (dri_state->fd < 0) {
|
||||
+ dri_state->fd = firegl_drmOpenByBusID(BusID);
|
||||
+ if (dri_state->fd >= 0) {
|
||||
+ *newlyopened = 1;
|
||||
+ dri_state->driConnectedFlag |= VA_DRI_AMD;
|
||||
+ }
|
||||
+ }
|
||||
+ return dri_state->fd;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+drm_close_once(struct dri_state *dri_state)
|
||||
+{
|
||||
+ /* XXX: dri_state->close() doesn't seem to be called, thus this
|
||||
+ function is never called either */
|
||||
+ if (dri_state->fd < 0)
|
||||
+ return;
|
||||
+ if (dri_state->driConnectedFlag & VA_DRI_AMD)
|
||||
+ close(dri_state->fd);
|
||||
+ else
|
||||
+ libdrm_drmCloseOnce(dri_state->fd);
|
||||
+ dri_state->fd = -1;
|
||||
+ dri_state->driConnectedFlag = VA_NONE;
|
||||
+}
|
||||
+
|
||||
static struct dri_drawable *
|
||||
dri1CreateDrawable(VADriverContextP ctx, XID x_drawable)
|
||||
{
|
||||
@@ -64,9 +136,9 @@ dri1Close(VADriverContextP ctx)
|
||||
free_drawable_hashtable(ctx);
|
||||
VA_DRIDestroyContext(ctx->x11_dpy, ctx->x11_screen, dri_state->hwContextID);
|
||||
assert(dri_state->pSAREA != MAP_FAILED);
|
||||
- drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
+ libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
assert(dri_state->fd >= 0);
|
||||
- drmCloseOnce(dri_state->fd);
|
||||
+ drm_close_once(dri_state);
|
||||
VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
|
||||
}
|
||||
|
||||
@@ -104,21 +176,20 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
|
||||
&dri_state->hSAREA, &BusID))
|
||||
goto err_out0;
|
||||
|
||||
-
|
||||
- dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened);
|
||||
+ drm_open_once(dri_state, BusID, &newlyopened);
|
||||
XFree(BusID);
|
||||
|
||||
if (dri_state->fd < 0)
|
||||
goto err_out1;
|
||||
|
||||
|
||||
- if (drmGetMagic(dri_state->fd, &magic))
|
||||
+ if (libdrm_drmGetMagic(dri_state->fd, &magic))
|
||||
goto err_out1;
|
||||
|
||||
if (newlyopened && !VA_DRIAuthConnection(ctx->x11_dpy, ctx->x11_screen, magic))
|
||||
goto err_out1;
|
||||
|
||||
- if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
|
||||
+ if (libdrm_drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
|
||||
goto err_out1;
|
||||
|
||||
if (!VA_DRICreateContext(ctx->x11_dpy, ctx->x11_screen,
|
||||
@@ -126,7 +197,8 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
|
||||
&dri_state->hwContextID, &dri_state->hwContext))
|
||||
goto err_out1;
|
||||
|
||||
- dri_state->driConnectedFlag = VA_DRI1;
|
||||
+ dri_state->driConnectedFlag &= VA_DRI_AMD; /* clear flags but AMD bit */
|
||||
+ dri_state->driConnectedFlag |= VA_DRI1;
|
||||
dri_state->createDrawable = dri1CreateDrawable;
|
||||
dri_state->destroyDrawable = dri1DestroyDrawable;
|
||||
dri_state->swapBuffer = dri1SwapBuffer;
|
||||
@@ -137,10 +209,10 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
|
||||
|
||||
err_out1:
|
||||
if (dri_state->pSAREA != MAP_FAILED)
|
||||
- drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
+ libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
|
||||
if (dri_state->fd >= 0)
|
||||
- drmCloseOnce(dri_state->fd);
|
||||
+ drm_close_once(dri_state);
|
||||
|
||||
VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
|
||||
|
||||
diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c
|
||||
index ebe7a2c..b727e97 100644
|
||||
--- a/va/x11/dri2_util.c
|
||||
+++ b/va/x11/dri2_util.c
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
-#include <xf86drm.h>
|
||||
+#include "libdrm_glue.h"
|
||||
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xlib.h>
|
||||
@@ -166,7 +166,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
|
||||
if (dri_state->fd < 0)
|
||||
goto err_out;
|
||||
|
||||
- if (drmGetMagic(dri_state->fd, &magic))
|
||||
+ if (libdrm_drmGetMagic(dri_state->fd, &magic))
|
||||
goto err_out;
|
||||
|
||||
if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
|
||||
diff --git a/va/x11/libdrm_glue.c b/va/x11/libdrm_glue.c
|
||||
new file mode 100644
|
||||
index 0000000..92c7d60
|
||||
--- /dev/null
|
||||
+++ b/va/x11/libdrm_glue.c
|
||||
@@ -0,0 +1,209 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#define _GNU_SOURCE 1
|
||||
+#include "libdrm_glue.h"
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <dlfcn.h>
|
||||
+#include <assert.h>
|
||||
+
|
||||
+#define LOAD_FUNC_(NAME, RET, ARGS, FALLBACK) \
|
||||
+ static RET (*lib_##NAME) ARGS; \
|
||||
+ if (lib_##NAME == NULL) { \
|
||||
+ lib_##NAME = libdrm_symbol(#NAME); \
|
||||
+ if (!lib_##NAME) \
|
||||
+ lib_##NAME = FALLBACK; \
|
||||
+ } \
|
||||
+ assert(lib_##NAME != NULL)
|
||||
+
|
||||
+#define LOAD_FUNC(NAME, RET, ARGS) \
|
||||
+ LOAD_FUNC_(NAME, RET, ARGS, NULL)
|
||||
+
|
||||
+static void *libdrm_handle;
|
||||
+static int libdrm_handle_ok = -1;
|
||||
+
|
||||
+static inline void *libdrm_symbol(const char *name)
|
||||
+{
|
||||
+ if (!libdrm_open())
|
||||
+ return NULL;
|
||||
+ return dlsym(libdrm_handle, name);
|
||||
+}
|
||||
+
|
||||
+int libdrm_open(void)
|
||||
+{
|
||||
+ if (libdrm_handle_ok < 0) {
|
||||
+ libdrm_handle = dlopen("libdrm.so.2", RTLD_LOCAL|RTLD_LAZY);
|
||||
+ libdrm_handle_ok = libdrm_handle != NULL;
|
||||
+ }
|
||||
+ assert(libdrm_handle);
|
||||
+ return libdrm_handle_ok;
|
||||
+}
|
||||
+
|
||||
+void libdrm_close(void)
|
||||
+{
|
||||
+ if (libdrm_handle)
|
||||
+ dlclose(libdrm_handle);
|
||||
+}
|
||||
+
|
||||
+// Default drmOpenOnce() and drmCloseOnce() implementations based on current GIT
|
||||
+#define DRM_MAX_FDS 16
|
||||
+static struct {
|
||||
+ char *BusID;
|
||||
+ int fd;
|
||||
+ int refcount;
|
||||
+} connection[DRM_MAX_FDS];
|
||||
+
|
||||
+static int nr_fds = 0;
|
||||
+
|
||||
+// Default implementation for drmOpenOnce() if none exists in the library
|
||||
+static int
|
||||
+libdrm_default_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
|
||||
+{
|
||||
+ int i;
|
||||
+ int fd;
|
||||
+
|
||||
+ for (i = 0; i < nr_fds; i++)
|
||||
+ if (strcmp(BusID, connection[i].BusID) == 0) {
|
||||
+ connection[i].refcount++;
|
||||
+ *newlyopened = 0;
|
||||
+ return connection[i].fd;
|
||||
+ }
|
||||
+
|
||||
+ fd = libdrm_drmOpen(unused, BusID);
|
||||
+ if (fd <= 0 || nr_fds == DRM_MAX_FDS)
|
||||
+ return fd;
|
||||
+
|
||||
+ connection[nr_fds].BusID = strdup(BusID);
|
||||
+ connection[nr_fds].fd = fd;
|
||||
+ connection[nr_fds].refcount = 1;
|
||||
+ *newlyopened = 1;
|
||||
+
|
||||
+ if (0)
|
||||
+ fprintf(stderr, "saved connection %d for %s %d\n",
|
||||
+ nr_fds, connection[nr_fds].BusID,
|
||||
+ strcmp(BusID, connection[nr_fds].BusID));
|
||||
+ nr_fds++;
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
+// Default implementation for drmCloseOnce() if none exists in the library
|
||||
+static void libdrm_default_drmCloseOnce(int fd)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < nr_fds; i++) {
|
||||
+ if (fd == connection[i].fd) {
|
||||
+ if (--connection[i].refcount == 0) {
|
||||
+ libdrm_drmClose(connection[i].fd);
|
||||
+ free(connection[i].BusID);
|
||||
+ if (i < --nr_fds)
|
||||
+ connection[i] = connection[nr_fds];
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// Determine whether the DRM kernel driver has been loaded
|
||||
+int libdrm_drmAvailable(void)
|
||||
+{
|
||||
+ LOAD_FUNC(drmAvailable, int, (void));
|
||||
+ return lib_drmAvailable();
|
||||
+}
|
||||
+
|
||||
+// Open the DRM device
|
||||
+int libdrm_drmOpen(const char *name, const char *busid)
|
||||
+{
|
||||
+ LOAD_FUNC(drmOpen, int, (const char *, const char *));
|
||||
+ return lib_drmOpen(name, busid);
|
||||
+}
|
||||
+
|
||||
+// Close the device
|
||||
+int libdrm_drmClose(int fd)
|
||||
+{
|
||||
+ LOAD_FUNC(drmClose, int, (int));
|
||||
+ return lib_drmClose(fd);
|
||||
+}
|
||||
+
|
||||
+// Open the DRM device (re-use an existing connection)
|
||||
+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
|
||||
+{
|
||||
+ LOAD_FUNC_(drmOpenOnce, int, (void *, const char *, int *),
|
||||
+ libdrm_default_drmOpenOnce);
|
||||
+ return lib_drmOpenOnce(unused, BusID, newlyopened);
|
||||
+}
|
||||
+
|
||||
+// Close the device (unref an existing connection prior to actually closing it)
|
||||
+void libdrm_drmCloseOnce(int fd)
|
||||
+{
|
||||
+ LOAD_FUNC_(drmCloseOnce, void, (int), libdrm_default_drmCloseOnce);
|
||||
+ lib_drmCloseOnce(fd);
|
||||
+}
|
||||
+
|
||||
+// DRM connection cookie
|
||||
+int libdrm_drmGetMagic(int fd, drm_magic_t * magic)
|
||||
+{
|
||||
+ LOAD_FUNC(drmGetMagic, int, (int, drm_magic_t *));
|
||||
+ return lib_drmGetMagic(fd, magic);
|
||||
+}
|
||||
+
|
||||
+// Issue a set-version ioctl
|
||||
+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version)
|
||||
+{
|
||||
+ LOAD_FUNC(drmSetInterfaceVersion, int, (int, drmSetVersion *));
|
||||
+ return lib_drmSetInterfaceVersion(fd, version);
|
||||
+}
|
||||
+
|
||||
+// Get the bus ID of the device
|
||||
+char *libdrm_drmGetBusid(int fd)
|
||||
+{
|
||||
+ LOAD_FUNC(drmGetBusid, char *, (int));
|
||||
+ return lib_drmGetBusid(fd);
|
||||
+}
|
||||
+
|
||||
+// Free the bus ID information
|
||||
+void libdrm_drmFreeBusid(const char *busid)
|
||||
+{
|
||||
+ LOAD_FUNC(drmFreeBusid, void, (const char *));
|
||||
+ lib_drmFreeBusid(busid);
|
||||
+}
|
||||
+
|
||||
+// Map a region of memory
|
||||
+int libdrm_drmMap(int fd,
|
||||
+ drm_handle_t handle,
|
||||
+ drmSize size,
|
||||
+ drmAddressPtr address)
|
||||
+{
|
||||
+ LOAD_FUNC(drmMap, int, (int, drm_handle_t, drmSize, drmAddressPtr));
|
||||
+ return lib_drmMap(fd, handle, size, address);
|
||||
+}
|
||||
+
|
||||
+// Unmap mappings obtained with drmMap()
|
||||
+int libdrm_drmUnmap(drmAddress address, drmSize size)
|
||||
+{
|
||||
+ LOAD_FUNC(drmUnmap, int, (drmAddress, drmSize));
|
||||
+ return lib_drmUnmap(address, size);
|
||||
+}
|
||||
diff --git a/va/x11/libdrm_glue.h b/va/x11/libdrm_glue.h
|
||||
new file mode 100644
|
||||
index 0000000..878470b
|
||||
--- /dev/null
|
||||
+++ b/va/x11/libdrm_glue.h
|
||||
@@ -0,0 +1,73 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef LIBDRM_GLUE_H
|
||||
+#define LIBDRM_GLUE_H
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include <xf86drm.h>
|
||||
+
|
||||
+int libdrm_open(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+void libdrm_close(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmAvailable(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmOpen(const char *name, const char *busid)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmClose(int fd)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+void libdrm_drmCloseOnce(int fd)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmGetMagic(int fd, drm_magic_t * magic)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+char *libdrm_drmGetBusid(int fd)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+void libdrm_drmFreeBusid(const char *busid)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmMap(int fd,
|
||||
+ drm_handle_t handle,
|
||||
+ drmSize size,
|
||||
+ drmAddressPtr address)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmUnmap(drmAddress address, drmSize size)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+#endif /* LIBDRM_GLUE_H */
|
||||
diff --git a/va/x11/va_dricommon.h b/va/x11/va_dricommon.h
|
||||
index b762bd0..5ed7a6a 100644
|
||||
--- a/va/x11/va_dricommon.h
|
||||
+++ b/va/x11/va_dricommon.h
|
||||
@@ -13,7 +13,8 @@ enum
|
||||
{
|
||||
VA_NONE = 0,
|
||||
VA_DRI1 = 1,
|
||||
- VA_DRI2 = 2
|
||||
+ VA_DRI2 = 2,
|
||||
+ VA_DRI_AMD = 4 /* AMD DRI implementation */
|
||||
};
|
||||
|
||||
union dri_buffer
|
||||
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
|
||||
index 78e38de..1216093 100644
|
||||
--- a/va/x11/va_x11.c
|
||||
+++ b/va/x11/va_x11.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "va_dri2.h"
|
||||
#include "va_dricommon.h"
|
||||
#include "va_nvctrl.h"
|
||||
+#include "libdrm_glue.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@@ -75,6 +76,8 @@ static void va_DisplayContextDestroy (
|
||||
}
|
||||
ctx = &((*ctx)->pNext);
|
||||
}
|
||||
+
|
||||
+ libdrm_close();
|
||||
free(pDisplayContext->pDriverContext->dri_state);
|
||||
free(pDisplayContext->pDriverContext);
|
||||
free(pDisplayContext);
|
325
packages/multimedia/libva/patches/204_check_ATIFGLEXTENSION.diff
Normal file
325
packages/multimedia/libva/patches/204_check_ATIFGLEXTENSION.diff
Normal file
@ -0,0 +1,325 @@
|
||||
commit 595a044901ee32acc3212100966f5a1a9e181515
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Fri Nov 20 15:51:22 2009 +0000
|
||||
|
||||
Fix detection of fglrx.
|
||||
|
||||
diff --git a/va/Makefile.am b/va/Makefile.am
|
||||
index 3b9ccfc..99f6bbf 100644
|
||||
--- a/va/Makefile.am
|
||||
+++ b/va/Makefile.am
|
||||
@@ -36,7 +36,7 @@ libva_la_LDFLAGS = $(LDADD) -no-undefined
|
||||
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
|
||||
|
||||
libva_x11_la_SOURCES =
|
||||
-libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS)
|
||||
+libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) -ldl
|
||||
libva_x11_la_LDFLAGS = $(LDADD)
|
||||
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
|
||||
diff --git a/va/x11/Makefile.am b/va/x11/Makefile.am
|
||||
index 7466fda..a6d9323 100644
|
||||
--- a/va/x11/Makefile.am
|
||||
+++ b/va/x11/Makefile.am
|
||||
@@ -25,6 +25,23 @@ noinst_LTLIBRARIES = libva_x11.la
|
||||
libva_x11includedir = ${includedir}/va
|
||||
libva_x11include_HEADERS = va_dri.h va_dri2.h va_dricommon.h
|
||||
|
||||
-libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c
|
||||
+libva_x11_la_SOURCES = \
|
||||
+ dri1_util.c \
|
||||
+ dri2_util.c \
|
||||
+ libdrm_glue.c \
|
||||
+ va_dri.c \
|
||||
+ va_dri2.c \
|
||||
+ va_dricommon.c \
|
||||
+ va_fglext.c \
|
||||
+ va_nvctrl.c \
|
||||
+ va_x11.c \
|
||||
+ $(NULL)
|
||||
|
||||
-EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
|
||||
+EXTRA_DIST = \
|
||||
+ libdrm_glue.h \
|
||||
+ va_dri2str.h \
|
||||
+ va_dri2tokens.h \
|
||||
+ va_dristr.h \
|
||||
+ va_fglext.h \
|
||||
+ va_nvctrl.h \
|
||||
+ $(NULL)
|
||||
diff --git a/va/x11/va_fglext.c b/va/x11/va_fglext.c
|
||||
new file mode 100644
|
||||
index 0000000..add1f28
|
||||
--- /dev/null
|
||||
+++ b/va/x11/va_fglext.c
|
||||
@@ -0,0 +1,175 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#define _GNU_SOURCE 1
|
||||
+#include <string.h>
|
||||
+
|
||||
+#define NEED_REPLIES
|
||||
+#include <stdlib.h>
|
||||
+#include <X11/Xlibint.h>
|
||||
+#include <X11/Xutil.h>
|
||||
+#include <X11/extensions/Xext.h>
|
||||
+#include <X11/extensions/extutil.h>
|
||||
+#include "va_fglext.h"
|
||||
+
|
||||
+#define ATIFGL_EXTENSION_NAME "ATIFGLEXTENSION"
|
||||
+#define ATIFGL_EXTENSION_EVENTS 0
|
||||
+
|
||||
+typedef struct _FGLGetDriverData {
|
||||
+ CARD8 reqType;
|
||||
+ CARD8 fireglReqType;
|
||||
+ CARD16 length B16;
|
||||
+ CARD32 screen B32;
|
||||
+ CARD16 size B16;
|
||||
+ CARD16 pad1;
|
||||
+} xFGLGetDriverDataReq;
|
||||
+#define sz_xFGLGetDriverDataReq sizeof(xFGLGetDriverDataReq)
|
||||
+
|
||||
+typedef struct {
|
||||
+ BYTE type;
|
||||
+ BYTE pad1;
|
||||
+ CARD16 sequenceNumber B16;
|
||||
+ CARD32 length B32;
|
||||
+ CARD8 majorVersion;
|
||||
+ CARD8 minorVersion;
|
||||
+ CARD8 patchlevel B16;
|
||||
+ CARD8 BIOSVersionMajor;
|
||||
+ CARD8 BIOSVersionMinor;
|
||||
+ CARD8 HasSecondary;
|
||||
+ CARD16 pad3 B16;
|
||||
+ CARD32 pad4 B32;
|
||||
+ CARD32 pad5 B32;
|
||||
+ CARD32 pad6 B32;
|
||||
+ CARD32 pad7 B32;
|
||||
+ // ... there are more fields
|
||||
+} xFGLGetDriverDataReply;
|
||||
+#define sz_xFGLGetDriverDataReply sizeof(xFGLGetDriverDataReply)
|
||||
+
|
||||
+#define X_FGLGetDriverData 0
|
||||
+
|
||||
+static XExtensionInfo _fglext_ext_info_data;
|
||||
+static XExtensionInfo *fglext_ext_info = &_fglext_ext_info_data;
|
||||
+static /* const */ char *fglext_extension_name = ATIFGL_EXTENSION_NAME;
|
||||
+
|
||||
+#define xFGLCheckExtension(dpy,i,val) \
|
||||
+ XextCheckExtension (dpy, i, fglext_extension_name, val)
|
||||
+
|
||||
+static int close_display();
|
||||
+static /* const */ XExtensionHooks fglext_extension_hooks = {
|
||||
+ NULL, /* create_gc */
|
||||
+ NULL, /* copy_gc */
|
||||
+ NULL, /* flush_gc */
|
||||
+ NULL, /* free_gc */
|
||||
+ NULL, /* create_font */
|
||||
+ NULL, /* free_font */
|
||||
+ close_display, /* close_display */
|
||||
+ NULL, /* wire_to_event */
|
||||
+ NULL, /* event_to_wire */
|
||||
+ NULL, /* error */
|
||||
+ NULL, /* error_string */
|
||||
+};
|
||||
+
|
||||
+static XEXT_GENERATE_FIND_DISPLAY (find_display, fglext_ext_info,
|
||||
+ fglext_extension_name,
|
||||
+ &fglext_extension_hooks,
|
||||
+ ATIFGL_EXTENSION_EVENTS, NULL)
|
||||
+
|
||||
+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, fglext_ext_info)
|
||||
+
|
||||
+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen,
|
||||
+ Bool *isCapable )
|
||||
+{
|
||||
+ char **extensions;
|
||||
+ int i, n_extensions, has_fglext = 0, has_fglrxdri = 0;
|
||||
+
|
||||
+ if (isCapable)
|
||||
+ *isCapable = False;
|
||||
+
|
||||
+ extensions = XListExtensions(dpy, &n_extensions);
|
||||
+ if (!extensions)
|
||||
+ return False;
|
||||
+
|
||||
+ for (i = 0; i < n_extensions; i++) {
|
||||
+ if (strcmp(extensions[i], ATIFGL_EXTENSION_NAME) == 0)
|
||||
+ has_fglext = 1;
|
||||
+ if (strcmp(extensions[i], "ATIFGLRXDRI") == 0)
|
||||
+ has_fglrxdri = 1;
|
||||
+ }
|
||||
+ XFreeExtensionList(extensions);
|
||||
+
|
||||
+ if (!has_fglext)
|
||||
+ return False;
|
||||
+
|
||||
+ if (isCapable)
|
||||
+ *isCapable = has_fglrxdri;
|
||||
+
|
||||
+ return True;
|
||||
+}
|
||||
+
|
||||
+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen,
|
||||
+ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
|
||||
+ int *ddxDriverPatchVersion, char **clientDriverName )
|
||||
+{
|
||||
+ XExtDisplayInfo *info = find_display (dpy);
|
||||
+ xFGLGetDriverDataReply rep;
|
||||
+ xFGLGetDriverDataReq *req;
|
||||
+
|
||||
+ if (ddxDriverMajorVersion)
|
||||
+ *ddxDriverMajorVersion = 0;
|
||||
+ if (ddxDriverMinorVersion)
|
||||
+ *ddxDriverMinorVersion = 0;
|
||||
+ if (ddxDriverPatchVersion)
|
||||
+ *ddxDriverPatchVersion = 0;
|
||||
+ if (clientDriverName)
|
||||
+ *clientDriverName = NULL;
|
||||
+
|
||||
+ if(!XextHasExtension(info))
|
||||
+ return False;
|
||||
+
|
||||
+ xFGLCheckExtension (dpy, info, False);
|
||||
+
|
||||
+ LockDisplay (dpy);
|
||||
+ GetReq (FGLGetDriverData, req);
|
||||
+ req->reqType = info->codes->major_opcode;
|
||||
+ req->fireglReqType = X_FGLGetDriverData;
|
||||
+ req->screen = screen;
|
||||
+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
|
||||
+ UnlockDisplay (dpy);
|
||||
+ SyncHandle ();
|
||||
+ return False;
|
||||
+ }
|
||||
+ UnlockDisplay (dpy);
|
||||
+ SyncHandle ();
|
||||
+
|
||||
+ if (ddxDriverMajorVersion)
|
||||
+ *ddxDriverMajorVersion = rep.majorVersion;
|
||||
+ if (ddxDriverMinorVersion)
|
||||
+ *ddxDriverMinorVersion = rep.minorVersion;
|
||||
+ if (ddxDriverPatchVersion)
|
||||
+ *ddxDriverPatchVersion = rep.patchlevel;
|
||||
+ if (clientDriverName)
|
||||
+ *clientDriverName = strdup("fglrx");
|
||||
+
|
||||
+ return True;
|
||||
+}
|
||||
diff --git a/va/x11/va_fglext.h b/va/x11/va_fglext.h
|
||||
new file mode 100644
|
||||
index 0000000..f2d87c3
|
||||
--- /dev/null
|
||||
+++ b/va/x11/va_fglext.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef VA_FGLEXTLIB_H
|
||||
+#define VA_FGLEXTLIB_H
|
||||
+
|
||||
+#include <X11/Xlib.h>
|
||||
+
|
||||
+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen,
|
||||
+ Bool *isCapable );
|
||||
+
|
||||
+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen,
|
||||
+ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
|
||||
+ int *ddxDriverPatchVersion, char **clientDriverName );
|
||||
+
|
||||
+#endif /* VA_FGLEXTLIB_H */
|
||||
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
|
||||
index 1216093..71cc36f 100644
|
||||
--- a/va/x11/va_x11.c
|
||||
+++ b/va/x11/va_x11.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "va_dri2.h"
|
||||
#include "va_dricommon.h"
|
||||
#include "va_nvctrl.h"
|
||||
+#include "va_fglext.h"
|
||||
#include "libdrm_glue.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -133,6 +134,29 @@ static VAStatus va_NVCTRL_GetDriverName (
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+static VAStatus va_FGLEXT_GetDriverName(
|
||||
+ VADisplayContextP pDisplayContext,
|
||||
+ char **driver_name
|
||||
+)
|
||||
+{
|
||||
+ VADriverContextP ctx = pDisplayContext->pDriverContext;
|
||||
+ int direct_capable, driver_major, driver_minor, driver_patch;
|
||||
+ Bool result;
|
||||
+
|
||||
+ result = VA_FGLEXTQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen,
|
||||
+ &direct_capable);
|
||||
+ if (!result || !direct_capable)
|
||||
+ return VA_STATUS_ERROR_UNKNOWN;
|
||||
+
|
||||
+ result = VA_FGLEXTGetClientDriverName(ctx->x11_dpy, ctx->x11_screen,
|
||||
+ &driver_major, &driver_minor,
|
||||
+ &driver_patch, driver_name);
|
||||
+ if (!result)
|
||||
+ return VA_STATUS_ERROR_UNKNOWN;
|
||||
+
|
||||
+ return VA_STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
static VAStatus va_DisplayContextGetDriverName (
|
||||
VADisplayContextP pDisplayContext,
|
||||
char **driver_name
|
||||
@@ -148,7 +172,8 @@ static VAStatus va_DisplayContextGetDriverName (
|
||||
vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name);
|
||||
if (vaStatus != VA_STATUS_SUCCESS)
|
||||
vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name);
|
||||
-
|
||||
+ if (vaStatus != VA_STATUS_SUCCESS)
|
||||
+ vaStatus = va_FGLEXT_GetDriverName(pDisplayContext, driver_name);
|
||||
return vaStatus;
|
||||
}
|
||||
|
96
packages/multimedia/libva/patches/300_sds_version.diff
Normal file
96
packages/multimedia/libva/patches/300_sds_version.diff
Normal file
@ -0,0 +1,96 @@
|
||||
commit 1821919f68487c5e4fec33bd242208f49cb58c1e
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Jun 24 11:32:40 2009 +0000
|
||||
|
||||
Explicit API extensions from SDS.
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ebe5df6..95cf992 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -28,6 +28,9 @@ m4_define([libva_micro_version], [0])
|
||||
m4_define([libva_version],
|
||||
[libva_major_version.libva_minor_version.libva_micro_version])
|
||||
|
||||
+# increase this number for each API change
|
||||
+m4_define([libva_sds_version], [6])
|
||||
+
|
||||
# if the library source code has changed, increment revision
|
||||
m4_define([libva_lt_revision], [1])
|
||||
# if any interface was added/removed/changed, then inc current, reset revision
|
||||
@@ -52,11 +55,14 @@ AC_SUBST(LIBVA_MINOR_VERSION)
|
||||
AC_SUBST(LIBVA_MICRO_VERSION)
|
||||
AC_SUBST(LIBVA_VERSION)
|
||||
|
||||
+LIBVA_SDS_VERSION=libva_sds_version
|
||||
+AC_SUBST(LIBVA_SDS_VERSION)
|
||||
+
|
||||
LIBVA_LT_CURRENT=libva_lt_current
|
||||
LIBVA_LT_REV=libva_lt_revision
|
||||
LIBVA_LT_AGE=libva_lt_age
|
||||
LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE"
|
||||
-LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
|
||||
+LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION -release $LIBVA_VERSION.$LIBVA_SDS_VERSION"
|
||||
AC_SUBST(LIBVA_LT_VERSION)
|
||||
AC_SUBST(LIBVA_LT_LDFLAGS)
|
||||
|
||||
diff --git a/libva.pc.in b/libva.pc.in
|
||||
index 60f1483..0b37945 100644
|
||||
--- a/libva.pc.in
|
||||
+++ b/libva.pc.in
|
||||
@@ -3,6 +3,7 @@ exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
driverdir=@LIBVA_DRIVERS_PATH@
|
||||
+sdsversion=@LIBVA_SDS_VERSION@
|
||||
|
||||
Name: libva
|
||||
Description: Userspace Video Acceleration (VA) core interface
|
||||
diff --git a/va/va.c b/va/va.c
|
||||
index fd68481..0d208d8 100644
|
||||
--- a/va/va.c
|
||||
+++ b/va/va.c
|
||||
@@ -162,7 +162,15 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
|
||||
else
|
||||
{
|
||||
VADriverInit init_func;
|
||||
- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
|
||||
+ char driver_init_func_sds[32];
|
||||
+ /* First, try SDS extensions (VDPAU and XvBA backends) */
|
||||
+ sprintf(driver_init_func_sds, "%s_%d_sds%d",
|
||||
+ DRIVER_INIT_FUNC, VA_MICRO_VERSION, VA_SDS_VERSION);
|
||||
+ init_func = (VADriverInit) dlsym(handle, driver_init_func_sds);
|
||||
+ if (!init_func)
|
||||
+ {
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
|
||||
+ }
|
||||
if (!init_func)
|
||||
{
|
||||
va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC);
|
||||
diff --git a/va/va_version.h.in b/va/va_version.h.in
|
||||
index c9ea97a..197c482 100644
|
||||
--- a/va/va_version.h.in
|
||||
+++ b/va/va_version.h.in
|
||||
@@ -47,6 +47,13 @@
|
||||
#define VA_MICRO_VERSION (@LIBVA_MICRO_VERSION@)
|
||||
|
||||
/**
|
||||
+ * VA_SDS_VERSION:
|
||||
+ *
|
||||
+ * The version of the SDS API extensions to the VA library
|
||||
+ */
|
||||
+#define VA_SDS_VERSION (@LIBVA_SDS_VERSION@)
|
||||
+
|
||||
+/**
|
||||
* VA_VERSION:
|
||||
*
|
||||
* The full version of the VA library, like 1.2.3
|
||||
@@ -59,7 +66,7 @@
|
||||
* The full version of the VA library, in string form (suited for
|
||||
* string concatenation)
|
||||
*/
|
||||
-#define VA_VERSION_S "@LIBVA_VERSION@"
|
||||
+#define VA_VERSION_S "@LIBVA_VERSION@-sds@LIBVA_SDS_VERSION@"
|
||||
|
||||
/**
|
||||
* VA_VERSION_HEX:
|
202
packages/multimedia/libva/patches/321_libva_glx.base.diff
Normal file
202
packages/multimedia/libva/patches/321_libva_glx.base.diff
Normal file
@ -0,0 +1,202 @@
|
||||
commit e69075435675d356c7c9b4ff734a60e8cd031604
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Mon Mar 8 09:44:25 2010 +0100
|
||||
|
||||
Add OpenGL extensions (v3) and generic implementation with TFP and FBO.
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 459660b..e75a2db 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -32,10 +32,13 @@ endif
|
||||
|
||||
pcfiles = libva.pc
|
||||
pcfiles += libva-x11.pc
|
||||
+if USE_GLX
|
||||
+pcfiles += libva-glx.pc
|
||||
+endif
|
||||
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
pkgconfig_DATA = $(pcfiles)
|
||||
|
||||
-EXTRA_DIST = libva.pc.in libva-x11.pc.in
|
||||
+EXTRA_DIST = libva.pc.in libva-x11.pc.in libva-glx.pc.in
|
||||
|
||||
CLEANFILES = $(pcfiles)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 95cf992..86366e9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -66,6 +66,11 @@ LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION -release $LIBVA_VERSION.$LIBVA
|
||||
AC_SUBST(LIBVA_LT_VERSION)
|
||||
AC_SUBST(LIBVA_LT_LDFLAGS)
|
||||
|
||||
+AC_ARG_ENABLE(glx,
|
||||
+ [AC_HELP_STRING([--enable-glx],
|
||||
+ [build with OpenGL for X11 support])],
|
||||
+ [], [enable_glx=yes])
|
||||
+
|
||||
AC_ARG_ENABLE(dummy-driver,
|
||||
[AC_HELP_STRING([--enable-dummy-driver],
|
||||
[build dummy video driver])],
|
||||
@@ -130,6 +135,22 @@ fi
|
||||
AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
|
||||
[Defined to __attribute__((visibility("hidden"))) when available])
|
||||
|
||||
+# Check for OpenGL (X11)
|
||||
+USE_GLX="no"
|
||||
+GL_DEPS_CFLAGS=""
|
||||
+GL_DEPS_LIBS=""
|
||||
+if test x$enable_glx = xyes; then
|
||||
+ AC_CHECK_HEADERS([GL/gl.h])
|
||||
+ AC_CHECK_HEADERS([GL/glx.h])
|
||||
+ AC_CHECK_LIB(GL, glXCreateContext, [
|
||||
+ USE_GLX="yes"
|
||||
+ GL_DEPS_LIBS="-lX11 -lGL"
|
||||
+ ])
|
||||
+fi
|
||||
+AC_SUBST(GL_DEPS_CFLAGS)
|
||||
+AC_SUBST(GL_DEPS_LIBS)
|
||||
+AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
|
||||
+
|
||||
# We only need the headers, we don't link against the DRM libraries
|
||||
LIBVA_CFLAGS="$DRM_CFLAGS"
|
||||
AC_SUBST(LIBVA_CFLAGS)
|
||||
@@ -149,6 +170,7 @@ AC_OUTPUT([
|
||||
va/Makefile
|
||||
va/va_version.h
|
||||
va/x11/Makefile
|
||||
+ va/glx/Makefile
|
||||
dummy_drv_video/Makefile
|
||||
i965_drv_video/Makefile
|
||||
i965_drv_video/shaders/Makefile
|
||||
@@ -162,5 +184,6 @@ AC_OUTPUT([
|
||||
test/encode/Makefile
|
||||
libva.pc
|
||||
libva-x11.pc
|
||||
+ libva-glx.pc
|
||||
])
|
||||
|
||||
diff --git a/libva-glx.pc.in b/libva-glx.pc.in
|
||||
new file mode 100644
|
||||
index 0000000..2019915
|
||||
--- /dev/null
|
||||
+++ b/libva-glx.pc.in
|
||||
@@ -0,0 +1,12 @@
|
||||
+prefix=@prefix@
|
||||
+exec_prefix=@exec_prefix@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
+display=glx
|
||||
+
|
||||
+Name: libva-${display}
|
||||
+Description: Userspace Video Acceleration (VA) ${display} interface
|
||||
+Requires: libva
|
||||
+Version: @PACKAGE_VERSION@
|
||||
+Libs: -L${libdir} -lva-${display}
|
||||
+Cflags: -I${includedir}
|
||||
diff --git a/va/Makefile.am b/va/Makefile.am
|
||||
index 99f6bbf..ebff3d5 100644
|
||||
--- a/va/Makefile.am
|
||||
+++ b/va/Makefile.am
|
||||
@@ -27,9 +27,17 @@ INCLUDES = \
|
||||
LDADD = \
|
||||
$(LIBVA_LT_LDFLAGS)
|
||||
|
||||
-lib_LTLIBRARIES = \
|
||||
- libva.la \
|
||||
- libva-x11.la
|
||||
+libva_x11_backend = libva-x11.la
|
||||
+libva_x11_backenddir = x11
|
||||
+if USE_GLX
|
||||
+libva_glx_backend = libva-glx.la
|
||||
+libva_glx_backenddir = glx
|
||||
+else
|
||||
+libva_glx_backend =
|
||||
+libva_glx_backenddir =
|
||||
+endif
|
||||
+
|
||||
+lib_LTLIBRARIES = libva.la $(libva_x11_backend) $(libva_glx_backend)
|
||||
|
||||
libva_ladir = $(libdir)
|
||||
libva_la_LDFLAGS = $(LDADD) -no-undefined
|
||||
@@ -40,7 +48,14 @@ libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS
|
||||
libva_x11_la_LDFLAGS = $(LDADD)
|
||||
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
|
||||
-SUBDIRS = x11
|
||||
+libva_glx_la_SOURCES =
|
||||
+libva_glx_la_LIBADD = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl
|
||||
+libva_glx_la_LDFLAGS = $(LDADD)
|
||||
+libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la
|
||||
+
|
||||
+SUBDIRS = $(libva_x11_backenddir) $(libva_glx_backenddir)
|
||||
+
|
||||
+DIST_SUBDIRS = x11 glx
|
||||
|
||||
libva_la_SOURCES = va.c va_crystalhd.c
|
||||
|
||||
diff --git a/va/glx/Makefile.am b/va/glx/Makefile.am
|
||||
new file mode 100644
|
||||
index 0000000..337f34e
|
||||
diff --git a/va/glx/va_backend_glx.h b/va/glx/va_backend_glx.h
|
||||
new file mode 100644
|
||||
index 0000000..d110485
|
||||
diff --git a/va/glx/va_glx.c b/va/glx/va_glx.c
|
||||
new file mode 100644
|
||||
index 0000000..ec50a0e
|
||||
diff --git a/va/glx/va_glx.h b/va/glx/va_glx.h
|
||||
new file mode 100644
|
||||
index 0000000..1a0624d
|
||||
diff --git a/va/glx/va_glx_impl.c b/va/glx/va_glx_impl.c
|
||||
new file mode 100644
|
||||
index 0000000..b0f24bb
|
||||
diff --git a/va/glx/va_glx_impl.h b/va/glx/va_glx_impl.h
|
||||
new file mode 100644
|
||||
index 0000000..977bfcc
|
||||
diff --git a/va/glx/va_glx_private.h b/va/glx/va_glx_private.h
|
||||
new file mode 100644
|
||||
index 0000000..d416729
|
||||
diff --git a/va/va_backend.h b/va/va_backend.h
|
||||
index ff86744..06fef7f 100644
|
||||
--- a/va/va_backend.h
|
||||
+++ b/va/va_backend.h
|
||||
@@ -365,6 +365,9 @@ struct VADriverVTable
|
||||
unsigned int *chroma_v_offset,
|
||||
void **buffer
|
||||
);
|
||||
+
|
||||
+ /* Optional: GLX support hooks */
|
||||
+ struct VADriverVTableGLX *glx;
|
||||
};
|
||||
|
||||
struct VADriverContext
|
||||
@@ -387,6 +390,7 @@ struct VADriverContext
|
||||
void *handle; /* dlopen handle */
|
||||
|
||||
void *dri_state;
|
||||
+ void *glx; /* opaque for GLX code */
|
||||
};
|
||||
|
||||
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
|
||||
@@ -409,6 +413,8 @@ struct VADisplayContext
|
||||
VADisplayContextP ctx,
|
||||
char **driver_name
|
||||
);
|
||||
+
|
||||
+ void *opaque; /* opaque for display extensions (e.g. GLX) */
|
||||
};
|
||||
|
||||
typedef VAStatus (*VADriverInit) (
|
||||
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
|
||||
index 71cc36f..6826b31 100644
|
||||
--- a/va/x11/va_x11.c
|
||||
+++ b/va/x11/va_x11.c
|
||||
@@ -217,6 +217,7 @@ VADisplay vaGetDisplay (
|
||||
pDisplayContext->vaIsValid = va_DisplayContextIsValid;
|
||||
pDisplayContext->vaDestroy = va_DisplayContextDestroy;
|
||||
pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName;
|
||||
+ pDisplayContext->opaque = NULL;
|
||||
pDisplayContexts = pDisplayContext;
|
||||
pDriverContext->dri_state = dri_state;
|
||||
dpy = (VADisplay)pDisplayContext;
|
1602
packages/multimedia/libva/patches/322_libva_glx.diff
Normal file
1602
packages/multimedia/libva/patches/322_libva_glx.diff
Normal file
File diff suppressed because it is too large
Load Diff
143
packages/multimedia/libva/patches/390_compat.base.diff
Normal file
143
packages/multimedia/libva/patches/390_compat.base.diff
Normal file
@ -0,0 +1,143 @@
|
||||
commit 94db34ae392a7787afac9087799bb0421c844b83
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Jun 24 11:40:56 2009 +0000
|
||||
|
||||
Add compatibility layer with original VA-API 0.29 to 0.31.
|
||||
|
||||
diff --git a/va/Makefile.am b/va/Makefile.am
|
||||
index ebff3d5..1752526 100644
|
||||
--- a/va/Makefile.am
|
||||
+++ b/va/Makefile.am
|
||||
@@ -57,7 +57,7 @@ SUBDIRS = $(libva_x11_backenddir) $(libva_glx_backenddir)
|
||||
|
||||
DIST_SUBDIRS = x11 glx
|
||||
|
||||
-libva_la_SOURCES = va.c va_crystalhd.c
|
||||
+libva_la_SOURCES = va.c va_crystalhd.c va_compat.c
|
||||
|
||||
libvaincludedir = ${includedir}/va
|
||||
libvainclude_HEADERS = va.h va_x11.h va_backend.h va_version.h
|
||||
@@ -67,4 +67,8 @@ DISTCLEANFILES = \
|
||||
|
||||
EXTRA_DIST = \
|
||||
va_version.h.in \
|
||||
- va_crystalhd.h
|
||||
+ va_crystalhd.h \
|
||||
+ va_compat.h \
|
||||
+ va_compat_template.h
|
||||
+
|
||||
+va_compat.c: va_compat_template.h
|
||||
diff --git a/va/va.c b/va/va.c
|
||||
index 0d208d8..ad201fa 100644
|
||||
--- a/va/va.c
|
||||
+++ b/va/va.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "va.h"
|
||||
#include "va_backend.h"
|
||||
#include "va_crystalhd.h"
|
||||
+#include "va_compat.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
@@ -39,6 +40,8 @@
|
||||
|
||||
|
||||
#define DRIVER_INIT_FUNC "__vaDriverInit_0_31"
|
||||
+#define DRIVER_INIT_FUNC_0_29 "__vaDriverInit_0_29"
|
||||
+#define DRIVER_INIT_FUNC_0_30 "__vaDriverInit_0_30"
|
||||
|
||||
#define DRIVER_EXTENSION "_drv_video.so"
|
||||
|
||||
@@ -163,13 +166,24 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
|
||||
{
|
||||
VADriverInit init_func;
|
||||
char driver_init_func_sds[32];
|
||||
+ int compat_version = 0;
|
||||
/* First, try SDS extensions (VDPAU and XvBA backends) */
|
||||
sprintf(driver_init_func_sds, "%s_%d_sds%d",
|
||||
DRIVER_INIT_FUNC, VA_MICRO_VERSION, VA_SDS_VERSION);
|
||||
init_func = (VADriverInit) dlsym(handle, driver_init_func_sds);
|
||||
if (!init_func)
|
||||
{
|
||||
+ /* Otherwise, we need the compatibility layer for some buffers */
|
||||
init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
|
||||
+ compat_version = VA_MINOR_VERSION;
|
||||
+ if (!init_func) {
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_29);
|
||||
+ compat_version = 29;
|
||||
+ }
|
||||
+ if (!init_func) {
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_30);
|
||||
+ compat_version = 30;
|
||||
+ }
|
||||
}
|
||||
if (!init_func)
|
||||
{
|
||||
@@ -178,7 +192,36 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
|
||||
}
|
||||
else
|
||||
{
|
||||
- vaStatus = (*init_func)(ctx);
|
||||
+ struct VADriverContext_0_29 ctx_0_29;
|
||||
+ struct VADriverContext_0_30 ctx_0_30;
|
||||
+ void *compat_ctx = NULL;
|
||||
+
|
||||
+ switch (compat_version) {
|
||||
+ case 29:
|
||||
+ compat_ctx = &ctx_0_29;
|
||||
+ ctx_0_29.pDriverData = NULL;
|
||||
+ ctx_0_29.x11_dpy = ctx->x11_dpy;
|
||||
+ ctx_0_29.x11_screen = ctx->x11_screen;
|
||||
+ break;
|
||||
+ case 30:
|
||||
+ compat_ctx = &ctx_0_30;
|
||||
+ ctx_0_30.pDriverData = NULL;
|
||||
+ ctx_0_30.x11_dpy = ctx->x11_dpy;
|
||||
+ ctx_0_30.x11_screen = ctx->x11_screen;
|
||||
+ break;
|
||||
+ case VA_MINOR_VERSION:
|
||||
+ compat_ctx = ctx;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ASSERT(compat_version == 0);
|
||||
+ vaStatus = VA_STATUS_ERROR_UNKNOWN;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ vaStatus = (*init_func)(compat_ctx ? compat_ctx : ctx);
|
||||
+
|
||||
+ if (VA_STATUS_SUCCESS == vaStatus)
|
||||
+ vaStatus = va_compat_init(dpy, compat_version, compat_ctx);
|
||||
|
||||
if (VA_STATUS_SUCCESS == vaStatus)
|
||||
{
|
||||
@@ -399,6 +442,8 @@ VAStatus vaTerminate (
|
||||
old_ctx->handle = NULL;
|
||||
}
|
||||
|
||||
+ va_compat_fini(dpy);
|
||||
+
|
||||
if (VA_STATUS_SUCCESS == vaStatus)
|
||||
pDisplayContext->vaDestroy(pDisplayContext);
|
||||
return vaStatus;
|
||||
diff --git a/va/va_backend.h b/va/va_backend.h
|
||||
index 06fef7f..9cf8911 100644
|
||||
--- a/va/va_backend.h
|
||||
+++ b/va/va_backend.h
|
||||
@@ -391,6 +391,7 @@ struct VADriverContext
|
||||
|
||||
void *dri_state;
|
||||
void *glx; /* opaque for GLX code */
|
||||
+ void *compat; /* opaque for compat code */
|
||||
};
|
||||
|
||||
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
|
||||
diff --git a/va/va_compat.c b/va/va_compat.c
|
||||
new file mode 100644
|
||||
index 0000000..af43188
|
||||
diff --git a/va/va_compat.h b/va/va_compat.h
|
||||
new file mode 100644
|
||||
index 0000000..2c9d801
|
||||
diff --git a/va/va_compat_template.h b/va/va_compat_template.h
|
||||
new file mode 100644
|
||||
index 0000000..18349de
|
3214
packages/multimedia/libva/patches/391_compat.diff
Normal file
3214
packages/multimedia/libva/patches/391_compat.diff
Normal file
File diff suppressed because it is too large
Load Diff
183
packages/multimedia/libva/patches/392_compat.dso.diff
Normal file
183
packages/multimedia/libva/patches/392_compat.dso.diff
Normal file
@ -0,0 +1,183 @@
|
||||
commit 23dc87f7a37ea245e9797b947df6fbd3c911dd76
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Fri Oct 16 12:39:06 2009 +0000
|
||||
|
||||
Fix compatibility with older programs linked against libva.so.0.
|
||||
|
||||
diff --git a/va/Makefile.am b/va/Makefile.am
|
||||
index 1752526..f92ba8a 100644
|
||||
--- a/va/Makefile.am
|
||||
+++ b/va/Makefile.am
|
||||
@@ -72,3 +72,8 @@ EXTRA_DIST = \
|
||||
va_compat_template.h
|
||||
|
||||
va_compat.c: va_compat_template.h
|
||||
+
|
||||
+lib_LTLIBRARIES += libva-compat.la
|
||||
+libva_compat_la_SOURCES = va_compat_lib.c
|
||||
+libva_compat_la_LIBADD = libva-x11.la -ldl
|
||||
+libva_compat_la_DEPENDENCIES = libva-x11.la
|
||||
diff --git a/va/va_compat_lib.c b/va/va_compat_lib.c
|
||||
new file mode 100644
|
||||
index 0000000..b7e9ea5
|
||||
--- /dev/null
|
||||
+++ b/va/va_compat_lib.c
|
||||
@@ -0,0 +1,158 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#define _GNU_SOURCE 1
|
||||
+#include <dlfcn.h>
|
||||
+#include <assert.h>
|
||||
+#include <stddef.h>
|
||||
+
|
||||
+typedef void *VADisplay;
|
||||
+typedef int VAStatus;
|
||||
+typedef unsigned int VAGenericID;
|
||||
+typedef VAGenericID VAContextID;
|
||||
+typedef VAGenericID VASurfaceID;
|
||||
+typedef VAGenericID VAImageID;
|
||||
+typedef VAGenericID VASubpictureID;
|
||||
+
|
||||
+#define PREPARE_FUNC(NAME, RET, ARGS) \
|
||||
+ static RET (*lib_##NAME) ARGS; \
|
||||
+ if (lib_##NAME == NULL) \
|
||||
+ lib_##NAME = dlsym(RTLD_NEXT, #NAME); \
|
||||
+ assert(lib_##NAME != NULL)
|
||||
+
|
||||
+VAStatus
|
||||
+vaSyncSurface(
|
||||
+ VADisplay dpy,
|
||||
+ VAContextID context,
|
||||
+ VASurfaceID render_target
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaSyncSurface, VAStatus, (VADisplay, VASurfaceID));
|
||||
+
|
||||
+ return lib_vaSyncSurface(dpy, render_target);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaPutImage(
|
||||
+ VADisplay dpy,
|
||||
+ VASurfaceID surface,
|
||||
+ VAImageID image,
|
||||
+ int src_x,
|
||||
+ int src_y,
|
||||
+ unsigned int width,
|
||||
+ unsigned int height,
|
||||
+ int dest_x,
|
||||
+ int dest_y
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaPutImage, VAStatus, (VADisplay, VASurfaceID, VAImageID,
|
||||
+ int, int, unsigned int, unsigned int,
|
||||
+ int, int, unsigned int, unsigned int));
|
||||
+
|
||||
+ return lib_vaPutImage(dpy, surface, image,
|
||||
+ src_x, src_y, width, height,
|
||||
+ dest_x, dest_y, width, height);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaPutImage2(
|
||||
+ VADisplay dpy,
|
||||
+ VASurfaceID surface,
|
||||
+ VAImageID image,
|
||||
+ int src_x,
|
||||
+ int src_y,
|
||||
+ unsigned int src_width,
|
||||
+ unsigned int src_height,
|
||||
+ int dest_x,
|
||||
+ int dest_y,
|
||||
+ unsigned int dest_width,
|
||||
+ unsigned int dest_height
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaPutImage, VAStatus, (VADisplay, VASurfaceID, VAImageID,
|
||||
+ int, int, unsigned int, unsigned int,
|
||||
+ int, int, unsigned int, unsigned int));
|
||||
+
|
||||
+ return lib_vaPutImage(dpy, surface, image,
|
||||
+ src_x, src_y, src_width, src_height,
|
||||
+ dest_x, dest_y, dest_width, dest_height);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaAssociateSubpicture(
|
||||
+ VADisplay dpy,
|
||||
+ VASubpictureID subpicture,
|
||||
+ VASurfaceID *target_surfaces,
|
||||
+ int num_surfaces,
|
||||
+ short src_x,
|
||||
+ short src_y,
|
||||
+ short dest_x,
|
||||
+ short dest_y,
|
||||
+ unsigned short width,
|
||||
+ unsigned short height,
|
||||
+ unsigned int flags
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaAssociateSubpicture,
|
||||
+ VAStatus, (VADisplay, VASubpictureID, VASurfaceID *, int,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ unsigned int));
|
||||
+
|
||||
+ return lib_vaAssociateSubpicture(dpy, subpicture,
|
||||
+ target_surfaces, num_surfaces,
|
||||
+ src_x, src_y, width, height,
|
||||
+ dest_x, dest_y, width, height,
|
||||
+ flags);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaAssociateSubpicture2(
|
||||
+ VADisplay dpy,
|
||||
+ VASubpictureID subpicture,
|
||||
+ VASurfaceID *target_surfaces,
|
||||
+ int num_surfaces,
|
||||
+ short src_x,
|
||||
+ short src_y,
|
||||
+ unsigned short src_width,
|
||||
+ unsigned short src_height,
|
||||
+ short dest_x,
|
||||
+ short dest_y,
|
||||
+ unsigned short dest_width,
|
||||
+ unsigned short dest_height,
|
||||
+ unsigned int flags
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaAssociateSubpicture,
|
||||
+ VAStatus, (VADisplay, VASubpictureID, VASurfaceID *, int,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ unsigned int));
|
||||
+
|
||||
+ return lib_vaAssociateSubpicture(dpy, subpicture,
|
||||
+ target_surfaces, num_surfaces,
|
||||
+ src_x, src_y, src_width, src_height,
|
||||
+ dest_x, dest_y, dest_width, dest_height,
|
||||
+ flags);
|
||||
+}
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
http://www.splitted-desktop.com/~gbeauchesne/libva/libva_0.31.0-1+sds9.tar.gz
|
||||
http://www.splitted-desktop.com/~gbeauchesne/libva/libva_0.31.0-1+sds12.tar.gz
|
@ -4,14 +4,10 @@
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build expat
|
||||
$SCRIPTS/build gettext
|
||||
$SCRIPTS/build libdaemon
|
||||
$SCRIPTS/build dbus
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
export LDFLAGS="$LDFLAGS -lintl"
|
||||
|
||||
py_cv_mod_gtk_=yes \
|
||||
py_cv_mod_dbus_=yes \
|
||||
./configure --host=$TARGET_NAME \
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
$SCRIPTS/install expat
|
||||
$SCRIPTS/install libdaemon
|
||||
$SCRIPTS/install gettext
|
||||
$SCRIPTS/install dbus
|
||||
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
|
@ -3,11 +3,11 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build libnl
|
||||
$SCRIPTS/build dbus
|
||||
$SCRIPTS/build udev
|
||||
$SCRIPTS/build busybox
|
||||
#$SCRIPTS/build bluez
|
||||
$SCRIPTS/build gettext
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
@ -29,24 +29,22 @@ cd $PKG_BUILD
|
||||
--disable-resolvconf \
|
||||
--enable-loopback \
|
||||
--enable-dnsproxy \
|
||||
--disable-hso \
|
||||
--disable-mbm \
|
||||
--enable-portal \
|
||||
--disable-iwmx \
|
||||
--disable-iospm \
|
||||
--disable-polkit \
|
||||
--enable-client \
|
||||
--disable-tools \
|
||||
--enable-tools \
|
||||
--disable-fake \
|
||||
--enable-udev \
|
||||
--disable-datafiles \
|
||||
--enable-datafiles \
|
||||
--disable-silent-rules \
|
||||
--with-udhcpc=/sbin/udhcpc \
|
||||
--disable-gtk-doc \
|
||||
--disable-openconnect \
|
||||
--disable-google \
|
||||
--disable-moblin \
|
||||
--disable-test \
|
||||
--enable-meego \
|
||||
--enable-test \
|
||||
--disable-capng \
|
||||
|
||||
make
|
||||
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
. config/options
|
||||
|
||||
#$SCRIPTS/install hal
|
||||
$SCRIPTS/install libnl
|
||||
$SCRIPTS/install dbus
|
||||
$SCRIPTS/install udev
|
||||
$SCRIPTS/install dbus-python
|
||||
#$SCRIPTS/install bluez
|
||||
$SCRIPTS/install wpa_supplicant
|
||||
$SCRIPTS/install gettext
|
||||
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
|
||||
@ -17,11 +17,26 @@ add_group system 430
|
||||
mkdir -p $INSTALL/usr/sbin
|
||||
cp -P $PKG_BUILD/src/connmand $INSTALL/usr/sbin
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/client/cm $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/addr-test $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/dbus-test $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/polkit-test $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/portal-test $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/supplicant-test $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/tap-test $INSTALL/usr/bin/connman
|
||||
cp -P $PKG_BUILD/tools/wifi-scan $INSTALL/usr/bin/connman
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/connman/plugins
|
||||
cp -P $PKG_BUILD/plugins/.libs/*.so $INSTALL/usr/lib/connman/plugins
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/connman/scripts
|
||||
cp -P $PKG_BUILD/scripts/udhcpc-script $INSTALL/usr/lib/connman/scripts
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/connman/test
|
||||
cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/connman/test
|
||||
|
||||
mkdir -p $INSTALL/etc/dbus-1/system.d
|
||||
cp -P $PKG_BUILD/src/connman-dbus.conf $INSTALL/etc/dbus-1/system.d
|
||||
cp -P $PKG_BUILD/src/connman.conf $INSTALL/etc/dbus-1/system.d
|
||||
|
@ -1 +1 @@
|
||||
http://www.kernel.org/pub/linux/network/connman/connman-0.50.tar.bz2
|
||||
http://www.kernel.org/pub/linux/network/connman/connman-0.51.tar.bz2
|
||||
|
@ -3,7 +3,6 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build gettext
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
@ -12,8 +11,6 @@ cd $PKG_BUILD
|
||||
--sysconfdir=/etc \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--disable-nls \
|
||||
--enable-extra-encodings
|
||||
|
||||
make
|
||||
|
6
packages/network/libnl/install
Executable file
6
packages/network/libnl/install
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/lib/*.so* $INSTALL/usr/lib/
|
@ -0,0 +1,11 @@
|
||||
diff -Naur libnl-1.1/include/netlink-local.h libnl-1.1.patch/include/netlink-local.h
|
||||
--- libnl-1.1/include/netlink-local.h 2008-01-14 16:48:45.000000000 +0100
|
||||
+++ libnl-1.1.patch/include/netlink-local.h 2010-04-13 20:34:38.502955161 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
+#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
1
packages/network/libnl/url
Normal file
1
packages/network/libnl/url
Normal file
@ -0,0 +1 @@
|
||||
https://launchpad.net/ubuntu/hardy/+source/libnl/1.1-1/+files/libnl_1.1.orig.tar.gz
|
@ -3,7 +3,6 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build libiconv
|
||||
$SCRIPTS/build avahi
|
||||
|
||||
export samba_cv_CC_NEGATIVE_ENUM_VALUES=no
|
||||
@ -34,7 +33,6 @@ cd $PKG_BUILD/source3
|
||||
--without-quotas \
|
||||
--without-sys-quotas \
|
||||
--with-syslog \
|
||||
--with-libiconv=$SYSROOT_PREFIX/usr \
|
||||
|
||||
make bin/libsmbclient.so \
|
||||
bin/smbd
|
||||
|
75
packages/network/samba/config/samba.conf.sample
Normal file
75
packages/network/samba/config/samba.conf.sample
Normal file
@ -0,0 +1,75 @@
|
||||
[global]
|
||||
server string = OpenELEC.tv Mediacenter(%i)
|
||||
workgroup = WORKGROUP
|
||||
netbios name = openelec
|
||||
security = share
|
||||
guest account = root
|
||||
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
|
||||
wins support = no
|
||||
syslog only = yes
|
||||
|
||||
# here you can add a writable share of a disk under /storage
|
||||
|
||||
[Update]
|
||||
path = /storage/.update
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/.update
|
||||
|
||||
[Videos]
|
||||
path = /storage/videos
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/videos
|
||||
|
||||
[Music]
|
||||
path = /storage/music
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/music
|
||||
|
||||
[TV Shows]
|
||||
path = /storage/tvshows
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/tvshows
|
||||
|
||||
[Downloads]
|
||||
path = /storage/downloads
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/downloads
|
||||
|
||||
[Pictures]
|
||||
path = /storage/pictures
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/pictures
|
||||
|
||||
[Configfiles]
|
||||
path = /storage/.config
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/.config
|
||||
|
||||
[Screenshots]
|
||||
path = /storage/screenshots
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/screenshots
|
@ -1,26 +1,75 @@
|
||||
[global]
|
||||
server string = OpenELEC.tv Mediacenter(%i)
|
||||
workgroup = WORKGROUP
|
||||
netbios name = openelec
|
||||
security = share
|
||||
guest account = root
|
||||
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
|
||||
wins support = no
|
||||
syslog only = yes
|
||||
|
||||
[Storage]
|
||||
path = /storage
|
||||
# here you can add a writable share of a disk under /storage
|
||||
|
||||
[Update]
|
||||
path = /storage/.update
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/.update
|
||||
|
||||
# To add a writable share of a disk under /mnt uncomment and edit the
|
||||
# following share declaration
|
||||
# 'mydisk' is the disk name as seen by OpenELEC
|
||||
;[mydisk]
|
||||
; path = /mnt/mydisk
|
||||
; available = yes
|
||||
; browsable = yes
|
||||
; public = yes
|
||||
; writable = yes
|
||||
; root preexec = /usr/bin/rw /mnt/mydisk
|
||||
; root postexec = /usr/bin/ro /mnt/mydisk
|
||||
[Videos]
|
||||
path = /storage/videos
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/videos
|
||||
|
||||
[Music]
|
||||
path = /storage/music
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/music
|
||||
|
||||
[TV Shows]
|
||||
path = /storage/tvshows
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/tvshows
|
||||
|
||||
[Downloads]
|
||||
path = /storage/downloads
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/downloads
|
||||
|
||||
[Pictures]
|
||||
path = /storage/pictures
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/pictures
|
||||
|
||||
[Configfiles]
|
||||
path = /storage/.config
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/.config
|
||||
|
||||
[Screenshots]
|
||||
path = /storage/screenshots
|
||||
available = yes
|
||||
browsable = yes
|
||||
public = yes
|
||||
writable = yes
|
||||
root preexec = mkdir -p /storage/screenshots
|
||||
|
@ -5,5 +5,16 @@
|
||||
(
|
||||
progress "Starting Samba server"
|
||||
|
||||
smbd -D > /dev/null 2>&1
|
||||
SMB_USERCONF="/storage/.config/samba.conf"
|
||||
SMB_DEFCONF="/etc/samba/smb.conf"
|
||||
SMB_ARG="--daemon"
|
||||
|
||||
if [ -f $SMB_USERCONF ]; then
|
||||
SMB_ARG="$SMB_ARG --configfile=$SMB_USERCONF"
|
||||
else
|
||||
SMB_ARG="$SMB_ARG --configfile=$SMB_DEFCONF"
|
||||
fi
|
||||
|
||||
smbd $SMB_ARG > /dev/null 2>&1
|
||||
|
||||
)&
|
||||
|
@ -2,20 +2,22 @@
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install libiconv
|
||||
$SCRIPTS/install avahi
|
||||
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/source3/bin/libsmbclient.so* $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/source3/bin/libtalloc.so* $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/source3/bin/libtdb.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/source3/bin/libsmbclient.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/source3/bin/libtalloc.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/source3/bin/libtdb.so* $INSTALL/usr/lib
|
||||
|
||||
mkdir -p $INSTALL/usr/config
|
||||
cp -P $PKG_DIR/config/samba.conf.sample $INSTALL/usr/config
|
||||
|
||||
if [ "$SAMBA_SERVER" = yes ]; then
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp $PKG_BUILD/source3/bin/smbd $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/source3/bin/smbd $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/etc/samba
|
||||
cp $PKG_DIR/config/smb.conf $INSTALL/etc/samba
|
||||
cp -P $PKG_DIR/config/smb.conf $INSTALL/etc/samba
|
||||
fi
|
||||
|
20
packages/network/wicd/build
Executable file
20
packages/network/wicd/build
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build Python
|
||||
|
||||
. config/options.python
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
$PYTHON setup.py configure
|
||||
$PYTHON setup.py build
|
||||
|
||||
$PYTHON setup.py install -O1 --skip-build --prefix /usr --root .install
|
||||
|
||||
find .install -name "*.py" -exec rm -rf "{}" ";"
|
||||
find .install -name "*.pyo" -exec rm -rf "{}" ";"
|
||||
|
||||
rm -rf .install/usr/bin
|
7
packages/network/wicd/install
Executable file
7
packages/network/wicd/install
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install Python
|
||||
|
||||
cp -PR $PKG_BUILD/.install/* $INSTALL
|
1
packages/network/wicd/url
Normal file
1
packages/network/wicd/url
Normal file
@ -0,0 +1 @@
|
||||
http://downloads.sourceforge.net/project/wicd/wicd-stable/wicd-1.7.0/wicd-1.7.0.tar.bz2
|
@ -3,5 +3,4 @@
|
||||
. config/options
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
|
||||
cp $PKG_BUILD/wpa_supplicant/wpa_supplicant $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/wpa_supplicant/wpa_supplicant $INSTALL/usr/bin
|
||||
|
@ -1 +1 @@
|
||||
http://hostap.epitest.fi/releases/wpa_supplicant-0.6.9.tar.gz
|
||||
http://hostap.epitest.fi/releases/wpa_supplicant-0.7.1.tar.gz
|
||||
|
@ -5,6 +5,7 @@
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build Python
|
||||
$SCRIPTS/build dbus
|
||||
$SCRIPTS/build dbus-glib
|
||||
|
||||
. config/options.python
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
$SCRIPTS/install Python
|
||||
$SCRIPTS/install dbus
|
||||
$SCRIPTS/install dbus-glib
|
||||
|
||||
PYTHON_LIB_DIR=`ls -d $INSTALL/usr/lib/python*`
|
||||
|
||||
|
@ -4,10 +4,8 @@
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build flex
|
||||
$SCRIPTS/build gettext
|
||||
|
||||
cd $PKG_BUILD
|
||||
LDFLAGS="$LDFLAGS -lintl" \
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user