summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing')
-rw-r--r--abs/core-testing/LinHES-config/LinHES-release6
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/install_functions.sh37
-rwxr-xr-xabs/core-testing/LinHES-config/install_proxy.sh11
-rw-r--r--abs/core-testing/LinHES-config/myth_user_call12
-rw-r--r--abs/core-testing/LinHES-config/networkconfig.sh84
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.sh46
-rw-r--r--abs/core-testing/LinHES-config/templates/modules/lirc_i2c.conf2
-rw-r--r--abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircd.conf199
-rw-r--r--abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircrc505
-rw-r--r--abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/preview.jpgbin0 -> 45763 bytes
-rw-r--r--abs/core-testing/LinHES-config/templates/remotes/i2c.id5
-rwxr-xr-xabs/core-testing/LinHES-config/templates/samba/smb.conf.home2
-rwxr-xr-xabs/core-testing/LinHES-config/templates/samba/smb.conf.media2
-rw-r--r--abs/core-testing/LinHES-system/PKGBUILD4
-rwxr-xr-xabs/core-testing/LinHES-system/load-modules-mythvantage.sh32
-rw-r--r--abs/core-testing/lighttpd/PKGBUILD7
-rw-r--r--abs/core-testing/lighttpd/_changelog1
-rw-r--r--abs/core-testing/lighttpd/auth-inc.conf12
-rw-r--r--abs/core-testing/lighttpd/lighttpd.conf12
-rw-r--r--abs/core-testing/lighttpd/lighttpd.install18
-rw-r--r--abs/core-testing/linhes-live/PKGBUILD2
-rw-r--r--abs/core-testing/linhes-live/etc/live-shutdown46
-rwxr-xr-xabs/core-testing/linhes-live/etc/rc.shutdown-live2
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/DeviceReadBuffer-polltimeout.2.patch219
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv-svn/PKGBUILD78
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/aacdecoder.cpp.patch12
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/hdpvr-v4lchannel-tweak.patch139
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/HOST_SETTINGS.xml87
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/is.xml33
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/knoppmyth.xml55
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/library.xml.patch13
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/mainmenu.xml.patch16
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/motion.xml20
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/optical_menu.xml.patch15
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/setup.xml111
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/siriusmenu.xml419
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/xmmenu.xml574
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/mpegrecorder-hdpvr-v1.1.patch658
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv-svn/myth.sh4
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv-svn/mythbackend37
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv-svn/mythbackend.sh117
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/mythcommflag-avidemux.2.patch179
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv-svn/mythtv.install55
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/patches/DeviceReadBuffer-polltimeout.2.patch219
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/patches/aacdecoder.cpp.patch12
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/patches/hdpvr-v4lchannel-tweak.patch139
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/patches/mpegrecorder-hdpvr-v1.1.patch658
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/patches/mythcommflag-avidemux.2.patch179
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/smolt_jump.patch30
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv-svn/svn_main_menu_popup.patch211
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv-themes/PKGBUILD36
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mytharchive/PKGBUILD41
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythbrowser/PKGBUILD35
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythcontrols/PKGBUILD35
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythflix/PKGBUILD34
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythgallery/PKGBUILD36
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythgame/PKGBUILD36
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythmovietime/PKGBUILD36
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythmusic/PKGBUILD41
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythmusic/music_flac.patch293
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythnews/PKGBUILD34
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythphone/PKGBUILD42
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythvideo/PKGBUILD36
-rw-r--r--abs/core-testing/mythtv/trunk/plugins/mythweather/PKGBUILD35
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/PKGBUILD35
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/dblogininit.inc6
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/mythweb.install37
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/mythweblighttpd.patch13
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/xris/dblogininit.inc6
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/xris/lighttpd.conf332
-rwxr-xr-xabs/core-testing/mythtv/trunk/plugins/mythweb/xris/mythweblighttpd.patch16
-rw-r--r--abs/core-testing/nvidia-beta/NVIDIA_kernel-169.12-2286310.diff637
-rw-r--r--abs/core-testing/nvidia-beta/PKGBUILD38
-rw-r--r--abs/core-testing/nvidia-beta/nvidia.install22
-rw-r--r--abs/core-testing/nvidia-utils-beta/PKGBUILD67
-rw-r--r--abs/core-testing/nvidia-utils-beta/nvidia.install40
-rw-r--r--abs/core-testing/nvidia-utils-beta/supported-cards.txt292
-rw-r--r--abs/core-testing/nvidia/PKGBUILD2
-rw-r--r--abs/core-testing/read-edid-2.0.0.tar.gzbin0 -> 82282 bytes
-rwxr-xr-xabs/core-testing/runit-scripts/PKGBUILD2
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/12
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/evrouter/finish10
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/evrouter/run12
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/lircd/run4
-rw-r--r--abs/core-testing/runit-scripts/runitscripts/services/ncid/finish9
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/ncid/run11
-rw-r--r--abs/core-testing/runit-scripts/runitscripts/services/ncidd/finish9
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/ncidd/run6
-rw-r--r--abs/core-testing/sysvinit/PKGBUILD2
-rw-r--r--abs/core-testing/sysvinit/halt-init.patch4
-rw-r--r--abs/core-testing/vi/PKGBUILD2
92 files changed, 7628 insertions, 96 deletions
diff --git a/abs/core-testing/LinHES-config/LinHES-release b/abs/core-testing/LinHES-config/LinHES-release
index c63627b..fc10c90 100644
--- a/abs/core-testing/LinHES-config/LinHES-release
+++ b/abs/core-testing/LinHES-config/LinHES-release
@@ -1 +1,5 @@
-LinHES R6.00.04
+<<<<<<< HEAD:abs/core-testing/LinHES-config/LinHES-release
+LinHES R6.00.05
+=======
+LinHES R6.00.04
+>>>>>>> origin/HEAD:abs/core-testing/LinHES-config/LinHES-release
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 706dc4c..543d182 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=1.0
-pkgrel=60
+pkgrel=103
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan )
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh
index 3e7f8f8..d976dbb 100755
--- a/abs/core-testing/LinHES-config/install_functions.sh
+++ b/abs/core-testing/LinHES-config/install_functions.sh
@@ -35,7 +35,7 @@ update_db_settings Theme "$pick"
function setupremote {
- [ -e $BASE/etc/lircd.conf ] && mv -f $BASE/etc/lircd.conf $BASE/etc/lircd.conf.`date +%Y-%m-%d-%H-%M`
+ [ -e $BASE/etc/lircd.conf ] && mv -f $BASE/etc/lircd.conf $BASE/etc/lircd.conf.`date +%Y-%m-%d-%H-%M`
if [ -d $TEMPLATES/remotes/$Remotetype ]
then
cd $TEMPLATES/remotes/$Remotetype
@@ -50,16 +50,40 @@ function setupremote {
echo "Starting with support for $Remotetype"
if [ x$Remotetype = "xdvico" ]
then
- /usr/sbin/lircd -d /dev/usb/hiddev0
+ /usr/sbin/lircd -d /dev/usb/hiddev0
else
/usr/sbin/lircd -d /dev/lirc0
fi
[ -e /root/.mythtv ] || mkdir /root/.mythtv 2>/dev/null
- ln -s /etc/lircrc /root/.mythtv/lircrc 2>/dev/null
+ ln -s /etc/lircrc /root/.mythtv/lircrc 2>/dev/null
+ else
+ echo "Couldn't open directory $TEMPLATES/remotes/$Remotetype"
fi
}
+function scan_for_hpg_receiver() {
+echo "Scanning for Hauppauge receiver"
+for hpgid in `lspci -nm -d4444: |cut -d" " -f6- |tr -d '"'|tr " " :`
+do
+ line=`grep $hpgid $TEMPLATES/remotes/i2c.id`
+ if [ $? = 0 ]
+ then
+ modprobe lirc_i2c
+ FoundReceiverType=`echo "$line"|cut -d"|" -f2`
+ Remotetype=`echo "$line"|cut -d"|" -f4`
+ statusline=`echo "$line"|cut -d"|" -f2,4`
+ echo "Found $statusline , $Remotetype"
+ update_db_settings HostReceiverType $FoundReceiverType
+ setupremote
+ break
+ fi
+
+done
+}
+
+
function scan_for_usb_remote () {
+found_remote=1
echo "Scanning for usb receiver/remote"
while read line
do
@@ -68,11 +92,16 @@ do
if [ $? = 0 ]
then
Remotetype=`echo "$line"|cut -d"|" -f2`
- echo "found $Remotetype"
+ echo "Found $Remotetype"
setupremote
+ found_remote=0
break
fi
done <$BASE/$TEMPLATES/remotes/receiver_usb.id
+if [ $found_remote = 1 ]
+then
+ scan_for_hpg_receiver
+fi
}
function rest_of_network () {
diff --git a/abs/core-testing/LinHES-config/install_proxy.sh b/abs/core-testing/LinHES-config/install_proxy.sh
index f106b50..e6b0976 100755
--- a/abs/core-testing/LinHES-config/install_proxy.sh
+++ b/abs/core-testing/LinHES-config/install_proxy.sh
@@ -436,6 +436,8 @@ echo "-----------------------------------------------------------------------3--
check_self)
myipdefault=`ifconfig | grep -C1 $default_interface| grep -v $default_interface | cut -d: -f2 | awk '{ print $1}'`
+ echo "network check myself"
+ ifconfig
ping -c 1 $myipdefault
if [ ! $? = 0 ]
then
@@ -445,7 +447,10 @@ echo "-----------------------------------------------------------------------3--
;;
check_gw)
#check gateway
- mygwdefault=`/sbin/route |grep $default_interface|grep UG|awk '{ print $2}'`
+ echo "network check gateway"
+ /sbin/route -n
+ mygwdefault=`/sbin/route -n |grep $default_interface|grep UG|awk '{ print $2}'`
+ echo "Default gateway seems to be $mygwdefault"
if [ ! x$mygwdefault = x ]
then
ping -c 1 $mygwdefault
@@ -457,6 +462,7 @@ echo "-----------------------------------------------------------------------3--
;;
check_ns)
#check nameserver
+ echo " network check nameserver"
mydns=`cat /etc/resolv.conf|grep nameserver|head -1|awk '{ print $2}'`
ping -c 1 $mydns
if [ ! $? = 0 ]
@@ -465,6 +471,7 @@ echo "-----------------------------------------------------------------------3--
fi
;;
check_names)
+ echo "network check resolve names"
host google.com
if [ ! $? = 0 ]
then
@@ -474,7 +481,7 @@ echo "-----------------------------------------------------------------------3--
host_names)
#if host is found, then check to see if it's online
#if not online, assume it's ok to use this hostname
-
+ echo "network check my hostname $hostname"
hout=`host $hostname`
status=$?
#found host, now grab the ip
diff --git a/abs/core-testing/LinHES-config/myth_user_call b/abs/core-testing/LinHES-config/myth_user_call
index d95e468..0479895 100644
--- a/abs/core-testing/LinHES-config/myth_user_call
+++ b/abs/core-testing/LinHES-config/myth_user_call
@@ -63,7 +63,14 @@ function pass_change() {
function web_security {
- echo "this is just a stub"
+
+ grep -q ${USERNAME}: /etc/lighttpd/lighttpd.user
+ if [ $? = 0 ]
+ then
+ #delete user
+ sed -i "/${USERNAME}\:/d" /etc/lighttpd/lighttpd.user
+ fi
+ echo "${USERNAME}:${PASSWORD}" >> /etc/lighttpd/lighttpd.user
}
@@ -155,7 +162,8 @@ case $OPERATION in
then
print_help
fi
- echo "adding webUSERNAME $USERNAME with $PASS"
+ echo "adding webUSERNAME $USERNAME with pass $PASSWORD"
+ web_security
;;
*) print_help
;;
diff --git a/abs/core-testing/LinHES-config/networkconfig.sh b/abs/core-testing/LinHES-config/networkconfig.sh
index 61a7405..23e3774 100644
--- a/abs/core-testing/LinHES-config/networkconfig.sh
+++ b/abs/core-testing/LinHES-config/networkconfig.sh
@@ -6,7 +6,7 @@ ETCNETDIR=$BASE/etc/net/ifaces
-function kill_dhcp ()
+function kill_dhcp ()
{
for i in ${BASE}/etc/dhcpc/dhcpcd-*.pid
do
@@ -19,12 +19,12 @@ do
if [ x$1 = xflush ]
then
for ifdev in eth0 wlan0 eth1 wlan1
- do
+ do
echo ${i} |grep $ifdev
status=$?
if [ $status = 1 ]
then
- ip address flush $ifdev
+ ip address flush $ifdev
fi
done
fi
@@ -43,6 +43,22 @@ fi
}
+function change_iface_state () {
+ if [ x$2 = xenabled ]
+ then
+ echo "setting $1 to active"
+ sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
+ sed -i -e 's/^DISABLED=.*$/DISABLED=no/g' $ETCNETDIR/$1/options
+ else
+ echo "setting $1 to inactive"
+ sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
+ sed -i -e 's/^DISABLED=.*$/DISABLED=yes/g' $ETCNETDIR/$1/options
+ /sbin/ifconfig $1 down
+ ip address flush $1
+ fi
+
+}
+
function setup_interfaces() {
local IS_WIRELESS
local ip
@@ -65,7 +81,7 @@ function setup_interfaces() {
TEMPNET=Hostnetmask$1
eval netmask=\$${TEMPNET}
netmask=`echo "$netmask" | cut -d " " -f1`
-
+
TEMPNET=HostActive$1
eval isactive=\$${TEMPNET}
@@ -78,24 +94,28 @@ function setup_interfaces() {
TEMPNET=HostGW$1
eval GW=\$${TEMPNET}
+ TEMPNET=HOST_iswireless$1
+ eval wireless=\$${TEMPNET}
+
+
- if [ $1 = wlan0 -o $1 = wlan1 ]
+ if [ x$wireless = x1 ]
then
IS_WIRELESS=TRUE
TEMPNET=HostESSID$1
eval ESSID=\$${TEMPNET}
-
+
TEMPNET="HostKey"$1
eval KEY=\$${TEMPNET}
-
+
TEMPNET=HostUseEncryption$1
eval ENCRYPT=\$${TEMPNET}
fi
-
+
echo "Setup $1 in progress, wireless: $IS_WIRELESS"
-
+
if [ ! -d $ETCNETDIR/$1 ]
then
mkdir -p $ETCNETDIR/$1
@@ -106,14 +126,17 @@ function setup_interfaces() {
cp -f $TEMPLATES/etcnet/eth/options $ETCNETDIR/$1/options
fi
- if [ x$isactive = x0 ]
+ if [ x$isactive = x1 ]
then
- echo "setting $1 to inactive"
- sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
-
+ change_iface_state $1 enabled
+ #echo "setting $1 to active"
+ #sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
+ #sed -i -e 's/^DISABLED=.*$/DISABLED=no/g' $ETCNETDIR/$1/options
else
- echo "setting $1 to active"
- sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
+ change_iface_state $1 disabled
+ #echo "setting $1 to inactive"
+ #sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
+ #sed -i -e 's/^DISABLED=.*$/DISABLED=yes/g' $ETCNETDIR/$1/options
fi
if [ x$IS_WIRELESS = xTRUE ]
@@ -126,7 +149,7 @@ function setup_interfaces() {
then
echo "key $KEY" >> $ETCNETDIR/$1/iwconfig
fi
-
+
else
echo "disabling wireless"
sed -i -e 's/^CONFIG_WIRLESS=.*$/CONFIG_WIRLESS=no/g' $ETCNETDIR/$1/options
@@ -135,11 +158,11 @@ function setup_interfaces() {
- if [ $UseDHCP = 0 ]
+ if [ x$UseDHCP = x0 ]
then
echo using dhcp
sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=dhcp/g' $ETCNETDIR/$1/options
-
+
else
echo "using static ip"
sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=static/g' $ETCNETDIR/$1/options
@@ -160,15 +183,20 @@ if [ x$MYTHDHCP = x1 ]
echo "nameserver 127.0.0.1" >> ${BASE}/etc/resolv.conf
fi
-for i in eth0 eth1 wlan0 wlan1
+for i in eth0 eth1 wlan0 wlan1
do
CURRENTIF="HostActive"$i
eval IFSTATE=\$${CURRENTIF}
+ echo $IFSTATE "---"
+ echo $i
if [ x$IFSTATE = x1 ]
then
setup_interfaces $i
+ else
+ change_iface_state $i disabled
fi
done
+
}
function setup_hostname {
@@ -219,33 +247,35 @@ function setup_MYTH_vars {
TEMPMYTH="Hostip"$default_interface
#echo $TEMPMYTH
eval MYTHIP=\$${TEMPMYTH}
-
+
TEMPMYTH="HostUSEDHCP"$default_interface
eval MYTHDHCP=\$${TEMPMYTH}
-
+
}
-function setup_network {
- setup_MYTH_vars
- setup_hostname
- find_active
-}
function start_network {
if [ ! $USEVNC = 0 ]
then
+ /etc/net/scripts/network.init reload
/etc/net/scripts/network.init restart
-
else
echo "VNC/NETBOOT in use, will NOT restart network"
fi
}
+function setup_network {
+ setup_MYTH_vars
+ setup_hostname
+ find_active
+}
+
+
function stop_network {
if [ ! $USEVNC = 0 ]
then
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh
index 6c72b92..3aac497 100755
--- a/abs/core-testing/LinHES-config/systemconfig.sh
+++ b/abs/core-testing/LinHES-config/systemconfig.sh
@@ -163,13 +163,20 @@ function setupreceiver {
Serial) echo "setup serial lirc"
sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
echo "lirc_serial #lirc" >> ${BASE}/etc/modules.mythvantage
- /usr/bin/load-modules-mythvantage.sh
+ load-modules-mythvantage.sh
;;
Usb-imon) echo "setup receiver-usb-imon"
sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
echo "lirc_imon #lirc" >> ${BASE}/etc/modules.mythvantage
- /usr/bin/load-modules-mythvantage.sh
+ load-modules-mythvantage.sh
;;
+ Hauppauge) echo "setup hauppauge reciever (lirc_i2c)"
+ sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
+ echo "lirc_i2c #lirc" >> ${BASE}/etc/modules.mythvantage
+ cp $TEMPLATES/modules/lirc_i2c.conf ${BASE}/etc/modprobe.d/lirc_i2c.conf
+ rmmod lirc_i2c 2>/dev/null
+ load-modules-mythvantage.sh
+ ;;
*) sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
;;
esac
@@ -210,7 +217,7 @@ function setupremote {
if [ ! -d /home/mythtv/.mythtv ]
then
mkdir /home/mythtv/.mythtv
- chown mythtv:mythtv /home/mythtv/.mythtv
+ chown mythtv:mythtv /home/mythtv/.mythtv
fi
ln -s /etc/lircrc /home/mythtv/.mythtv/lircrc 2> /dev/null
@@ -220,7 +227,7 @@ function setupremote {
ln -s /etc/lircrc /home/mythtv/.lircrc 2> /dev/null
fi
-
+
;;
esac
@@ -272,7 +279,7 @@ function setupLCD {
;;
xno_lcd) echo "disabling lcd"
sv down lcdd
- /usr/bin/load-modules-mythvantage.sh UNLOAD LCD
+ load-modules-mythvantage.sh UNLOAD LCD
sed -i -e '/.*#LCD/d' ${BASE}/etc/modules.mythvantage
daemon_remove="lcdd $daemon_remove"
;;
@@ -292,7 +299,7 @@ function setupLCD {
cp -f $TEMPLATES/LCD/$LCDtype/LCDd.conf /etc
# install="lcdproc $install"
daemon_add="lcdd $daemon_add"
- /usr/bin/load-modules-mythvantage.sh
+ load-modules-mythvantage.sh
RESTART_FE="true"
RESTART_LCD="true"
fi
@@ -658,6 +665,14 @@ then
ser_remove="ncid $ser_remove"
fi
+
+if [ x$UseEvrouter = x1 ]
+then
+ ser_install="evrouter Xvfb $ser_install"
+ else
+ ser_remove="evrouter $ser_remove"
+fi
+
#Setting the default, just to avoid the or statement..
#if [ x$UseHobbit = x ]
#then
@@ -973,6 +988,18 @@ do
done
}
+function setup_web_auth {
+ if [ x$UseMythWEB_auth = x1 ]
+ then
+ #enable auth
+ sed -ie "s/^.*include.*auth-inc.conf.*$/include \"\/etc\/lighttpd\/auth-inc.conf\"/g" /etc/lighttpd/lighttpd.conf
+ else
+ #disable auth
+ sed -ie "s/^.*include.*auth-inc.conf.*$/#include \"\/etc\/lighttpd\/auth-inc.conf\"/g" /etc/lighttpd/lighttpd.conf
+ fi
+ sudo sv restart lighttpd
+
+}
#----------------------------------------------------MAIN PROGRAM-------------------------------------------
#misc,sleep,hostype,advanced,audio
@@ -1004,6 +1031,8 @@ for i in $LIST
;;
advancedX) showX="true"
;;
+ webuser) setup_web_auth
+ ;;
restartfe) killall -9 mythfrontend
killall -9 mythwelcome
exit 0
@@ -1052,6 +1081,7 @@ then
then
echo "loading network"
${BASE}/etc/net/scripts/network.init reload
+ ${BASE}/etc/net/scripts/network.init restart
else
echo "netboot, will not start network"
fi
@@ -1269,6 +1299,6 @@ case $SystemType in
;;
esac
echo $MVRELEASE > /etc/os_myth_release
-echo "systemtype=$smoltsystem" > /data/home/mythtv/.mythtv/smolt.info
-echo "remote=$Remotetype" >> /data/home/mythtv/.mythtv/smolt.info
+echo "systemtype=$smoltsystem" > /home/mythtv/.mythtv/smolt.info 2>/dev/null
+echo "remote=$Remotetype" >> /home/mythtv/.mythtv/smolt.info 2>/dev/null
diff --git a/abs/core-testing/LinHES-config/templates/modules/lirc_i2c.conf b/abs/core-testing/LinHES-config/templates/modules/lirc_i2c.conf
new file mode 100644
index 0000000..7b99f78
--- /dev/null
+++ b/abs/core-testing/LinHES-config/templates/modules/lirc_i2c.conf
@@ -0,0 +1,2 @@
+alias char-major-61 lirc_i2c
+options lirc_i2c debug=0 minor=3
diff --git a/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircd.conf b/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircd.conf
new file mode 100644
index 0000000..c0849ef
--- /dev/null
+++ b/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircd.conf
@@ -0,0 +1,199 @@
+#
+# this config file was automatically generated
+# using lirc-0.5.5pre8 on Sun Apr 18 11:43:45 1999
+#
+# contributed by Jens Leuschner <leuschner@gmx.net>
+#
+# brand: Hauppauge
+# model:
+# supported devices: WinTV primo; WinTV pci; WinTV radio
+#
+# This config file will work with both homebrew receivers and
+# original Hauppauge TV cards !!!
+#
+
+begin remote
+
+ name Hauppauge
+ bits 13
+ flags SHIFT_ENC
+ eps 30
+ aeps 100
+
+ one 950 830
+ zero 950 830
+ plead 960
+ gap 89584
+ repeat_bit 2
+
+ begin codes
+ TV 0x000000000000100F
+ RADIO 0x000000000000100C
+ FULL_SCREEN 0x000000000000102E
+ CH+ 0x0000000000001020
+ CH- 0x0000000000001021
+ VOL- 0x0000000000001011
+ VOL+ 0x0000000000001010
+ MUTE 0x000000000000100D
+ SOURCE 0x0000000000001022
+ 1 0x0000000000001001
+ 2 0x0000000000001002
+ 3 0x0000000000001003
+ 4 0x0000000000001004
+ 5 0x0000000000001005
+ 6 0x0000000000001006
+ 7 0x0000000000001007
+ 8 0x0000000000001008
+ 9 0x0000000000001009
+ 0 0x0000000000001000
+ RESERVED 0x000000000000101E
+ MINIMIZE 0x0000000000001026
+ end codes
+
+end remote
+
+
+#
+# this config file was automatically generated
+# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003
+#
+# contributed by
+#
+# brand: Hauppauge
+# model no. of remote control:
+# devices being controlled by this remote: PVR 2/350
+#
+
+begin remote
+
+ name hauppauge_pvr
+ bits 13
+ flags RC5|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ one 969 811
+ zero 969 811
+ plead 1097
+ gap 114605
+ toggle_bit 2
+
+
+ begin codes
+ Power 0x00000000000017FD
+ Go 0x00000000000017FB
+ 1 0x00000000000017C1
+ 2 0x00000000000017C2
+ 3 0x00000000000017C3
+ 4 0x00000000000017C4
+ 5 0x00000000000017C5
+ 6 0x00000000000017C6
+ 7 0x00000000000017C7
+ 8 0x00000000000017C8
+ 9 0x00000000000017C9
+ Back/Exit 0x00000000000017DF
+ 0 0x00000000000017C0
+ Menu 0x00000000000017CD
+ Red 0x00000000000017CB
+ Green 0x00000000000017EE
+ Yellow 0x00000000000017F8
+ Blue 0x00000000000017E9
+ Ch+ 0x00000000000017E0
+ Ch- 0x00000000000017E1
+ Vol- 0x00000000000017D1
+ Vol+ 0x00000000000017D0
+ Ok 0x00000000000017E5
+ Mute 0x00000000000017CF
+ Blank 0x00000000000017CC
+ Full 0x00000000000017FC
+ Rewind 0x00000000000017F2
+ Play 0x00000000000017F5
+ Forward 0x00000000000017F4
+ Record 0x00000000000017F7
+ Stop 0x00000000000017F6
+ Pause 0x00000000000017F0
+ Replay 0x00000000000017E4
+ Skip 0x00000000000017DE
+ end codes
+
+end remote
+
+
+#
+# this config file was automatically generated
+# using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004
+#
+# contributed by
+#
+# brand: Hauppauge 350
+# Created: G.J. Werler (The Netherlands)
+# Project: Mythtv Fedora Pundit-R www.mythtvportal.com
+# Date: 2004/11/28
+# model no. of remote control: Hauppauge A415-HPG
+# devices being controlled by this remote: PVR-350
+#
+
+begin remote
+
+ name Hauppauge_350
+ bits 13
+ flags RC5|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ one 969 811
+ zero 969 811
+ plead 1097
+ gap 114605
+ toggle_bit 2
+
+
+ begin codes
+ Go 0x00000000000017BB
+ Power 0x00000000000017BD
+ TV 0x000000000000179C
+ Videos 0x0000000000001798
+ Music 0x0000000000001799
+ Pictures 0x000000000000179A
+ Guide 0x000000000000179B
+ Radio 0x000000000000178C
+ Up 0x0000000000001794
+ Left 0x0000000000001796
+ Right 0x0000000000001797
+ Down 0x0000000000001795
+ OK 0x00000000000017A5
+ Back/Exit 0x000000000000179F
+ Menu/i 0x000000000000178D
+ Vol+ 0x0000000000001790
+ Vol- 0x0000000000001791
+ Prev.Ch 0x0000000000001792
+ Mute 0x000000000000178F
+ Ch+ 0x00000000000017A0
+ Ch- 0x00000000000017A1
+ Record 0x00000000000017B7
+ Stop 0x00000000000017B6
+ Rewind 0x00000000000017B2
+ Play 0x00000000000017B5
+ Forward 0x00000000000017B4
+ Replay/SkipBackward 0x00000000000017A4
+ Pause 0x00000000000017B0
+ SkipForward 0x000000000000179E
+ 1 0x0000000000001781
+ 2 0x0000000000001782
+ 3 0x0000000000001783
+ 4 0x0000000000001784
+ 5 0x0000000000001785
+ 6 0x0000000000001786
+ 7 0x0000000000001787
+ 8 0x0000000000001788
+ 9 0x0000000000001789
+ Asterix 0x000000000000178A
+ 0 0x0000000000001780
+ # 0x000000000000178E
+ Red 0x000000000000178B
+ Green 0x00000000000017AE
+ Yellow 0x00000000000017B8
+ Blue 0x00000000000017A9
+ end codes
+
+end remote
diff --git a/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircrc b/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircrc
new file mode 100644
index 0000000..2f1e514
--- /dev/null
+++ b/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/lircrc
@@ -0,0 +1,505 @@
+# lircrc.example.HauppaugeGrey-nativelirc
+# 2003-09-17, Robert Kulagowski
+# mailto:rkulagow@rocketmail.com
+# Save this file in ~/.mythtv/lircrc
+
+begin
+ prog = mythtv
+ button = Power
+ config = Esc
+end
+
+begin
+ prog = mythtv
+ button = Go
+# Swap the PiP windows
+ config = N
+end
+
+begin
+ prog = mythtv
+ button = 1
+ config = 1
+end
+
+begin
+ prog = mythtv
+ button = 2
+ config = 2
+end
+
+begin
+ prog = mythtv
+ button = 3
+ config = 3
+end
+
+begin
+ prog = mythtv
+ button = 4
+ config = 4
+end
+
+begin
+ prog = mythtv
+ button = 5
+ config = 5
+end
+
+begin
+ prog = mythtv
+ button = 6
+ config = 6
+end
+
+begin
+ prog = mythtv
+ button = 7
+ config = 7
+end
+
+begin
+ prog = mythtv
+ button = 8
+ config = 8
+end
+
+begin
+ prog = mythtv
+ button = 9
+ config = 9
+end
+
+begin
+ prog = mythtv
+ button = Back/Exit
+ config = Esc
+end
+
+begin
+ prog = mythtv
+ button = 0
+ config = 0
+end
+
+begin
+ prog = mythtv
+ button = Menu
+ config = M
+end
+
+# Below are keys used with the Hauppauge Grey remote
+
+begin
+ prog = mythtv
+# This is the Red key
+# We'll use it for "Delete"
+ button = Red
+ config = D
+end
+
+begin
+ prog = mythtv
+# This is the Green key
+# We'll use it for "Information"
+ button = Green
+ config = I
+end
+
+# Note the "repeat = " strings in the volume and channel.
+# This means that if you hold down the key, every nth instance will be
+# passed. This depends on your system, so you may want to increase or
+# decrease this and see what happens. repeat = 1 is probably too
+# fast.
+
+begin
+ prog = mythtv
+# This is the Yellow key
+# Use it as a volume key
+ button = Yellow
+ repeat = 3
+ config = F10
+end
+
+begin
+ prog = mythtv
+# This is the Blue key
+# Use it as a volume key
+ button = Blue
+ repeat = 3
+ config = F11
+end
+
+begin
+ prog = mythtv
+ button = Ch+
+# This is the "up" on the central diamond
+ repeat = 3
+ config = Up
+end
+
+begin
+ prog = mythtv
+ button = Ch-
+# This is the "down" on the central diamond
+ repeat = 3
+ config = Down
+end
+
+begin
+ prog = mythtv
+ button = Vol-
+# This is the "left" on the central diamond
+ repeat = 3
+ config = Left
+end
+
+begin
+ prog = mythtv
+ button = Vol+
+# This is the "right" on the central diamond
+ repeat = 3
+ config = Right
+end
+
+begin
+ prog = mythtv
+# Middle button on the diamond
+ button = Ok
+ config = Return
+end
+
+begin
+ prog = mythtv
+ button = Mute
+ config = F9
+end
+
+begin
+ prog = mythtv
+# Change focus for PiP (to change channel in the other window)
+ button = Blank
+ config = B
+end
+
+begin
+ prog = mythtv
+# Toggle PiP on/off
+ button = Full
+ config = V
+end
+
+begin
+ prog = mythtv
+ button = Rewind
+ config = Left
+end
+
+begin
+ prog = mythtv
+ button = Play
+ config = P
+end
+
+begin
+ prog = mythtv
+ button = Forward
+ config = Right
+end
+
+begin
+ prog = mythtv
+ button = Record
+ config = R
+end
+
+begin
+ prog = mythtv
+# Teletext
+ button = Stop
+ config = T
+end
+
+begin
+ prog = mythtv
+ button = Pause
+ config = P
+end
+
+begin
+ prog = mythtv
+ button = Replay
+# Use for backwards commercial skip
+ config = Q
+end
+
+begin
+ prog = mythtv
+ button = Skip
+# Use for forward commercial skip
+ config = Z
+end
+
+#MPlayer
+begin
+ prog = mplayer
+ button = Power
+ config = quit
+end
+
+begin
+ prog = mplayer
+ button = Menu
+ config = osd
+end
+
+begin
+ prog = mplayer
+ button = Rewind
+ config = seek -10
+ repeat = 1
+end
+
+begin
+ prog = mplayer
+ button = Forward
+ config = seek +10
+ repeat = 1
+end
+
+begin
+ prog = mplayer
+ button = Replay
+ config = seek -60
+ repeat = 1
+end
+
+begin
+ prog = mplayer
+ button = Skip
+ config = seek +60
+ repeat = 1
+end
+
+begin
+ prog = mplayer
+ button = Pause
+ config = pause
+end
+
+begin
+ prog = mplayer
+ button = Play
+ config = pause
+end
+
+begin
+ prog = mplayer
+ button = Back/Exit
+ config = quit
+end
+
+begin
+ prog = mplayer
+ button = Vol+
+ config = volume +1
+ repeat = 1
+end
+
+begin
+ prog = mplayer
+ button = Vol-
+ config = volume -1
+ repeat = 1
+end
+
+begin
+ prog = mplayer
+ button = Mute
+ config = mute
+end
+##XINE
+
+ begin
+ prog = xine
+ button = Play
+ repeat = 3
+ config = Play
+ end
+
+ begin
+ prog = xine
+ button = Stop
+ repeat = 3
+ config = Stop
+ end
+
+ begin
+ prog = xine
+ button = Back/Exit
+ config = Quit
+ end
+
+ begin
+ prog = xine
+ button = Pause
+ repeat = 3
+ config = Pause
+ end
+
+ begin
+ prog = xine
+ button = Ch+
+ repeat = 4
+ config = EventUp
+ end
+
+ begin
+ prog = xine
+ button = Ch-
+ repeat = 4
+ config = EventDown
+ end
+
+ begin
+ prog = xine
+ button = Vol-
+ repeat = 4
+ config = EventLeft
+ end
+
+ begin
+ prog = xine
+ button = Vol+
+ repeat = 4
+ config = EventRight
+ end
+
+ begin
+ prog = xine
+ button = Ok
+ repeat = 0
+ config = EventSelect
+ end
+
+ begin
+ prog = xine
+ button = Menu
+ repeat = 0
+ config = Menu
+ end
+
+ #vol down
+ begin
+ prog = xine
+ button = Yellow
+ repeat = 1
+ config = Volume-
+ end
+
+ #vol up
+ begin
+ prog = xine
+ button = Red
+ repeat = 1
+ config = Volume+
+ end
+
+ begin
+ prog = xine
+ button = Forward
+ repeat = 2
+ config = SeekRelative+30
+ end
+
+ begin
+ prog = xine
+ button = Rewind
+ repeat = 2
+ config = SeekRelative-30
+ end
+
+ #ch up
+ begin
+ prog = xine
+ button = Green
+ repeat = 1
+ config = SeekRelative+60
+ end
+
+ #ch down
+ begin
+ prog = xine
+ button = Blue
+ repeat = 1
+ config = SeekRelative-60
+ end
+
+ #sleep
+ begin
+ prog = xine
+ button = Go
+ repeat = 1
+ config = ZoomIn
+ end
+
+ #display
+ begin
+ prog = xine
+ button = Skip
+ repeat = 1
+ config = ZoomOut
+ end
+
+ #skip chapter forward
+ begin
+ prog = xine
+ button = Skip
+ repeat = 1
+ config = EventNext
+ end
+
+ #skip chapter backward
+ begin
+ prog = xine
+ button = Replay
+ repeat = 1
+ config = EventPrior
+ end
+
+ begin
+ prog = lircnav
+ button = Vol-
+ config = page_down
+ end
+
+ begin
+ prog = lircnav
+ button = Vol+
+ config = page_up
+ end
+
+ begin
+ prog = lircnav
+ button = Ch+
+ config = up
+ end
+
+ begin
+ prog = lircnav
+ button = Ch-
+ config = down
+ end
+
+ begin
+ prog = lircnav
+ button = Ok
+ config = select
+ end
+
+ begin
+ prog = lircnav
+ button = Power
+ config = quit
+ end
+
diff --git a/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/preview.jpg b/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/preview.jpg
new file mode 100644
index 0000000..a40a1e8
--- /dev/null
+++ b/abs/core-testing/LinHES-config/templates/remotes/hauppauge-grey/preview.jpg
Binary files differ
diff --git a/abs/core-testing/LinHES-config/templates/remotes/i2c.id b/abs/core-testing/LinHES-config/templates/remotes/i2c.id
new file mode 100644
index 0000000..50e89e9
--- /dev/null
+++ b/abs/core-testing/LinHES-config/templates/remotes/i2c.id
@@ -0,0 +1,5 @@
+0070:4000|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:4009|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:4801|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:4803|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:0003|Hauppauge|WinTV PVR 250|hauppauge-grey \ No newline at end of file
diff --git a/abs/core-testing/LinHES-config/templates/samba/smb.conf.home b/abs/core-testing/LinHES-config/templates/samba/smb.conf.home
index b850a7d..c0f3136 100755
--- a/abs/core-testing/LinHES-config/templates/samba/smb.conf.home
+++ b/abs/core-testing/LinHES-config/templates/samba/smb.conf.home
@@ -1,5 +1,5 @@
[home]
- path = /data/home/mythtv/
+ path = /home/mythtv/
public = yes
only guest = yes
writeable = yes
diff --git a/abs/core-testing/LinHES-config/templates/samba/smb.conf.media b/abs/core-testing/LinHES-config/templates/samba/smb.conf.media
index 6a4ec91..3526933 100755
--- a/abs/core-testing/LinHES-config/templates/samba/smb.conf.media
+++ b/abs/core-testing/LinHES-config/templates/samba/smb.conf.media
@@ -1,5 +1,5 @@
[media]
- path = /data/media
+ path = /myth
public = yes
only guest = yes
writeable = yes
diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD
index 6403dbd..cad31f3 100644
--- a/abs/core-testing/LinHES-system/PKGBUILD
+++ b/abs/core-testing/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=1.0
-pkgrel=14
+pkgrel=17
arch=('i686')
MVDIR=$startdir/pkg/usr/LH
BINDIR=$startdir/pkg/usr/bin
@@ -8,7 +8,7 @@ install=LinHES.install
pkgdesc="scripts and things related to having a automated system"
depends=()
-binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh"
+binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh"
source=(LinHES-session LinHES-profile.sh $binfiles)
diff --git a/abs/core-testing/LinHES-system/load-modules-mythvantage.sh b/abs/core-testing/LinHES-system/load-modules-mythvantage.sh
new file mode 100755
index 0000000..8382a29
--- /dev/null
+++ b/abs/core-testing/LinHES-system/load-modules-mythvantage.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#/usr/bin/load-modules-mythvantage.sh UNLOAD LCD
+. /etc/systemconfig
+
+case $1 in
+UNLOAD|unload )
+ MODULELIST=`grep /etc/modules.mythvantage $2`
+ for i in $MODULELIST
+ do
+ /sbin/rmmod $i
+ done
+
+ ;;
+
+ *) echo "- Loading MythVantage-modules"
+ #try to load the cx88 modules
+ if [ ! x$SystemType = xFrontend_only ]
+ then
+ /sbin/modprobe cx88-dvb 2>/dev/null
+ fi
+
+ if [ -f /etc/modules.mythvantage ]
+ then
+ while read line
+ do
+ module=`echo $line |cut -d# -f1`
+ /sbin/modprobe $module
+
+ done < /etc/modules.mythvantage
+ fi
+esac
+
diff --git a/abs/core-testing/lighttpd/PKGBUILD b/abs/core-testing/lighttpd/PKGBUILD
index 0b42db7..db98bc4 100644
--- a/abs/core-testing/lighttpd/PKGBUILD
+++ b/abs/core-testing/lighttpd/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=lighttpd
pkgver=1.4.20
-pkgrel=6
+pkgrel=12
pkgdesc='a secure, fast, compliant and very flexible web-server'
license=('custom')
arch=('i686' 'x86_64')
@@ -15,11 +15,11 @@ optdepends=('libxml2: mod_webdav' \
'sqlite3: mod_webdav' \
'gdbm: mod_trigger_b4_dl' \
)
-backup=('etc/lighttpd/lighttpd.conf' 'etc/logrotate.d/lighttpd')
+backup=('etc/lighttpd/lighttpd.conf' 'etc/logrotate.d/lighttpd' 'etc/lighttpd/auth-inc.conf')
options=('!libtool' 'emptydirs')
install='lighttpd.install'
source=("http://www.lighttpd.net/download/lighttpd-${pkgver}.tar.bz2" \
- 'lighttpd.rc.d' 'lighttpd.logrotate.d' lighttpd.conf)
+ 'lighttpd.rc.d' 'lighttpd.logrotate.d' lighttpd.conf auth-inc.conf)
md5sums=('ed6ee0bb714f393219a32768d86984d8'
'bd690eee0d9e51857448770a151023b0'
@@ -64,6 +64,7 @@ build() {
# -e 's|/usr/local/bin/php-cgi|/usr/bin/php-cgi|' \
# -i ${pkgdir}/etc/lighttpd/lighttpd.conf || return 1
install -D -m644 $startdir/src/lighttpd.conf $pkgdir/etc/lighttpd/lighttpd.conf
+ install -D -m644 $startdir/src/auth-inc.conf $pkgdir/etc/lighttpd/auth-inc.conf
install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}
diff --git a/abs/core-testing/lighttpd/_changelog b/abs/core-testing/lighttpd/_changelog
index 202ea2f..439f42d 100644
--- a/abs/core-testing/lighttpd/_changelog
+++ b/abs/core-testing/lighttpd/_changelog
@@ -1 +1,2 @@
changed docroot to /data/srv/
+modified auth to require valid user (include auth-inc.conf)
diff --git a/abs/core-testing/lighttpd/auth-inc.conf b/abs/core-testing/lighttpd/auth-inc.conf
new file mode 100644
index 0000000..21c4c55
--- /dev/null
+++ b/abs/core-testing/lighttpd/auth-inc.conf
@@ -0,0 +1,12 @@
+auth.backend = "plain"
+auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
+
+
+auth.require = ( "/mythweb" =>
+ (
+ "method" => "basic",
+ "realm" => "MythWeb",
+ "require" => "valid-user"
+ )
+ )
+
diff --git a/abs/core-testing/lighttpd/lighttpd.conf b/abs/core-testing/lighttpd/lighttpd.conf
index efcd219..e2c60da 100644
--- a/abs/core-testing/lighttpd/lighttpd.conf
+++ b/abs/core-testing/lighttpd/lighttpd.conf
@@ -18,7 +18,7 @@ server.modules = (
"mod_access",
# "mod_cml",
# "mod_trigger_b4_dl",
-# "mod_auth",
+ "mod_auth",
# "mod_status",
"mod_setenv",
"mod_fastcgi",
@@ -263,12 +263,12 @@ cgi.assign = ( ".pl" => "/usr/bin/perl",
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"
-#auth.require = ( "/server-status" =>
+#auth.require = ( "/mythweb =>
# (
-# "method" => "digest",
+# "method" => "plain",
# "realm" => "download archiv",
-# "require" => "user=jan"
-# ),
+# "require" => "valid-user"
+# )
# "/server-config" =>
# (
# "method" => "digest",
@@ -337,7 +337,7 @@ cgi.assign = ( ".pl" => "/usr/bin/perl",
#index-file.names += (foo + ".php")
#### include
-#include /etc/lighttpd/lighttpd-inc.conf
+#include "/etc/lighttpd/auth-inc.conf"
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"
diff --git a/abs/core-testing/lighttpd/lighttpd.install b/abs/core-testing/lighttpd/lighttpd.install
index 9d98d41..bf4c132 100644
--- a/abs/core-testing/lighttpd/lighttpd.install
+++ b/abs/core-testing/lighttpd/lighttpd.install
@@ -1,16 +1,6 @@
+pre_upgrade() {
+ mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.old
+}
post_upgrade() {
- if [ $(vercmp '1.4.19-1' $2) -ge 0 ]; then
- echo '
- ==> New default DocumentRoot
-
- lighttpd uses /srv/http as default DocumentRoot.
- You can still use your current DocumentRoot
-
- ==> New default user and group
-
- Instead of "nobody" lighttpd runs as user/group "http" by default now. You might
- want to adjust your lighttpd.conf according to this change. But you can still
- run lighttpd as nobody.
- '
- fi
+ touch /etc/lighttpd/lighttpd.user
}
diff --git a/abs/core-testing/linhes-live/PKGBUILD b/abs/core-testing/linhes-live/PKGBUILD
index 2052781..f718e22 100644
--- a/abs/core-testing/linhes-live/PKGBUILD
+++ b/abs/core-testing/linhes-live/PKGBUILD
@@ -2,7 +2,7 @@
# 2008.09.25
pkgname=linhes-live
pkgver=5.3.3
-pkgrel=6
+pkgrel=12
pkgdesc="LinHes compulsory components for the Live System."
url="http://KnoppMyth.net"
diff --git a/abs/core-testing/linhes-live/etc/live-shutdown b/abs/core-testing/linhes-live/etc/live-shutdown
index 459d4f2..6e12d22 100644
--- a/abs/core-testing/linhes-live/etc/live-shutdown
+++ b/abs/core-testing/linhes-live/etc/live-shutdown
@@ -37,17 +37,49 @@ f_swapoff ()
f_remountro ()
{
- if [ -n "${ejectdev}" ]; then
- echo "Ejecting live CD"
- eject ${ejectdev}
- echo "========================================"
- echo "It's safe to switch the computer off now"
- echo -ne "Press Enter to continue"
- read junk
+ bootdev=`cat /.livesys/bootdevice`
+ bootdev=`basename $bootdev`
+ for i in `ls -H /dev/cd/*`
+ do
+ cdrom=`basename $i|cut -d- -f2`
+ if [ x$cdrom = x$bootdev ]
+ then
+ ejectdev=$cdrom
+ fi
+ break
+ done
+ lspci |grep -q VMware
+ if [ ! $? = 0 ]
+ then
+ if [ -n "${ejectdev}" ]
+ then
+ echo "Ejecting CD"
+ eject ${ejectdev}
+ echo "========================================"
+ echo "Tray will retract after 10 seconds"
+ for timer in `seq -w 10 -1 0`
+ do
+ #echo -n $timer '\x08'
+ echo -ne "\t"$timer '\010\010\010\010'
+ sleep 1
+ done
+ echo
+ echo "========================================"
+ eject -t ${ejectdev}
+ echo
+ echo "It's safe to switch the computer off now"
+ #echo -ne "Press Enter to continue"
+ #read junk
+ else
+ echo "Boot device is not a cdrom, no need to eject"
+ fi
+ else
+ echo "VMWARE detected, not ejecting the CD"
fi
}
#Preloads these commands so we can eject the CD.
#
+seq --help >/dev/null 2>&1
eject --help >/dev/null 2>&1
halt --help >/dev/null 2>&1
poweroff --help >/dev/null 2>&1
diff --git a/abs/core-testing/linhes-live/etc/rc.shutdown-live b/abs/core-testing/linhes-live/etc/rc.shutdown-live
index 896bae2..79eae47 100755
--- a/abs/core-testing/linhes-live/etc/rc.shutdown-live
+++ b/abs/core-testing/linhes-live/etc/rc.shutdown-live
@@ -150,7 +150,7 @@ fi
#F Remount / ro
f_remountro
#Eject the CD
-eject
+
# Power off or reboot
if [ "$RUNLEVEL" = "0" ]; then
printsep
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/DeviceReadBuffer-polltimeout.2.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/DeviceReadBuffer-polltimeout.2.patch
new file mode 100644
index 0000000..5bb713f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/DeviceReadBuffer-polltimeout.2.patch
@@ -0,0 +1,219 @@
+Index: libs/libmythtv/DeviceReadBuffer.h
+===================================================================
+--- libs/libmythtv/DeviceReadBuffer.h (revision 18515)
++++ libs/libmythtv/DeviceReadBuffer.h (working copy)
+@@ -59,7 +59,7 @@
+ void IncrReadPointer(uint len);
+
+ bool HandlePausing(void);
+- bool Poll(void) const;
++ bool Poll(void);
+ uint WaitForUnused(uint bytes_needed) const;
+ uint WaitForUsed (uint bytes_needed) const;
+
+Index: libs/libmythtv/DeviceReadBuffer.cpp
+===================================================================
+--- libs/libmythtv/DeviceReadBuffer.cpp (revision 18515)
++++ libs/libmythtv/DeviceReadBuffer.cpp (working copy)
+@@ -90,9 +90,14 @@
+
+ void DeviceReadBuffer::Start(void)
+ {
+- lock.lock();
+- bool was_running = running;
+- lock.unlock();
++ bool was_running;
++
++ {
++ QMutexLocker locker(&lock);
++ was_running = running;
++ error = false;
++ }
++
+ if (was_running)
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Start(): Already running.");
+@@ -104,6 +109,8 @@
+ {
+ VERBOSE(VB_IMPORTANT,
+ LOC_ERR + QString("Start(): pthread_create failed.") + ENO);
++
++ QMutexLocker locker(&lock);
+ error = true;
+ }
+ }
+@@ -118,21 +125,25 @@
+ used = 0;
+ readPtr = buffer;
+ writePtr = buffer;
++
++ error = false;
+ }
+
+ void DeviceReadBuffer::Stop(void)
+ {
+ bool was_running = IsRunning();
+- lock.lock();
+- run = false;
+- lock.unlock();
+
+ if (!was_running)
+ {
+- VERBOSE(VB_IMPORTANT, LOC_ERR + "Stop(): Not running.");
++ VERBOSE(VB_IMPORTANT, LOC + "Stop(): Not running.");
+ return;
+ }
+
++ {
++ QMutexLocker locker(&lock);
++ run = false;
++ }
++
+ pthread_join(thread, NULL);
+ }
+
+@@ -229,10 +240,11 @@
+ {
+ uint errcnt = 0;
+
+- lock.lock();
+- run = true;
+- running = true;
+- lock.unlock();
++ {
++ QMutexLocker locker(&lock);
++ run = true;
++ running = true;
++ }
+
+ while (run)
+ {
+@@ -248,6 +260,15 @@
+ if (using_poll && !Poll())
+ continue;
+
++ {
++ QMutexLocker locker(&lock);
++ if (error)
++ {
++ VERBOSE(VB_RECORD, LOC + "fill_ringbuffer: error state");
++ break;
++ }
++ }
++
+ // Limit read size for faster return from read
+ size_t read_size =
+ min(dev_read_size, (size_t) WaitForUnused(TSPacket::SIZE));
+@@ -268,9 +289,10 @@
+ }
+ }
+
+- lock.lock();
+- running = false;
+- lock.unlock();
++ {
++ QMutexLocker locker(&lock);
++ running = false;
++ }
+ }
+
+ bool DeviceReadBuffer::HandlePausing(void)
+@@ -293,7 +315,7 @@
+ return true;
+ }
+
+-bool DeviceReadBuffer::Poll(void) const
++bool DeviceReadBuffer::Poll(void)
+ {
+ #ifdef USING_MINGW
+ #warning mingw DeviceReadBuffer::Poll
+@@ -302,31 +324,53 @@
+ return false;
+ #else
+ bool retval = true;
+- while (true)
++ uint timeout_cnt = 0;
++
++ for (;;)
+ {
+ struct pollfd polls;
+ polls.fd = _stream_fd;
+ polls.events = POLLIN;
+ polls.revents = 0;
+
+- int ret = poll(&polls, 1 /*number of polls*/, 10 /*msec*/);
+- if (IsPauseRequested() || !IsOpen() || !run)
++ int ret = poll(&polls, 1 /*number of polls*/, 250 /*msec*/);
++
++ if (polls.revents & (POLLERR | POLLHUP | POLLNVAL))
+ {
++ VERBOSE(VB_IMPORTANT, LOC + "poll error");
++ error = true;
++ return true;
++ }
++
++ if (!run || !IsOpen() || IsPauseRequested())
++ {
+ retval = false;
+ break; // are we supposed to pause, stop, etc.
+ }
+
+ if (ret > 0)
+ break; // we have data to read :)
+- if ((-1 == ret) && (EOVERFLOW == errno))
+- break; // we have an error to handle
+-
+- if ((-1 == ret) && ((EAGAIN == errno) || (EINTR == errno)))
+- continue; // errors that tell you to try again
+- if (ret == 0)
+- continue; // timed out, try again
+-
+- usleep(2500);
++ if (ret < 0)
++ {
++ if ((EOVERFLOW == errno))
++ break; // we have an error to handle
++ if ((EAGAIN == errno) || (EINTR == errno))
++ continue; // errors that tell you to try again
++ usleep(2500);
++ }
++ else // ret == 0
++ {
++ if (++timeout_cnt > 9)
++ {
++ VERBOSE(VB_RECORD, LOC_ERR + "Poll giving up");
++ QMutexLocker locker(&lock);
++ error = true;
++ return true;
++ }
++ if (timeout_cnt % 2)
++ VERBOSE(VB_RECORD, LOC_ERR + QString("Poll timeout (%1)")
++ .arg(timeout_cnt));
++ }
+ }
+ return retval;
+ #endif //!USING_MINGW
+@@ -360,9 +404,9 @@
+
+ if (++errcnt > 5)
+ {
+- lock.lock();
++ QMutexLocker locker(&lock);
++ VERBOSE(VB_RECORD, LOC + "Too many errors.");
+ error = true;
+- lock.unlock();
+ return false;
+ }
+
+@@ -376,10 +420,8 @@
+ VERBOSE(VB_IMPORTANT, LOC +
+ QString("End-Of-File? fd(%1)").arg(_stream_fd));
+
+- lock.lock();
++ QMutexLocker locker(&lock);
+ eof = true;
+- lock.unlock();
+-
+ return false;
+ }
+ usleep(500);
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/PKGBUILD b/abs/core-testing/mythtv/trunk/mythtv-svn/PKGBUILD
new file mode 100755
index 0000000..b5dc31d
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/PKGBUILD
@@ -0,0 +1,78 @@
+pkgname=mythtv-svn
+pkgver=19295
+pkgrel=1
+pkgdesc="A personal video recorder for Linux"
+url="http://www.mythtv.org"
+license="GPL"
+depends=('lame' 'libmysqlclient' 'alsa-lib' 'wget' 'qt' 'x-server' 'freetype2' 'libmpeg2' 'libxml2' 'libraw1394' 'lirc' 'perl-date-manip' 'libavc1394' 'libdc1394' 'libiec61883')
+makedepends=('subversion')
+conflicts=(mythtv)
+replaces=()
+backup=()
+options=(!strip)
+MAKEFLAGS="-j6"
+install='mythtv.install'
+
+patchs=('DeviceReadBuffer-polltimeout.2.patch' 'hdpvr-v4lchannel-tweak.patch' 'mpegrecorder-hdpvr-v1.1.patch' 'mythcommflag-avidemux.2.patch')
+source=('mythbackend' 'myth.sh' 'smolt_jump.patch' 'svn_main_menu_popup.patch' `echo ${patchs[@]:0}` )
+arch=('i686')
+md5sums=()
+
+
+
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythtv
+_svnmod=mythtv
+
+build() {
+
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythtv
+ echo "--------------------------applying patches----------------------------------------------------"
+ patch -Np0 -i $startdir/src/smolt_jump.patch #|| return 1
+ patch -Np0 -i $startdir/src/svn_main_menu_popup.patch #||return 1
+
+ for i in `echo ${patchs[@]:0} `
+ do
+ echo applying $i
+ echo "------------"
+ patch -Np0 -i ${startdir}/src/$i #|| return 1
+ done
+ echo "--------------------------done applying patches----------------------------------------------------"
+ sed -i -e "s/\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`/$pkgver/" version.pro
+ make distclean
+ ./configure --prefix=/usr --enable-xvmc --enable-xvmc-pro --enable-opengl-vsync --enable-dvb --enable-firewire --compile-type=release --with-bindings=perl --disable-audio-arts --disable-xrandr
+ . /etc/profile
+ make
+ make INSTALL_ROOT=$startdir/pkg install
+
+ #Patch the xml LinHES style
+ cp -r $startdir/menu-xml/*.xml $startdir/pkg/usr/share/mythtv
+ cd $startdir/pkg/usr/share/mythtv
+ patch -p0 < $startdir/menu-xml/mainmenu.xml.patch
+ patch -p0 < $startdir/menu-xml/optical_menu.xml.patch
+ patch -p0 < $startdir/menu-xml/library.xml.patch
+
+ # mkdir -p $startdir/pkg/usr/share/mythtv/contrib
+ # mkdir -p $startdir/pkg/etc/rc.d
+ # mkdir -p $startdir/pkg/var/log/mythtv
+ # mkdir -p $startdir/pkg/etc/profile.d
+ # install -m0755 ../myth.sh $startdir/pkg/etc/profile.d/
+
+ # install contrib
+ # mkdir -p $startdir/pkg/usr/local/share/mythtv/contrib || return 1
+ # cp -rp contrib/* $startdir/pkg/usr/local/share/mythtv/contrib
+ # echo "-release-fixes" > $startdir/pkg/usr/local/share/mythtv/.releasetype
+ # install -m0755 themes/*.ttf $startdir/pkg/usr/local/share/mythtv/themes/
+
+
+ # mkdir -p $startdir/pkg/usr/lib/
+ # mv $startdir/pkg/usr/local/lib/perl5 $startdir/pkg/usr/lib/perl5
+ # cd $startdir/src/mythtv/contrib
+ # gcc -Wall -o firewire_tester firewire_tester.c -liec61883 -lraw1394
+ # install -m0755 firewire_tester $startdir/pkg/usr/local/bin/firewire_tester
+ #install -m0755 $startdir/pkg/usr/local/share/mythtv/contrib/optimize_mythdb.pl $startdir/pkg/usr/local/bin/optimize_mythdb.pl
+ # cp $startdir/src/myth.find_orphans.pl $startdir/pkg/usr/local/share/mythtv/contrib/myth.find_orphans.pl
+ # install -m0755 $startdir/pkg/usr/local/share/mythtv/contrib/myth.find_orphans.pl $startdir/pkg/usr/local/bin/myth.find_orphans.pl
+
+
+}
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/aacdecoder.cpp.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/aacdecoder.cpp.patch
new file mode 100644
index 0000000..8796eb4
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/aacdecoder.cpp.patch
@@ -0,0 +1,12 @@
+--- mythmusic/mythmusic/aacdecoder.cpp.orig 2008-11-19 12:51:48.000000000 -0500
++++ mythmusic/mythmusic/aacdecoder.cpp 2008-11-19 12:52:42.000000000 -0500
+@@ -17,6 +17,9 @@
+ #define FAAD_MODIFIED
+ #endif
+
++// LinHES need this undefined
++#undef FAAD_MODIFIED
++
+ // ANSI C headers
+ #include <cstdlib>
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/hdpvr-v4lchannel-tweak.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/hdpvr-v4lchannel-tweak.patch
new file mode 100644
index 0000000..3535310
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/hdpvr-v4lchannel-tweak.patch
@@ -0,0 +1,139 @@
+Index: libs/libmythtv/v4lchannel.h
+===================================================================
+--- libs/libmythtv/v4lchannel.h (revision 18874)
++++ libs/libmythtv/v4lchannel.h (working copy)
+@@ -103,6 +103,8 @@
+ VidModV4L2 videomode_v4l2; ///< Current video mode if 'usingv4l2' is true
+
+ int defaultFreqTable;
++ int prev_inputNumV4L;
++ v4l2_std_id prev_vid_mode;
+ };
+
+ #endif
+Index: libs/libmythtv/v4lchannel.cpp
+===================================================================
+--- libs/libmythtv/v4lchannel.cpp (revision 18874)
++++ libs/libmythtv/v4lchannel.cpp (working copy)
+@@ -40,7 +40,8 @@
+ device_name(QString::null), driver_name(QString::null),
+ curList(NULL), totalChannels(0),
+ currentFormat(""), is_dtv(false),
+- usingv4l2(false), defaultFreqTable(1)
++ usingv4l2(false), defaultFreqTable(1),
++ prev_inputNumV4L(-1), prev_vid_mode(-1)
+ {
+ }
+
+@@ -795,62 +796,75 @@
+ {
+ VERBOSE(VB_CHANNEL, LOC + msg + "(v4l v2)");
+
+- int ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
++ int ioctlval;
++ bool streamingDisabled = false;
++ int streamType = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+- // ConvertX (wis-go7007) requires streaming to be disabled
+- // before an input switch, do this if initial switch failed.
+- bool streamingDisabled = false;
+- int streamType = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+- if ((ioctlval < 0) && (errno == EBUSY))
++ if (prev_inputNumV4L != inputNumV4L)
+ {
+- ioctlval = ioctl(videofd, VIDIOC_STREAMOFF, &streamType);
++ ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
++
++ // ConvertX (wis-go7007) requires streaming to be disabled
++ // before an input switch, do this if initial switch failed.
++ if ((ioctlval < 0) && (errno == EBUSY))
++ {
++ ioctlval = ioctl(videofd, VIDIOC_STREAMOFF, &streamType);
++ if (ioctlval < 0)
++ {
++ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
++ "\n\t\t\twhile disabling streaming (v4l v2)" + ENO);
++
++ ok = false;
++ ioctlval = 0;
++ }
++ else
++ {
++ streamingDisabled = true;
++
++ // Resend the input switch ioctl.
++ ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
++ }
++ }
++
+ if (ioctlval < 0)
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile disabling streaming (v4l v2)" + ENO);
++ "\n\t\t\twhile setting input (v4l v2)" + ENO);
+
+ ok = false;
+- ioctlval = 0;
+ }
+- else
+- {
+- streamingDisabled = true;
+
+- // Resend the input switch ioctl.
+- ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
+- }
++ prev_inputNumV4L = inputNumV4L;
+ }
+
+- if (ioctlval < 0)
+- {
+- VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile setting input (v4l v2)" + ENO);
+-
+- ok = false;
+- }
+-
+ v4l2_std_id vid_mode = format_to_mode(newFmt, 2);
+- ioctlval = ioctl(videofd, VIDIOC_S_STD, &vid_mode);
+- if (ioctlval < 0)
+- {
+- VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile setting format (v4l v2)" + ENO);
+
+- ok = false;
+- }
+-
+- // ConvertX (wis-go7007) requires streaming to be disabled
+- // before an input switch, here we try to re-enable streaming.
+- if (streamingDisabled)
++ if (prev_vid_mode != vid_mode)
+ {
+- ioctlval = ioctl(videofd, VIDIOC_STREAMON, &streamType);
++ ioctlval = ioctl(videofd, VIDIOC_S_STD, &vid_mode);
+ if (ioctlval < 0)
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile reenabling streaming (v4l v2)" + ENO);
++ "\n\t\t\twhile setting format (v4l v2)" + ENO);
+
+ ok = false;
+ }
++
++ // ConvertX (wis-go7007) requires streaming to be disabled
++ // before an input switch, here we try to re-enable streaming.
++ if (streamingDisabled)
++ {
++ ioctlval = ioctl(videofd, VIDIOC_STREAMON, &streamType);
++ if (ioctlval < 0)
++ {
++ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
++ "\n\t\t\twhile reenabling streaming (v4l v2)" +
++ ENO);
++
++ ok = false;
++ }
++ }
++ prev_vid_mode = vid_mode;
+ }
+ }
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/HOST_SETTINGS.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/HOST_SETTINGS.xml
new file mode 100644
index 0000000..f257920
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/HOST_SETTINGS.xml
@@ -0,0 +1,87 @@
+<mythmenu name="HOST_SETTINGS">
+
+ <button>
+ <type>MV_NETWORK_SETUP_MENU</type>
+ <text>Network Settings</text>
+ <action>EXEC mythinstall -s network </action>
+ </button>
+
+ <button>
+ <type>MV_SYSTEM_SETUP_MENU</type>
+ <text>System type</text>
+ <action>EXEC mythinstall -s hostype </action>
+ </button>
+
+ <button>
+ <type>MV_MISC_SETUP_MENU</type>
+ <text>Misc Settings</text>
+ <action>EXEC mythinstall -s misc </action>
+ </button>
+
+ <button>
+ <type>MV_SOFTWARE_MENU</type>
+ <text>Software</text>
+ <action>EXEC mythinstall -s plugins </action>
+ </button>
+
+ <button>
+ <type>MV_SHUTDOWN_SETUP_MENU</type>
+ <text>Shutdown settings</text>
+ <action>EXEC mythinstall -s sleep </action>
+ </button>
+
+
+<button>
+ <type>MV_ADVANCED_X_SETUP_MENU</type>
+ <text>Display</text>
+ <action>EXEC mythinstall -s advancedX</action>
+</button>
+
+<button>
+ <type>MV_ADVANCED_SETUP_MENU</type>
+ <text>Advanced settings</text>
+ <action>EXEC mythinstall -s advanced</action>
+</button>
+
+
+<button>
+ <type>MV_AUDIO_SETUP_MENU</type>
+ <text>Audio settings</text>
+ <action>EXEC mythinstall -s sound </action>
+</button>
+
+
+<button>
+ <type>MV_ACCESS_SETUP_MENU</type>
+ <text>Access</text>
+ <action>EXEC mythinstall -s accesscontrol </action>
+</button>
+
+<button>
+ <type>MV_USER_SETUP_MENU</type>
+ <text>Password </text>
+ <action>EXEC mythinstall -s user </action>
+</button>
+
+<button>
+ <type>MV_WEBACCESS_SETUP_MENU</type>
+ <text>Web security</text>
+ <action>EXEC mythinstall -s webuser </action>
+</button>
+
+
+
+
+ <!--
+ <button>
+ <type>SETUP_MENU</type>
+ <text>Settings profile manager</text>
+ <action>EXEC mythinstall -t </action>
+
+ </button>
+ -->
+
+
+
+
+</mythmenu>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/is.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/is.xml
new file mode 100644
index 0000000..65935cf
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/is.xml
@@ -0,0 +1,33 @@
+<mythmenu name="Internet Steams">
+ <button>
+ <type>MOVIETIMES</type>
+ <text>Apple Trailers</text>
+ <action>MENU appletrailer.xml</action>
+ </button>
+
+ <button>
+ <type>STREAM</type>
+ <text>MythStream</text>
+ <action>PLUGIN mythstream</action>
+ <depends>mythstream</depends>
+ </button>
+
+ <button>
+ <type>STREAM</type>
+ <text>Miro Player</text>
+ <action>EXEC /usr/bin/democracyplayer</action>
+ </button>
+
+ <button>
+ <type>KnoppMyth</type>
+ <text>Sirius Satellite Radio</text>
+ <action>MENU siriusmenu.xml</action>
+ </button>
+
+ <button>
+ <type>KnoppMyth</type>
+ <text>XM Satellite Radio</text>
+ <action>MENU xmmenu.xml</action>
+ </button>
+
+</mythmenu>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/knoppmyth.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/knoppmyth.xml
new file mode 100644
index 0000000..8aa6134
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/knoppmyth.xml
@@ -0,0 +1,55 @@
+<mythmenu name="KnoppMyth">
+
+ <button>
+ <type>BACKUP</type>
+ <text>Backup KnoppMyth</text>
+ <action>MENU mythbackup.xml</action>
+ </button>
+
+ <button>
+ <type>RESTORE</type>
+ <text>Restore KnoppMyth</text>
+ <action>MENU mythrestore.xml</action>
+ </button>
+
+ <button>
+ <type>Motion</type>
+ <text>Motion</text>
+ <action>MENU motion.xml</action>
+ </button>
+<!--
+ <button>
+ <type>POWER</type>
+ <text>Power Off </text>
+ <action>EXEC /usr/bin/sudo halt</action>
+ </button>
+
+ <button>
+ <type>POWER</type>
+ <text>Reboot</text>
+ <action>EXEC /usr/bin/sudo reboot</action>
+ </button>
+
+ <button>
+ <type>VERSION</type>
+ <text>Version</text>
+ <action>EXEC /usr/local/bin/ver.sh</action>
+ </button>
+-->
+
+ <button>
+ <type>MV_SETUP_MENU</type>
+ <text>MythVantage Settings</text>
+ <action>MENU HOST_SETTINGS.xml</action>
+
+ </button>
+<!--
+ <button>
+ <type>MV_TEMPLATE</type>
+ <text>Settings profile manager</text>
+ <action>EXEC mythinstall -t </action>
+
+ </button>
+-->
+</mythmenu>
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/library.xml.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/library.xml.patch
new file mode 100644
index 0000000..ef08f0c
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/library.xml.patch
@@ -0,0 +1,13 @@
+--- library.xml.orig 2008-11-13 11:26:10.000000000 -0500
++++ library.xml 2008-11-19 11:55:55.000000000 -0500
+@@ -120,9 +120,7 @@
+ <button>
+ <type>STREAM</type>
+ <text>Play Online Streams</text>
+- <text lang="HE">נגן מדיה מכוונת</text>
+- <action>PLUGIN mythstream</action>
+- <depends>mythstream</depends>
++ <action>MENU is.xml</action>
+ </button>
+
+ <button>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/mainmenu.xml.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/mainmenu.xml.patch
new file mode 100644
index 0000000..f4f57f1
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/mainmenu.xml.patch
@@ -0,0 +1,16 @@
+--- mainmenu.xml.orig 2008-11-13 11:26:10.000000000 -0500
++++ mainmenu.xml 2008-11-19 12:01:57.000000000 -0500
+@@ -188,6 +188,13 @@
+ <action>MENU util_menu.xml</action>
+ </button>
+
++
++ <button>
++ <type>MENU_UTILITIES_SETUP</type>
++ <text>Service Menu</text>
++ <action>MENU knoppmyth.xml</action>
++ </button>
++
+ <!-- <button>
+ <type>SHUTDOWN</type>
+ <text>Shutdown</text>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/motion.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/motion.xml
new file mode 100644
index 0000000..23ebfe2
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/motion.xml
@@ -0,0 +1,20 @@
+<mythmenu name="Motion">
+
+ <button>
+ <type>MOTION</type>
+ <text>Start Motion</text>
+ <action>EXEC sudo /etc/init.d/motion start</action>
+ </button>
+
+ <button>
+ <type>MOTION</type>
+ <text>Stop Motion</text>
+ <action>EXEC sudo /etc/init.d/motion stop</action>
+ </button>
+
+ <button>
+ <type>MOTION</type>
+ <text>Clear Motion</text>
+ <action>EXEC /usr/local/bin/cm.sh</action>
+ </button>
+</mythmenu>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/optical_menu.xml.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/optical_menu.xml.patch
new file mode 100644
index 0000000..7e016a5
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/optical_menu.xml.patch
@@ -0,0 +1,15 @@
+--- optical_menu.xml.orig 2008-11-19 11:52:44.000000000 -0500
++++ optical_menu.xml 2008-11-19 12:32:19.000000000 -0500
+@@ -129,6 +129,12 @@
+ </button>
+
+ <button>
++ <type>DVD_RIP</type>
++ <text>Import video files from DVD</text>
++ <action>EXEC /usr/local/bin/importfiles.sh</action>
++ </button>
++
++ <button>
+ <type>EJECT</type>
+ <text>Eject media</text>
+ <text lang="IT">Espelli Media</text>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/setup.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/setup.xml
new file mode 100644
index 0000000..f56bb6f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/setup.xml
@@ -0,0 +1,111 @@
+<mythmenu name="MAIN">
+
+ <button>
+ <type>SETUP_GENERAL</type>
+ <text>1. General</text>
+ <text lang="IT">1. Generale</text>
+ <text lang="PT">1. Geral</text>
+ <text lang="SV">1. Generellt</text>
+ <text lang="JA">1. 一般</text>
+ <text lang="DE">1. Allgemeines</text>
+ <text lang="FI">1. Yleiset</text>
+ <text lang="FR">1. Général</text>
+ <text lang="SI">1. Splošno</text>
+ <text lang="ET">1. Üldine</text>
+ <text lang="NB">1 Generelt</text>
+ <text lang="DK">1. Generelt</text>
+ <text lang="ES">1. General</text>
+ <text lang="CZ">1. Obecný</text>
+ <text lang="RU">1. Общие</text>
+ <action>GENERAL</action>
+ </button>
+
+ <button>
+ <type>SETUP_CAPTURE_CARDS</type>
+ <text>2. Capture cards</text>
+ <text lang="IT">2. Schede di Acquisizione</text>
+ <text lang="PT">2. Placas de Captura</text>
+ <text lang="SV">2. TV-kort</text>
+ <text lang="JA">2. キャプチャカード</text>
+ <text lang="DE">2. TV-Karten</text>
+ <text lang="FI">2. TV-kortit</text>
+ <text lang="FR">2. Cartes d'acquisition</text>
+ <text lang="SI">2. Kartice za zajem</text>
+ <text lang="ET">2. TV-kaardid</text>
+ <text lang="NB">2 TV-kort</text>
+ <text lang="DK">2. TV-kort</text>
+ <text lang="ES">2. Capturadoras</text>
+ <text lang="CZ">2. Zachytávací karty</text>
+ <text lang="RU">2. Карты захвата</text>
+ <action>CAPTURE CARDS</action>
+ </button>
+
+ <button>
+ <type>SETUP_VIDEO_SOURCES</type>
+ <text>3. Video sources</text>
+ <text lang="IT">3. Fonte Video</text>
+ <text lang="PT">3. Fontes de Vídeo</text>
+ <text lang="SV">3. Videokällor</text>
+ <text lang="JA">3. ビデオソース</text>
+ <text lang="DE">3. Videoquellen</text>
+ <text lang="FI">3. Kuvanlähteet</text>
+ <text lang="FR">3. Sources vidéo</text>
+ <text lang="SI">3. Video viri</text>
+ <text lang="ET">3. Videosisendid</text>
+ <text lang="NB">3 Videokilder</text>
+ <text lang="DK">3. Videokilder</text>
+ <text lang="ES">3. Fuentes de Vídeo</text>
+ <text lang="CZ">3. Zdroje obrazu</text>
+ <text lang="RU">3. Видео источники</text>
+ <action>VIDEO SOURCES</action>
+ </button>
+
+ <button>
+ <type>SETUP_INPUT_CONNECTIONS</type>
+ <text>4. Input connections</text>
+ <text lang="IT">4. Connessioni di Ingresso</text>
+ <text lang="PT">4. Ligações de Entrada</text>
+ <text lang="SV">4. Anslutningar</text>
+ <text lang="JA">4. 入力とソースの接続</text>
+ <text lang="DE">4. Verknüpfungen</text>
+ <text lang="FI">4. Sisääntuloasetukset</text>
+ <text lang="FR">4. Entrées Vidéos</text>
+ <text lang="SI">4. Vhodne povezave</text>
+ <text lang="ET">4. Sisendite ühendused</text>
+ <text lang="NB">4 Inndata</text>
+ <text lang="DK">4. Indgange</text>
+ <text lang="ES">4. Conexiones</text>
+ <text lang="CZ">4. Připojení vstupů</text>
+ <text lang="RU">4. Соединение входов</text>
+ <action>CARD INPUTS</action>
+ </button>
+
+ <button>
+ <type>SETUP_CHANNEL_EDITOR</type>
+ <text>5. Channel Editor</text>
+ <text lang="IT">5. Modifica Canali</text>
+ <text lang="SV">5. Kanaleditor</text>
+ <text lang="JA">5. チャンネル設定</text>
+ <text lang="DE">5. Sender bearbeiten</text>
+ <text lang="FI">5. Kanavanviritys</text>
+ <text lang="FR">5. Editeur de chaînes</text>
+ <text lang="SI">5. Urejanje kanalov</text>
+ <text lang="ET">5. Kanaliredaktor</text>
+ <text lang="NB">5 Kanalredigerer</text>
+ <text lang="DK">5. Kanal opsætning</text>
+ <text lang="ES">5. Editor Canales</text>
+ <text lang="CZ">5. Editor kanálů</text>
+ <text lang="RU">5. Редактор каналов</text>
+ <action>CHANNEL EDITOR</action>
+ </button>
+
+ <button>
+ <type>SETUP_STORAGE_GROUPS</type>
+ <text>6. Storage Directories</text>
+ <text lang="IT">6. Cartelle</text>
+ <text lang="FI">Tallennusryhmät</text>
+ <text lang="SV">Lagringsgrupper</text>
+ <action>STORAGE GROUPS</action>
+ </button>
+
+</mythmenu>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/siriusmenu.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/siriusmenu.xml
new file mode 100644
index 0000000..e317b36
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/siriusmenu.xml
@@ -0,0 +1,419 @@
+<mythmenu name="SIRIUS">
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Hits 1</text>
+ <action>EXEC /usr/bin/cliSipie siriushits1</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>StarLite</text>
+ <action>EXEC /usr/bin/cliSipie starlite</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Love</text>
+ <action>EXEC /usr/bin/cliSipie siriuslove</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Movin EZ</text>
+ <action>EXEC /usr/bin/cliSipie movineasy</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Gold</text>
+ <action>EXEC /usr/bin/cliSipie siriusgold</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>'60s Vibrations</text>
+ <action>EXEC /usr/bin/cliSipie 60svibrations</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Totally '70s</text>
+ <action>EXEC /usr/bin/cliSipie totally70s</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Big '80s</text>
+ <action>EXEC /usr/bin/cliSipie big80s</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>ThePulse</text>
+ <action>EXEC /usr/bin/cliSipie thepulse</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Bridge</text>
+ <action>EXEC /usr/bin/cliSipie thebridge</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>BBC Radio 1</text>
+ <action>EXEC /usr/bin/cliSipie bbcradio1</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Super Shuffle</text>
+ <action>EXEC /usr/bin/cliSipie supershuffle</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Elvis Radio</text>
+ <action>EXEC /usr/bin/cliSipie elvisradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Classic Vinyl</text>
+ <action>EXEC /usr/bin/cliSipie classicvinyl</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Classic Rewind</text>
+ <action>EXEC /usr/bin/cliSipie classicrewind</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>TheVault</text>
+ <action>EXEC /usr/bin/cliSipie thevault</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Jam_ON</text>
+ <action>EXEC /usr/bin/cliSipie jamon</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Spectrum</text>
+ <action>EXEC /usr/bin/cliSipie thespectrum</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>BuzzSaw</text>
+ <action>EXEC /usr/bin/cliSipie buzzsaw</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Octane</text>
+ <action>EXEC /usr/bin/cliSipie octane</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Alt Nation</text>
+ <action>EXEC /usr/bin/cliSipie altnation</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>1st Wave</text>
+ <action>EXEC /usr/bin/cliSipie firstwave</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hair Nation</text>
+ <action>EXEC /usr/bin/cliSipie hairnation</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>'90s Alternative</text>
+ <action>EXEC /usr/bin/cliSipie 90salternative</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Garage</text>
+ <action>EXEC /usr/bin/cliSipie undergroundgarage</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Left of Center</text>
+ <action>EXEC /usr/bin/cliSipie leftofcenter</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hard Attack</text>
+ <action>EXEC /usr/bin/cliSipie hardattack</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Faction</text>
+ <action>EXEC /usr/bin/cliSipie faction</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Punk</text>
+ <action>EXEC /usr/bin/cliSipie punk</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>The Coffee House</text>
+ <action>EXEC /usr/bin/cliSipie coffeehouse</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Margaritaville</text>
+ <action>EXEC /usr/bin/cliSipie radiomargaritaville</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Disorder</text>
+ <action>EXEC /usr/bin/cliSipie siriusdisorder</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Reggae</text>
+ <action>EXEC /usr/bin/cliSipie reggaerhythms</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Area 33</text>
+ <action>EXEC /usr/bin/cliSipie area33</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Boombox</text>
+ <action>EXEC /usr/bin/cliSipie boombox</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Chill</text>
+ <action>EXEC /usr/bin/cliSipie chill</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>The Beat</text>
+ <action>EXEC /usr/bin/cliSipie thebeat</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Strobe</text>
+ <action>EXEC /usr/bin/cliSipie thestrobe</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hip-Hop Nation</text>
+ <action>EXEC /usr/bin/cliSipie hiphopnation</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>BackSpin</text>
+ <action>EXEC /usr/bin/cliSipie backspin</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Shade 45</text>
+ <action>EXEC /usr/bin/cliSipie shade45</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hot Jamz</text>
+ <action>EXEC /usr/bin/cliSipie hotjamz</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Heart &amp; Soul</text>
+ <action>EXEC /usr/bin/cliSipie heartandsoul</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>SoulTown</text>
+ <action>EXEC /usr/bin/cliSipie soultown</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>New Country</text>
+ <action>EXEC /usr/bin/cliSipie newcountry</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Prime Country</text>
+ <action>EXEC /usr/bin/cliSipie primecountry</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Roadhouse</text>
+ <action>EXEC /usr/bin/cliSipie theroadhouse</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Outlaw Country</text>
+ <action>EXEC /usr/bin/cliSipie outlawcountry</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Bluegrass</text>
+ <action>EXEC /usr/bin/cliSipie bluegrass</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Spirit</text>
+ <action>EXEC /usr/bin/cliSipie spirit</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Praise</text>
+ <action>EXEC /usr/bin/cliSipie praise</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Planet Jazz</text>
+ <action>EXEC /usr/bin/cliSipie planetjazz</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>JazzCafe</text>
+ <action>EXEC /usr/bin/cliSipie jazzcafe</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>PureJazz</text>
+ <action>EXEC /usr/bin/cliSipie purejazz</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Spa 73</text>
+ <action>EXEC /usr/bin/cliSipie spa73</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Blues</text>
+ <action>EXEC /usr/bin/cliSipie siriusblues</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Siriusly Sinatra</text>
+ <action>EXEC /usr/bin/cliSipie siriuslysinatra</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Broadway's Best</text>
+ <action>EXEC /usr/bin/cliSipie broadwaysbest</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Symphony Hall</text>
+ <action>EXEC /usr/bin/cliSipie symphonyhall</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Met Opera Radio</text>
+ <action>EXEC /usr/bin/cliSipie metropolitanopera</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Pops</text>
+ <action>EXEC /usr/bin/cliSipie siriuspops</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Universo Latino</text>
+ <action>EXEC /usr/bin/cliSipie universolatino</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Rumbon</text>
+ <action>EXEC /usr/bin/cliSipie rumbon</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Martha Stewart</text>
+ <action>EXEC /usr/bin/cliSipie marthastewartlivingradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Stars</text>
+ <action>EXEC /usr/bin/cliSipie siriusstars</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>OutQ Gay Radio</text>
+ <action>EXEC /usr/bin/cliSipie siriusoutq</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Patriot</text>
+ <action>EXEC /usr/bin/cliSipie siriuspatriot</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Left</text>
+ <action>EXEC /usr/bin/cliSipie siriusleft</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>CNN</text>
+ <action>EXEC /usr/bin/cliSipie cnn</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>wrn</text>
+ <action>EXEC /usr/bin/cliSipie wrn</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Blue Collar Comedy</text>
+ <action>EXEC /usr/bin/cliSipie bluecollarcomedy</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Raw Dog Comedy</text>
+ <action>EXEC /usr/bin/cliSipie rawdog</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Laugh Break Comedy</text>
+ <action>EXEC /usr/bin/cliSipie laughbreak</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>thefoxxhole</text>
+ <action>EXEC /usr/bin/cliSipie thefoxxhole</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>lime</text>
+ <action>EXEC /usr/bin/cliSipie lime</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Kids Stuff</text>
+ <action>EXEC /usr/bin/cliSipie kidsstuff</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Catholic Channel</text>
+ <action>EXEC /usr/bin/cliSipie thecatholicchannel</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>EWTN</text>
+ <action>EXEC /usr/bin/cliSipie ewtnglobal</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>christiantalk</text>
+ <action>EXEC /usr/bin/cliSipie christiantalk</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius NFL Radio</text>
+ <action>EXEC /usr/bin/cliSipie siriusnflradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Maxim Radio</text>
+ <action>EXEC /usr/bin/cliSipie maximradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Cosmo Radio</text>
+ <action>EXEC /usr/bin/cliSipie cosmopolitanradio</action>
+ </button>
+ <button>
+ <type>TV_DELETE</type>
+ <text>Stop Listening</text>
+ <action>EXEC /usr/bin/sipie_kill</action>
+ </button>
+
+</mythmenu>
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/xmmenu.xml b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/xmmenu.xml
new file mode 100644
index 0000000..6b26d11
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/menu-xml/xmmenu.xml
@@ -0,0 +1,574 @@
+<!-- Current as of April 25, 2007 -->
+<mythmenu name="XM">
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '40s</text>
+ <action>EXEC /usr/bin/xamp kill 4</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '50s</text>
+ <action>EXEC /usr/bin/xamp kill 5</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '60s</text>
+ <action>EXEC /usr/bin/xamp kill 6</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '70s</text>
+ <action>EXEC /usr/bin/xamp kill 7</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '80s</text>
+ <action>EXEC /usr/bin/xamp kill 8</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '90s</text>
+ <action>EXEC /usr/bin/xamp kill 9</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>America</text>
+ <action>EXEC /usr/bin/xamp kill 10</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>X Country</text>
+ <action>EXEC /usr/bin/xamp kill 12</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Willie's Place</text>
+ <action>EXEC /usr/bin/xamp kill 13</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Bluegrass Junction</text>
+ <action>EXEC /usr/bin/xamp kill 14</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Village</text>
+ <action>EXEC /usr/bin/xamp kill 15</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Highway 16</text>
+ <action>EXEC /usr/bin/xamp kill 16</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>US Country</text>
+ <action>EXEC /usr/bin/xamp kill 17</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>20 on 20</text>
+ <action>EXEC /usr/bin/xamp kill 20</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Heart</text>
+ <action>EXEC /usr/bin/xamp kill 23</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Blend</text>
+ <action>EXEC /usr/bin/xamp kill 25</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Flight 26</text>
+ <action>EXEC /usr/bin/xamp kill 26</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Cinemagic</text>
+ <action>EXEC /usr/bin/xamp kill 27</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>On Broadway</text>
+ <action>EXEC /usr/bin/xamp kill 28</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>U-Pop</text>
+ <action>EXEC /usr/bin/xamp kill 29</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Hitlist</text>
+ <action>EXEC /usr/bin/xamp kill 30</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Torch</text>
+ <action>EXEC /usr/bin/xamp kill 31</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Message</text>
+ <action>EXEC /usr/bin/xamp kill 32</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Spirit</text>
+ <action>EXEC /usr/bin/xamp kill 33</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>enLighten</text>
+ <action>EXEC /usr/bin/xamp kill 34</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Deep Tracks</text>
+ <action>EXEC /usr/bin/xamp kill 40</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Boneyard</text>
+ <action>EXEC /usr/bin/xamp kill 41</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Liquid Metal</text>
+ <action>EXEC /usr/bin/xamp kill 42</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XMU</text>
+ <action>EXEC /usr/bin/xamp kill 43</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fred</text>
+ <action>EXEC /usr/bin/xamp kill 44</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Cafe</text>
+ <action>EXEC /usr/bin/xamp kill 45</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Top Tracks</text>
+ <action>EXEC /usr/bin/xamp kill 46</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Ethel</text>
+ <action>EXEC /usr/bin/xamp kill 47</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Squizz</text>
+ <action>EXEC /usr/bin/xamp kill 48</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Big Tracks</text>
+ <action>EXEC /usr/bin/xamp kill 49</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Loft</text>
+ <action>EXEC /usr/bin/xamp kill 50</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Music Lab</text>
+ <action>EXEC /usr/bin/xamp kill 51</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Verge</text>
+ <action>EXEC /usr/bin/xamp kill 52</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fungus</text>
+ <action>EXEC /usr/bin/xamp kill 53</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Lucy</text>
+ <action>EXEC /usr/bin/xamp kill 54</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Soul Street</text>
+ <action>EXEC /usr/bin/xamp kill 60</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Flow</text>
+ <action>EXEC /usr/bin/xamp kill 61</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Suite 62</text>
+ <action>EXEC /usr/bin/xamp kill 62</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Groove</text>
+ <action>EXEC /usr/bin/xamp kill 64</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Rhyme</text>
+ <action>EXEC /usr/bin/xamp kill 65</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>RAW</text>
+ <action>EXEC /usr/bin/xamp kill 66</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The City</text>
+ <action>EXEC /usr/bin/xamp kill 67</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Heat</text>
+ <action>EXEC /usr/bin/xamp kill 68</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Real Jazz</text>
+ <action>EXEC /usr/bin/xamp kill 70</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Watercolors</text>
+ <action>EXEC /usr/bin/xamp kill 71</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Beyond Jazz</text>
+ <action>EXEC /usr/bin/xamp kill 72</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>High Standards</text>
+ <action>EXEC /usr/bin/xamp kill 73</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Bluesville</text>
+ <action>EXEC /usr/bin/xamp kill 74</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Hear Music</text>
+ <action>EXEC /usr/bin/xamp kill 75</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fine Tuning</text>
+ <action>EXEC /usr/bin/xamp kill 76</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Audio Visions</text>
+ <action>EXEC /usr/bin/xamp kill 77</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Escape</text>
+ <action>EXEC /usr/bin/xamp kill 78</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>On The Rocks</text>
+ <action>EXEC /usr/bin/xamp kill 79</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Move</text>
+ <action>EXEC /usr/bin/xamp kill 80</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>BPM</text>
+ <action>EXEC /usr/bin/xamp kill 81</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The System</text>
+ <action>EXEC /usr/bin/xamp kill 82</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Chrome</text>
+ <action>EXEC /usr/bin/xamp kill 83</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM-Chill</text>
+ <action>EXEC /usr/bin/xamp kill 84</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fuego</text>
+ <action>EXEC /usr/bin/xamp kill 90</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Viva</text>
+ <action>EXEC /usr/bin/xamp kill 91</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Aguila</text>
+ <action>EXEC /usr/bin/xamp kill 92</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Caliente</text>
+ <action>EXEC /usr/bin/xamp kill 94</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Luna</text>
+ <action>EXEC /usr/bin/xamp kill 95</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Air Musique</text>
+ <action>EXEC /usr/bin/xamp kill 100</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Joint</text>
+ <action>EXEC /usr/bin/xamp kill 101</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Sur La Route</text>
+ <action>EXEC /usr/bin/xamp kill 102</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>World Zone</text>
+ <action>EXEC /usr/bin/xamp kill 103</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Ngoma</text>
+ <action>EXEC /usr/bin/xamp kill 104</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Classics</text>
+ <action>EXEC /usr/bin/xamp kill 110</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Vox</text>
+ <action>EXEC /usr/bin/xamp kill 112</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Pops</text>
+ <action>EXEC /usr/bin/xamp kill 113</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Kids</text>
+ <action>EXEC /usr/bin/xamp kill 116</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Bob Edwards Show</text>
+ <action>EXEC /usr/bin/xamp kill 133</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Comedy</text>
+ <action>EXEC /usr/bin/xamp kill 150</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Laugh USA</text>
+ <action>EXEC /usr/bin/xamp kill 151</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Special X</text>
+ <action>EXEC /usr/bin/xamp kill 154</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Agenda</text>
+ <action>EXEC /usr/bin/xamp kill 134</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Oprah and Friends</text>
+ <action>EXEC /usr/bin/xamp kill 156</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Virus</text>
+ <action>EXEC /usr/bin/xamp kill 202</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>1 Hit Wonders</text>
+ <action>EXEC /usr/bin/xamp kill 300</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Metalcore</text>
+ <action>EXEC /usr/bin/xamp kill 301</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Indie First</text>
+ <action>EXEC /usr/bin/xamp kill 302</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Late Night Mix</text>
+ <action>EXEC /usr/bin/xamp kill 303</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Sessions@AOL</text>
+ <action>EXEC /usr/bin/xamp kill 304</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Shuffle</text>
+ <action>EXEC /usr/bin/xamp kill 305</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Rock First</text>
+ <action>EXEC /usr/bin/xamp kill 306</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Country First</text>
+ <action>EXEC /usr/bin/xamp kill 307</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Hip Hop First</text>
+ <action>EXEC /usr/bin/xamp kill 308</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Pop First</text>
+ <action>EXEC /usr/bin/xamp kill 309</action>
+ </button>
+
+ <button>
+ <type>TV_DELETE</type>
+ <text>Stop Listening</text>
+ <action>EXEC /usr/bin/xamp kill</action>
+ </button>
+
+</mythmenu>
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/mpegrecorder-hdpvr-v1.1.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/mpegrecorder-hdpvr-v1.1.patch
new file mode 100644
index 0000000..f292b7f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/mpegrecorder-hdpvr-v1.1.patch
@@ -0,0 +1,658 @@
+Index: libs/libmythtv/mpegrecorder.h
+===================================================================
+--- libs/libmythtv/mpegrecorder.h (revision 19056)
++++ libs/libmythtv/mpegrecorder.h (working copy)
+@@ -80,11 +80,13 @@
+ uint GetFilteredAudioLayer(void) const;
+ uint GetFilteredAudioBitRate(uint audio_layer) const;
+
++ void RestartEncoding(void);
+ bool StartEncoding(int fd);
+ bool StopEncoding(int fd);
+
+ void ResetForNewFile(void);
+
++ bool WaitFor_HDPVR(void);
+ void HandleResolutionChanges(void);
+
+ inline bool CheckCC(uint pid, uint cc);
+@@ -104,7 +106,6 @@
+ // State
+ bool recording;
+ bool encoding;
+- bool needs_resolution;
+ mutable QMutex start_stop_encoding_lock;
+ QMutex recording_wait_lock;
+ QWaitCondition recording_wait;
+@@ -113,7 +114,7 @@
+ bool cleartimeonpause;
+
+ // Encoding info
+- int width, height;
++ uint width, height;
+ int bitrate, maxbitrate, streamtype, aspectratio;
+ int audtype, audsamplerate, audbitratel1, audbitratel2, audbitratel3;
+ int audvolume;
+Index: libs/libmythtv/mpegrecorder.cpp
+===================================================================
+--- libs/libmythtv/mpegrecorder.cpp (revision 19056)
++++ libs/libmythtv/mpegrecorder.cpp (working copy)
+@@ -19,6 +19,7 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
++#include <sys/poll.h>
+
+ // avlib headers
+ extern "C" {
+@@ -86,7 +87,7 @@
+ requires_special_pause(false),
+ // State
+ recording(false), encoding(false),
+- needs_resolution(false), start_stop_encoding_lock(QMutex::Recursive),
++ start_stop_encoding_lock(QMutex::Recursive),
+ recording_wait_lock(), recording_wait(),
+ // Pausing state
+ cleartimeonpause(false),
+@@ -487,13 +488,21 @@
+
+ bool MpegRecorder::SetFormat(int chanfd)
+ {
++ uint idx;
+ struct v4l2_format vfmt;
+ bzero(&vfmt, sizeof(vfmt));
+
+ vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+- if (ioctl(chanfd, VIDIOC_G_FMT, &vfmt) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_G_FMT, &vfmt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 10)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Error getting format" + ENO);
+ return false;
+ }
+@@ -501,8 +510,15 @@
+ vfmt.fmt.pix.width = width;
+ vfmt.fmt.pix.height = height;
+
+- if (ioctl(chanfd, VIDIOC_S_FMT, &vfmt) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_FMT, &vfmt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Error setting format" + ENO);
+ return false;
+ }
+@@ -513,10 +529,19 @@
+ /// Set audio language mode
+ bool MpegRecorder::SetLanguageMode(int chanfd)
+ {
++ uint idx;
+ struct v4l2_tuner vt;
+ bzero(&vt, sizeof(struct v4l2_tuner));
+- if (ioctl(chanfd, VIDIOC_G_TUNER, &vt) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_G_TUNER, &vt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN + "Unable to get audio mode" + ENO);
+ return false;
+ }
+@@ -549,8 +574,15 @@
+ success = false;
+ }
+
+- if (ioctl(chanfd, VIDIOC_S_TUNER, &vt) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_TUNER, &vt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN + "Unable to set audio mode" + ENO);
+ success = false;
+ }
+@@ -561,10 +593,19 @@
+ bool MpegRecorder::SetRecordingVolume(int chanfd)
+ {
+ // Get volume min/max values
++ uint idx;
+ struct v4l2_queryctrl qctrl;
+ qctrl.id = V4L2_CID_AUDIO_VOLUME;
+- if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to get recording volume parameters(max/min)" + ENO +
+ "\n\t\t\tusing default range [0,65535].");
+@@ -582,8 +623,15 @@
+ ctrl.id = V4L2_CID_AUDIO_VOLUME;
+ ctrl.value = ctrl_volume;
+
+- if (ioctl(chanfd, VIDIOC_S_CTRL, &ctrl) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_CTRL, &ctrl) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to set recording volume" + ENO + "\n\t\t\t" +
+ "If you are using an AverMedia M179 card this is normal.");
+@@ -765,6 +813,7 @@
+
+ for (uint i = 0; i < ext_ctrls.size(); i++)
+ {
++ uint idx;
+ struct v4l2_ext_controls ctrls;
+ bzero(&ctrls, sizeof(struct v4l2_ext_controls));
+
+@@ -774,8 +823,15 @@
+ ctrls.count = 1;
+ ctrls.controls = &ext_ctrls[i];
+
+- if (ioctl(fd, VIDIOC_S_EXT_CTRLS, &ctrls) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(fd, VIDIOC_S_EXT_CTRLS, &ctrls) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ QMutexLocker locker(&control_description_lock);
+ VERBOSE(VB_IMPORTANT, QString("mpegrecorder.cpp:set_ctrls(): ") +
+ QString("Could not set %1 to %2")
+@@ -814,6 +870,30 @@
+ {
+ maxbitrate = high_mpeg4peakbitrate;
+ bitrate = high_mpeg4avgbitrate;
++
++ // query supported audio codecs and prefer AC3
++ uint idx;
++ struct v4l2_queryctrl qctrl;
++ qctrl.id = V4L2_CID_MPEG_AUDIO_ENCODING;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
++ if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
++ VERBOSE(VB_IMPORTANT, LOC_WARN +
++ "Unable to get supported audio codecs." + ENO);
++ }
++ else
++ {
++ if (qctrl.minimum != qctrl.maximum)
++ add_ext_ctrl(ext_ctrls, V4L2_CID_MPEG_AUDIO_ENCODING,
++ qctrl.maximum);
++ }
+ }
+ maxbitrate = std::max(maxbitrate, bitrate);
+
+@@ -837,19 +917,36 @@
+ int audioinput = audiodevice.toUInt(&ok);
+ if (ok)
+ {
++ uint idx;
+ struct v4l2_audio ain;
+ bzero(&ain, sizeof(ain));
+ ain.index = audioinput;
+- if (ioctl(chanfd, VIDIOC_ENUMAUDIO, &ain) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_ENUMAUDIO, &ain) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to get audio input.");
+ }
+ else
+ {
+ ain.index = audioinput;
+- if (ioctl(chanfd, VIDIOC_S_AUDIO, &ain) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_AUDIO, &ain) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to set audio input.");
+ }
+@@ -1036,17 +1133,26 @@
+ if (deviceIsMpegFile)
+ elapsedTimer.start();
+ else if (_device_read_buffer)
+- _device_read_buffer->Start();
++ {
++ VERBOSE(VB_RECORD, LOC + "Initial startup of recorder");
+
+- needs_resolution = (driver == "hdpvr");
++ if (StartEncoding(readfd))
++ _device_read_buffer->Start();
++ else
++ {
++ VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to start recording");
++ recording = false;
++ QMutexLocker locker(&recording_wait_lock);
++ recording_wait.wakeAll();
++ _error = true;
++ }
++ }
+
+ QByteArray vdevice = videodevice.toAscii();
+ while (encoding && !_error)
+ {
+ if (PauseAndWait(100))
+ continue;
+-
+- HandleResolutionChanges();
+
+ if (deviceIsMpegFile)
+ {
+@@ -1090,35 +1196,7 @@
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Device error detected");
+
+- _device_read_buffer->Stop();
+-
+- QMutexLocker locker(&start_stop_encoding_lock);
+-
+- StopEncoding(readfd);
+-
+- // Make sure the next things in the file are a PAT & PMT
+- if (_stream_data->PATSingleProgram() &&
+- _stream_data->PMTSingleProgram())
+- {
+- bool tmp = _wait_for_keyframe_option;
+- _wait_for_keyframe_option = false;
+- HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+- HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+- _wait_for_keyframe_option = tmp;
+- }
+-
+- if (StartEncoding(readfd))
+- {
+- _device_read_buffer->Start();
+- }
+- else
+- {
+- if (0 != close(readfd))
+- VERBOSE(VB_IMPORTANT, LOC_ERR + "Close error" + ENO);
+-
+- // Force card to be reopened on next iteration..
+- readfd = -1;
+- }
++ RestartEncoding();
+ }
+ else if (_device_read_buffer->IsEOF())
+ {
+@@ -1216,6 +1294,8 @@
+ }
+ }
+
++ VERBOSE(VB_RECORD, LOC + "StartRecording finishing up");
++
+ if (_device_read_buffer)
+ {
+ if (_device_read_buffer->IsRunning())
+@@ -1224,6 +1304,7 @@
+ delete _device_read_buffer;
+ _device_read_buffer = NULL;
+ }
++
+ StopEncoding(readfd);
+
+ FinishRecording();
+@@ -1373,52 +1454,95 @@
+
+ if (!paused)
+ {
++ VERBOSE(VB_RECORD, LOC + "PauseAndWait pause");
++
++ // Some drivers require streaming to be disabled before
++ // an input switch and other channel format setting.
++ if (requires_special_pause)
++ StopEncoding(readfd);
++
+ if (_device_read_buffer)
+ {
+ QMutex drb_lock;
+ drb_lock.lock();
+-
+ _device_read_buffer->SetRequestPause(true);
+-
+ pauseWait.wait(&drb_lock, timeout);
+ }
+ else
+- {
+- paused = true;
+ pauseWait.wakeAll();
+- }
+
+- // Some drivers require streaming to be disabled before
+- // an input switch and other channel format setting.
+- if (requires_special_pause)
+- StopEncoding(readfd);
+-
++ paused = true;
+ if (tvrec)
+ tvrec->RecorderPaused();
+ }
+
+ unpauseWait.wait(&waitlock, timeout);
+ }
+- if (!request_pause)
++
++ if (!request_pause && paused)
+ {
+- if (paused)
++ VERBOSE(VB_RECORD, LOC + "PauseAndWait unpause");
++
++ if (driver == "hdpvr")
+ {
+- // Some drivers require streaming to be disabled before
+- // an input switch and other channel format setting.
+- if (requires_special_pause)
+- StartEncoding(readfd);
++ m_h264_parser.Reset();
++ _wait_for_keyframe_option = true;
++ _seen_sps = false;
+
+- if (_device_read_buffer)
+- _device_read_buffer->SetRequestPause(false);
++ // Sleep any less than 1.5 seconds, and the HD-PVR will
++ // return the old resolution, when the resolution is changing.
++ usleep(1500 * 1000);
++ }
+
+- if (_stream_data)
+- _stream_data->Reset(_stream_data->DesiredProgram());
+- }
++ // Some drivers require streaming to be disabled before
++ // an input switch and other channel format setting.
++ if (requires_special_pause)
++ StartEncoding(readfd);
++
++ if (_device_read_buffer)
++ _device_read_buffer->SetRequestPause(false);
++
++ if (_stream_data)
++ _stream_data->Reset(_stream_data->DesiredProgram());
++
+ paused = false;
+ }
++
+ return paused;
+ }
+
++void MpegRecorder::RestartEncoding(void)
++{
++ VERBOSE(VB_RECORD, LOC + "RestartEncoding");
++
++ _device_read_buffer->Stop();
++
++ QMutexLocker locker(&start_stop_encoding_lock);
++
++ StopEncoding(readfd);
++
++ // Make sure the next things in the file are a PAT & PMT
++ if (_stream_data->PATSingleProgram() &&
++ _stream_data->PMTSingleProgram())
++ {
++ _wait_for_keyframe_option = false;
++ HandleSingleProgramPAT(_stream_data->PATSingleProgram());
++ HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
++ }
++
++ if (StartEncoding(readfd))
++ {
++ _device_read_buffer->Start();
++ }
++ else
++ {
++ if (0 != close(readfd))
++ VERBOSE(VB_IMPORTANT, LOC_ERR + "Close error" + ENO);
++
++ readfd = -1;
++ }
++}
++
+ bool MpegRecorder::StartEncoding(int fd)
+ {
+ QMutexLocker locker(&start_stop_encoding_lock);
+@@ -1427,13 +1551,22 @@
+ memset(&command, 0, sizeof(struct v4l2_encoder_cmd));
+ command.cmd = V4L2_ENC_CMD_START;
+
++ if (driver == "hdpvr")
++ HandleResolutionChanges();
++
+ VERBOSE(VB_RECORD, LOC + "StartEncoding");
+- needs_resolution = (driver == "hdpvr");
+
+- for (int idx = 0; idx < 10; ++idx)
++ for (int idx = 0; idx < 20; ++idx)
+ {
+ if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0)
+ {
++ if (driver == "hdpvr")
++ {
++ m_h264_parser.Reset();
++ _wait_for_keyframe_option = true;
++ _seen_sps = false;
++ }
++
+ VERBOSE(VB_RECORD, LOC + "Encoding started");
+ return true;
+ }
+@@ -1444,7 +1577,7 @@
+ return false;
+ }
+
+- usleep(250 * 1000);
++ usleep(100 * 1000);
+ }
+
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "StartEncoding - giving up" + ENO);
+@@ -1461,9 +1594,8 @@
+
+ VERBOSE(VB_RECORD, LOC + "StopEncoding");
+
+- for (int idx = 0; idx < 10; ++idx)
++ for (int idx = 0; idx < 20; ++idx)
+ {
+-
+ if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0)
+ {
+ VERBOSE(VB_RECORD, LOC + "Encoding stopped");
+@@ -1476,7 +1608,7 @@
+ return false;
+ }
+
+- usleep(250 * 1000);
++ usleep(100 * 1000);
+ }
+
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "StopEncoding - giving up" + ENO);
+@@ -1544,7 +1676,7 @@
+ void MpegRecorder::HandleSingleProgramPMT(ProgramMapTable *pmt)
+ {
+ if (!pmt)
+-{
++ {
+ return;
+ }
+
+@@ -1564,27 +1696,89 @@
+ DTVRecorder::BufferedWrite(*(reinterpret_cast<TSPacket*>(&buf[i])));
+ }
+
++bool MpegRecorder::WaitFor_HDPVR(void)
++{
++ // After a resolution change, it can take the HD-PVR a few
++ // seconds before it is usable again.
++
++ // Tell it to start encoding, then wait for it to actually feed us
++ // some data.
++ QMutexLocker locker(&start_stop_encoding_lock);
++
++ struct v4l2_encoder_cmd command;
++ struct pollfd polls;
++ int idx;
++
++ memset(&command, 0, sizeof(struct v4l2_encoder_cmd));
++ command.cmd = V4L2_ENC_CMD_START;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
++ if (ioctl(readfd, VIDIOC_ENCODER_CMD, &command) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ return false;
++
++ polls.fd = readfd;
++ polls.events = POLLIN;
++ polls.revents = 0;
++
++ for (idx = 0; idx < 10; ++idx)
++ {
++ if (poll(&polls, 1, 250) > 0)
++ break;
++ }
++
++ if (idx == 10)
++ return false;
++
++ // HD-PVR should now be "ready"
++ command.cmd = V4L2_ENC_CMD_STOP;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
++ if (ioctl(readfd, VIDIOC_ENCODER_CMD, &command) == 0)
++ return true;
++ usleep(100 * 1000);
++ }
++
++ return false;
++}
++
+ void MpegRecorder::HandleResolutionChanges(void)
+ {
+- if (!needs_resolution)
+- return;
+-
+ VERBOSE(VB_RECORD, LOC + "Checking Resolution");
+ struct v4l2_format vfmt;
+ memset(&vfmt, 0, sizeof(vfmt));
+ vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
++ if (driver == "hdpvr")
++ WaitFor_HDPVR();
++
++ uint idx;
+ uint pix = 0;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
+ if (0 == ioctl(chanfd, VIDIOC_G_FMT, &vfmt))
+ {
+ VERBOSE(VB_RECORD, LOC + QString("Got Resolution %1x%2")
+ .arg(vfmt.fmt.pix.width).arg(vfmt.fmt.pix.height));
+ pix = vfmt.fmt.pix.width * vfmt.fmt.pix.height;
+- needs_resolution = false;
++ break;
++ }
++ // Typically takes 0.9 seconds after a resolution change
++ usleep(100 * 1000);
+ }
+
+ if (!pix)
++ {
++ VERBOSE(VB_RECORD, LOC + "Giving up detecting resolution");
+ return; // nothing to do, we don't have a resolution yet
++ }
+
+ int old_max = maxbitrate, old_avg = bitrate;
+ if (pix <= 768*568)
+@@ -1609,13 +1803,14 @@
+ if (old_max == old_avg)
+ {
+ VERBOSE(VB_RECORD, LOC +
+- QString("Old bitrate %1 CBR").arg(old_avg));
++ QString("Old bitrate %1 CBR for %2x%3")
++ .arg(old_avg).arg(width).arg(height));
+ }
+ else
+ {
+ VERBOSE(VB_RECORD, LOC +
+- QString("Old bitrate %1/%2 VBR")
+- .arg(old_avg).arg(old_max));
++ QString("Old bitrate %1/%2 VBR for %3x%4")
++ .arg(old_avg).arg(old_max).arg(width).arg(height));
+ }
+
+ if (maxbitrate == bitrate)
+@@ -1642,12 +1837,6 @@
+ maxbitrate * 1000);
+
+ set_ctrls(readfd, ext_ctrls);
++
+ }
+-
+- // Restart streaming. Shouldn't be needed? seems to be with current driver.
+- QMutexLocker locker(&start_stop_encoding_lock);
+- StopEncoding(readfd);
+- StartEncoding(readfd);
+-
+- needs_resolution = false;
+ }
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/myth.sh b/abs/core-testing/mythtv/trunk/mythtv-svn/myth.sh
new file mode 100755
index 0000000..fb7122c
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/myth.sh
@@ -0,0 +1,4 @@
+export PATH=$PATH:/usr/local/bin
+# set core file size to 0
+ulimit -c 0
+export MALLOC_CHECK_=0 \ No newline at end of file
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/mythbackend b/abs/core-testing/mythtv/trunk/mythtv-svn/mythbackend
new file mode 100755
index 0000000..f96c6b7
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/mythbackend
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/mythbackend`
+case "$1" in
+ start)
+ stat_busy "Starting MythTV Backend"
+ [ ! -e /var/run/mysqld.pid ] && echo -n "mysqld not started" && stat_fail && exit
+ [ -z "$PID" ] && /usr/local/bin/mythbackend -d -l /var/log/mythbackend.log -v quiet
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/mythbackend.pid
+ add_daemon mythbackend
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping MythTV Backend"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mythbackend
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/mythbackend.sh b/abs/core-testing/mythtv/trunk/mythtv-svn/mythbackend.sh
new file mode 100755
index 0000000..e7a7b70
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/mythbackend.sh
@@ -0,0 +1,117 @@
+#!/bin/bash
+#
+# /etc/rc.d/init.d/mythbackend
+#
+# Starts the mythbackend as a daemon
+#
+# chkconfig: 345 90 10
+# description: Starts the mythbackend process as a daemon after the XWindows \
+# system is started, in runlevel 5. This allows scheduled \
+# recordings to occur without manual intervention.
+# processname: mythbackend
+
+# Copyright (c) by Michael Thomson <linux at m-thomson dot net>
+# With thanks to Stu Tomlinson <stu at nosnilmot dot com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Default values to use if none are supplied in the config file.
+# User who should start the mythbackend processes
+MBE_USER="root"
+# Directory holding the mythbackend binary
+MBE_LOCATION="/usr/local/bin/"
+# Name of mythbackend binary
+MBE_PROG="mythbackend"
+# Full path to mythbackend log file
+MBE_LOGFILE="/var/log/mythtv/mythbackend.log"
+
+# Source function library.
+. /etc/init.d/functions
+
+# Source config file if available
+if [ -f "/etc/sysconfig/mythbackend" ]; then
+ . /etc/sysconfig/mythbackend
+fi
+
+test -x ${MBE_LOCATION}${MBE_PROG} || exit 0
+
+RETVAL=0
+
+#
+# See how we were called.
+#
+
+start() {
+ # Check if mythbackend is already running
+ if [ ! -f /var/lock/subsys/${MBE_PROG} ]; then
+ echo -n "Starting ${MBE_PROG}: "
+ # /usr/local/bin/mythbackend -d -l /some/log/file
+ #daemon --user ${MBE_USER} ${MBE_LOCATION}${MBE_PROG} -d -l ${MBE_LOGFILE}
+ ${MBE_LOCATION}${MBE_PROG} -d -l ${MBE_LOGFILE}
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/${MBE_PROG}
+ echo
+ fi
+ return $RETVAL
+}
+
+stop() {
+ echo -n "Stopping ${MBE_PROG}: "
+ killproc ${MBE_LOCATION}${MBE_PROG}
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${MBE_PROG}
+ echo
+ return $RETVAL
+}
+
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+status_at() {
+ status ${MBE_LOCATION}${MBE_PROG}
+}
+
+case "$1" in
+start)
+ start
+ ;;
+stop)
+ stop
+ ;;
+reload|restart)
+ restart
+ ;;
+condrestart)
+ if [ -f /var/lock/subsys/${MBE_PROG} ]; then
+ restart
+ fi
+ ;;
+status)
+ status_at
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $?
+exit $RETVAL
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/mythcommflag-avidemux.2.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/mythcommflag-avidemux.2.patch
new file mode 100644
index 0000000..d26645f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/mythcommflag-avidemux.2.patch
@@ -0,0 +1,179 @@
+Index: programs/mythcommflag/main.cpp
+===================================================================
+--- programs/mythcommflag/main.cpp (revision 18596)
++++ programs/mythcommflag/main.cpp (working copy)
+@@ -300,6 +300,132 @@
+ return COMMFLAG_EXIT_NO_ERROR_WITH_NO_BREAKS;
+ }
+
++int GetAviDemux(QString list, QString chanid, QString starttime, const QString &outputfilename)
++{
++ QMap<long long, int> cutlist;
++ QMap<long long, int>::Iterator it;
++ QString result;
++ int startValue = 0;
++ long long myTotalFrames;
++ long long myFrameRate;
++
++ ProgramInfo *pginfo =
++ ProgramInfo::GetProgramFromRecorded(chanid, starttime);
++
++ NuppelVideoPlayer* nvp = new NuppelVideoPlayer("avidemux_export", pginfo);
++
++ myFrameRate = (long long)(nvp->GetFrameRate() * 1000);
++ myTotalFrames = 1000000; //nvp->GetTotalFrameCount();
++
++ if (!pginfo)
++ {
++ VERBOSE(VB_IMPORTANT,
++ QString("No program data exists for channel %1 at %2")
++ .arg(chanid).arg(starttime));
++ return COMMFLAG_BUGGY_EXIT_NO_CHAN_DATA;
++ }
++
++ QString filename = pginfo->GetPlaybackURL(TRUE);
++
++ if (list == "cutlist")
++ pginfo->GetCutList(cutlist);
++ else
++ pginfo->GetCommBreakList(cutlist);
++
++// Formatting of output data
++
++ for (it = cutlist.begin(); it != cutlist.end(); ++it)
++ {
++ if ((it.key() == 0) && (startValue == 0)) // Cutlist starts on first frame,
++ {
++ ++it;
++ startValue = it.key();
++ }
++
++ if ((it.key() != 0) && (startValue == 0)) // Cutlist starts on non-first frame
++ {
++ result += QString("app.addSegment(0,0,%1);").arg(it.key());
++ startValue = it.key();
++ }
++ else
++ {
++ if ((*it == MARK_COMM_END) && (startValue != 0) ||
++ (*it == MARK_CUT_END) && (startValue != 0))
++ {
++ if (result != "")
++ result += "\n";
++ startValue = it.key();
++ result += QString("app.addSegment(0,%1,").arg(it.key()); // Value is a start value
++ }
++ else
++ {
++ result += QString("%1);").arg(it.key() - startValue); // Value is an end value
++ }
++ }
++ }
++
++if (it.key() != myTotalFrames)
++ {
++ result += QString("%1);").arg(myTotalFrames);
++ }
++
++// Governs the file output:
++
++ QString tmp = "";
++ ostream *out = &cout;
++
++ if (outputfilename != "-"){
++ QByteArray tmp = outputfilename.toLocal8Bit();
++ out = new fstream(tmp.constData(), ios::app | ios::out );
++ }
++
++ if (outputfilename == ""){
++ VERBOSE(VB_IMPORTANT,
++ QString("Error: AVIDemux output requires the use of the --outputfile option."));
++ return COMMFLAG_EXIT_INVALID_CMDLINE;
++ }
++
++ tmp = QString("//AD <- Needed to identify//\n"
++ "//--automatically built--\n"
++ "//--Project:\n\n"
++ "var app = new Avidemux();\n\n"
++ "//** Video **\n"
++ "// 01 videos source\n"
++ "app.load(\"%1\");\n\n"
++ "app.clearSegments();\n\n"
++ "%2\n"
++ "app.markerA=0;\n"
++ "app.markerB=%3;\n"
++ "app.rebuildIndex();\n\n"
++ "//** Postproc **\n"
++ "app.video.setPostProc(3,3,0);\n\n"
++ "app.video.setFps1000(%4);\n\n"
++ "//** Filters **\n\n"
++ "//** Video Codec conf **\n"
++ "app.video.codec(\"Copy\",\"CQ=4\",\"0 \");\n\n"
++ "//** Audio **\n"
++ "app.audio.reset();\n"
++ "app.audio.codec(\"copy\",128,0,\"\");\n"
++ "app.audio.normalizeMode=0;\n"
++ "app.audio.normalizeValue=0;\n"
++ "app.audio.delay=0;\n"
++ "app.audio.mixer(\"NONE\");\n"
++ "app.setContainer(\"AVI\");\n"
++ "setSuccess(1);\n"
++ "//app.Exit();\n\n"
++ "//End of script\n").arg(filename).arg(result).arg(myTotalFrames).arg(myFrameRate).toLocal8Bit().constData();
++
++ const QByteArray tmp2 = tmp.toLocal8Bit();
++ *out << tmp2.constData() << endl;
++
++ VERBOSE(VB_IMPORTANT,
++ QString("AVIDemux Project generated for %1 at %2 with filename %3.")
++ .arg(chanid).arg(starttime).arg(outputfilename));
++
++ return COMMFLAG_EXIT_NO_ERROR_WITH_NO_BREAKS;
++}
++
++
+ void streamOutCommercialBreakList(
+ ostream &output, const QMap<long long, int> &commercialBreakList)
+ {
+@@ -811,6 +937,8 @@
+ bool clearCutlist = false;
+ bool getCutlist = false;
+ bool getSkipList = false;
++ bool getAviDemuxCutlist = false;
++ bool getAviDemuxSkiplist = false;
+ QString newCutList = QString::null;
+ QMap<QString, QString> settingsOverride;
+
+@@ -960,6 +1088,10 @@
+ getCutlist = true;
+ else if (!strcmp(a.argv()[argpos], "--getskiplist"))
+ getSkipList = true;
++ else if (!strcmp(a.argv()[argpos], "--getcutlist-avidemux"))
++ getAviDemuxCutlist = true;
++ else if (!strcmp(a.argv()[argpos], "--getskiplist-avidemux"))
++ getAviDemuxSkiplist = true;
+ else if (!strcmp(a.argv()[argpos], "--setcutlist"))
+ newCutList = (a.argv()[++argpos]);
+ else if (!strcmp(a.argv()[argpos], "-j"))
+@@ -1111,6 +1243,8 @@
+ " #-#[,#-#]... (ie, 1-100,1520-3012,4091-5094\n"
+ "--getcutlist Display the current cutlist\n"
+ "--getskiplist Display the current Commercial Skip list\n"
++ "--getcutlist-avidemux Export cutlist as AVIDemux Project File\n"
++ "--getskiplist-avidemux Export skiplist as AVIDemux Project File\n"
+ "-v or --verbose debug-level Use '-v help' for level info\n"
+ "--queue Insert flagging job into the JobQueue rather than\n"
+ " running flagging in the foreground\n"
+@@ -1223,6 +1357,12 @@
+ if (!newCutList.isNull())
+ return SetCutList(chanid, starttime, newCutList);
+
++ if (getAviDemuxCutlist)
++ return GetAviDemux("cutlist", chanid, starttime, outputfilename);
++
++ if (getAviDemuxSkiplist)
++ return GetAviDemux("commflag", chanid, starttime, outputfilename);
++
+ if (getCutlist)
+ return GetMarkupList("cutlist", chanid, starttime);
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/mythtv.install b/abs/core-testing/mythtv/trunk/mythtv-svn/mythtv.install
new file mode 100755
index 0000000..513852a
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/mythtv.install
@@ -0,0 +1,55 @@
+
+# arg 1: the new package version
+pre_install () {
+ echo "backing up the database"
+ dbver=`pacman -Q mythtv-svn | awk ' { print $2 } '`
+ if [ ! -e /data/databases_backup ]
+ then
+ mkdir -p /data/database_backup
+ fi
+ mysqldump -u mythtv -pmythtv mythconverg -c > /data/database_backup/${dbver}.dump.sql
+}
+
+post_install() {
+ mkdir -p /data/home
+ /usr/sbin/useradd -G users,video,audio,optical -m -d /data/home/mythtv mythtv
+ /usr/sbin/usermod -G users,video,audio,optical mythtv
+# mkdir /var/log/mythtv
+# chown -R mythtv:users /var/log/mythtv
+ dbver=`pacman -Q mythtv-svn | awk ' { print $2 } '`
+ if [ ! -e /data/database_backup ]
+ then
+ mkdir -p /data/database_backup
+ fi
+ chown mythtv:nobody /data/database_backup
+ chmod g+s /data/database_backup
+
+ mysqldump -u mythtv -pmythtv mythconverg -c > /data/database_backup/${dbver}.dump.sql
+
+
+}
+pre_upgrade () {
+ pre_install
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+
+ /bin/true
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+/bint/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/patches/DeviceReadBuffer-polltimeout.2.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/DeviceReadBuffer-polltimeout.2.patch
new file mode 100644
index 0000000..5bb713f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/DeviceReadBuffer-polltimeout.2.patch
@@ -0,0 +1,219 @@
+Index: libs/libmythtv/DeviceReadBuffer.h
+===================================================================
+--- libs/libmythtv/DeviceReadBuffer.h (revision 18515)
++++ libs/libmythtv/DeviceReadBuffer.h (working copy)
+@@ -59,7 +59,7 @@
+ void IncrReadPointer(uint len);
+
+ bool HandlePausing(void);
+- bool Poll(void) const;
++ bool Poll(void);
+ uint WaitForUnused(uint bytes_needed) const;
+ uint WaitForUsed (uint bytes_needed) const;
+
+Index: libs/libmythtv/DeviceReadBuffer.cpp
+===================================================================
+--- libs/libmythtv/DeviceReadBuffer.cpp (revision 18515)
++++ libs/libmythtv/DeviceReadBuffer.cpp (working copy)
+@@ -90,9 +90,14 @@
+
+ void DeviceReadBuffer::Start(void)
+ {
+- lock.lock();
+- bool was_running = running;
+- lock.unlock();
++ bool was_running;
++
++ {
++ QMutexLocker locker(&lock);
++ was_running = running;
++ error = false;
++ }
++
+ if (was_running)
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Start(): Already running.");
+@@ -104,6 +109,8 @@
+ {
+ VERBOSE(VB_IMPORTANT,
+ LOC_ERR + QString("Start(): pthread_create failed.") + ENO);
++
++ QMutexLocker locker(&lock);
+ error = true;
+ }
+ }
+@@ -118,21 +125,25 @@
+ used = 0;
+ readPtr = buffer;
+ writePtr = buffer;
++
++ error = false;
+ }
+
+ void DeviceReadBuffer::Stop(void)
+ {
+ bool was_running = IsRunning();
+- lock.lock();
+- run = false;
+- lock.unlock();
+
+ if (!was_running)
+ {
+- VERBOSE(VB_IMPORTANT, LOC_ERR + "Stop(): Not running.");
++ VERBOSE(VB_IMPORTANT, LOC + "Stop(): Not running.");
+ return;
+ }
+
++ {
++ QMutexLocker locker(&lock);
++ run = false;
++ }
++
+ pthread_join(thread, NULL);
+ }
+
+@@ -229,10 +240,11 @@
+ {
+ uint errcnt = 0;
+
+- lock.lock();
+- run = true;
+- running = true;
+- lock.unlock();
++ {
++ QMutexLocker locker(&lock);
++ run = true;
++ running = true;
++ }
+
+ while (run)
+ {
+@@ -248,6 +260,15 @@
+ if (using_poll && !Poll())
+ continue;
+
++ {
++ QMutexLocker locker(&lock);
++ if (error)
++ {
++ VERBOSE(VB_RECORD, LOC + "fill_ringbuffer: error state");
++ break;
++ }
++ }
++
+ // Limit read size for faster return from read
+ size_t read_size =
+ min(dev_read_size, (size_t) WaitForUnused(TSPacket::SIZE));
+@@ -268,9 +289,10 @@
+ }
+ }
+
+- lock.lock();
+- running = false;
+- lock.unlock();
++ {
++ QMutexLocker locker(&lock);
++ running = false;
++ }
+ }
+
+ bool DeviceReadBuffer::HandlePausing(void)
+@@ -293,7 +315,7 @@
+ return true;
+ }
+
+-bool DeviceReadBuffer::Poll(void) const
++bool DeviceReadBuffer::Poll(void)
+ {
+ #ifdef USING_MINGW
+ #warning mingw DeviceReadBuffer::Poll
+@@ -302,31 +324,53 @@
+ return false;
+ #else
+ bool retval = true;
+- while (true)
++ uint timeout_cnt = 0;
++
++ for (;;)
+ {
+ struct pollfd polls;
+ polls.fd = _stream_fd;
+ polls.events = POLLIN;
+ polls.revents = 0;
+
+- int ret = poll(&polls, 1 /*number of polls*/, 10 /*msec*/);
+- if (IsPauseRequested() || !IsOpen() || !run)
++ int ret = poll(&polls, 1 /*number of polls*/, 250 /*msec*/);
++
++ if (polls.revents & (POLLERR | POLLHUP | POLLNVAL))
+ {
++ VERBOSE(VB_IMPORTANT, LOC + "poll error");
++ error = true;
++ return true;
++ }
++
++ if (!run || !IsOpen() || IsPauseRequested())
++ {
+ retval = false;
+ break; // are we supposed to pause, stop, etc.
+ }
+
+ if (ret > 0)
+ break; // we have data to read :)
+- if ((-1 == ret) && (EOVERFLOW == errno))
+- break; // we have an error to handle
+-
+- if ((-1 == ret) && ((EAGAIN == errno) || (EINTR == errno)))
+- continue; // errors that tell you to try again
+- if (ret == 0)
+- continue; // timed out, try again
+-
+- usleep(2500);
++ if (ret < 0)
++ {
++ if ((EOVERFLOW == errno))
++ break; // we have an error to handle
++ if ((EAGAIN == errno) || (EINTR == errno))
++ continue; // errors that tell you to try again
++ usleep(2500);
++ }
++ else // ret == 0
++ {
++ if (++timeout_cnt > 9)
++ {
++ VERBOSE(VB_RECORD, LOC_ERR + "Poll giving up");
++ QMutexLocker locker(&lock);
++ error = true;
++ return true;
++ }
++ if (timeout_cnt % 2)
++ VERBOSE(VB_RECORD, LOC_ERR + QString("Poll timeout (%1)")
++ .arg(timeout_cnt));
++ }
+ }
+ return retval;
+ #endif //!USING_MINGW
+@@ -360,9 +404,9 @@
+
+ if (++errcnt > 5)
+ {
+- lock.lock();
++ QMutexLocker locker(&lock);
++ VERBOSE(VB_RECORD, LOC + "Too many errors.");
+ error = true;
+- lock.unlock();
+ return false;
+ }
+
+@@ -376,10 +420,8 @@
+ VERBOSE(VB_IMPORTANT, LOC +
+ QString("End-Of-File? fd(%1)").arg(_stream_fd));
+
+- lock.lock();
++ QMutexLocker locker(&lock);
+ eof = true;
+- lock.unlock();
+-
+ return false;
+ }
+ usleep(500);
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/patches/aacdecoder.cpp.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/aacdecoder.cpp.patch
new file mode 100644
index 0000000..8796eb4
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/aacdecoder.cpp.patch
@@ -0,0 +1,12 @@
+--- mythmusic/mythmusic/aacdecoder.cpp.orig 2008-11-19 12:51:48.000000000 -0500
++++ mythmusic/mythmusic/aacdecoder.cpp 2008-11-19 12:52:42.000000000 -0500
+@@ -17,6 +17,9 @@
+ #define FAAD_MODIFIED
+ #endif
+
++// LinHES need this undefined
++#undef FAAD_MODIFIED
++
+ // ANSI C headers
+ #include <cstdlib>
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/patches/hdpvr-v4lchannel-tweak.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/hdpvr-v4lchannel-tweak.patch
new file mode 100644
index 0000000..3535310
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/hdpvr-v4lchannel-tweak.patch
@@ -0,0 +1,139 @@
+Index: libs/libmythtv/v4lchannel.h
+===================================================================
+--- libs/libmythtv/v4lchannel.h (revision 18874)
++++ libs/libmythtv/v4lchannel.h (working copy)
+@@ -103,6 +103,8 @@
+ VidModV4L2 videomode_v4l2; ///< Current video mode if 'usingv4l2' is true
+
+ int defaultFreqTable;
++ int prev_inputNumV4L;
++ v4l2_std_id prev_vid_mode;
+ };
+
+ #endif
+Index: libs/libmythtv/v4lchannel.cpp
+===================================================================
+--- libs/libmythtv/v4lchannel.cpp (revision 18874)
++++ libs/libmythtv/v4lchannel.cpp (working copy)
+@@ -40,7 +40,8 @@
+ device_name(QString::null), driver_name(QString::null),
+ curList(NULL), totalChannels(0),
+ currentFormat(""), is_dtv(false),
+- usingv4l2(false), defaultFreqTable(1)
++ usingv4l2(false), defaultFreqTable(1),
++ prev_inputNumV4L(-1), prev_vid_mode(-1)
+ {
+ }
+
+@@ -795,62 +796,75 @@
+ {
+ VERBOSE(VB_CHANNEL, LOC + msg + "(v4l v2)");
+
+- int ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
++ int ioctlval;
++ bool streamingDisabled = false;
++ int streamType = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+- // ConvertX (wis-go7007) requires streaming to be disabled
+- // before an input switch, do this if initial switch failed.
+- bool streamingDisabled = false;
+- int streamType = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+- if ((ioctlval < 0) && (errno == EBUSY))
++ if (prev_inputNumV4L != inputNumV4L)
+ {
+- ioctlval = ioctl(videofd, VIDIOC_STREAMOFF, &streamType);
++ ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
++
++ // ConvertX (wis-go7007) requires streaming to be disabled
++ // before an input switch, do this if initial switch failed.
++ if ((ioctlval < 0) && (errno == EBUSY))
++ {
++ ioctlval = ioctl(videofd, VIDIOC_STREAMOFF, &streamType);
++ if (ioctlval < 0)
++ {
++ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
++ "\n\t\t\twhile disabling streaming (v4l v2)" + ENO);
++
++ ok = false;
++ ioctlval = 0;
++ }
++ else
++ {
++ streamingDisabled = true;
++
++ // Resend the input switch ioctl.
++ ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
++ }
++ }
++
+ if (ioctlval < 0)
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile disabling streaming (v4l v2)" + ENO);
++ "\n\t\t\twhile setting input (v4l v2)" + ENO);
+
+ ok = false;
+- ioctlval = 0;
+ }
+- else
+- {
+- streamingDisabled = true;
+
+- // Resend the input switch ioctl.
+- ioctlval = ioctl(videofd, VIDIOC_S_INPUT, &inputNumV4L);
+- }
++ prev_inputNumV4L = inputNumV4L;
+ }
+
+- if (ioctlval < 0)
+- {
+- VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile setting input (v4l v2)" + ENO);
+-
+- ok = false;
+- }
+-
+ v4l2_std_id vid_mode = format_to_mode(newFmt, 2);
+- ioctlval = ioctl(videofd, VIDIOC_S_STD, &vid_mode);
+- if (ioctlval < 0)
+- {
+- VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile setting format (v4l v2)" + ENO);
+
+- ok = false;
+- }
+-
+- // ConvertX (wis-go7007) requires streaming to be disabled
+- // before an input switch, here we try to re-enable streaming.
+- if (streamingDisabled)
++ if (prev_vid_mode != vid_mode)
+ {
+- ioctlval = ioctl(videofd, VIDIOC_STREAMON, &streamType);
++ ioctlval = ioctl(videofd, VIDIOC_S_STD, &vid_mode);
+ if (ioctlval < 0)
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
+- "\n\t\t\twhile reenabling streaming (v4l v2)" + ENO);
++ "\n\t\t\twhile setting format (v4l v2)" + ENO);
+
+ ok = false;
+ }
++
++ // ConvertX (wis-go7007) requires streaming to be disabled
++ // before an input switch, here we try to re-enable streaming.
++ if (streamingDisabled)
++ {
++ ioctlval = ioctl(videofd, VIDIOC_STREAMON, &streamType);
++ if (ioctlval < 0)
++ {
++ VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
++ "\n\t\t\twhile reenabling streaming (v4l v2)" +
++ ENO);
++
++ ok = false;
++ }
++ }
++ prev_vid_mode = vid_mode;
+ }
+ }
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/patches/mpegrecorder-hdpvr-v1.1.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/mpegrecorder-hdpvr-v1.1.patch
new file mode 100644
index 0000000..f292b7f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/mpegrecorder-hdpvr-v1.1.patch
@@ -0,0 +1,658 @@
+Index: libs/libmythtv/mpegrecorder.h
+===================================================================
+--- libs/libmythtv/mpegrecorder.h (revision 19056)
++++ libs/libmythtv/mpegrecorder.h (working copy)
+@@ -80,11 +80,13 @@
+ uint GetFilteredAudioLayer(void) const;
+ uint GetFilteredAudioBitRate(uint audio_layer) const;
+
++ void RestartEncoding(void);
+ bool StartEncoding(int fd);
+ bool StopEncoding(int fd);
+
+ void ResetForNewFile(void);
+
++ bool WaitFor_HDPVR(void);
+ void HandleResolutionChanges(void);
+
+ inline bool CheckCC(uint pid, uint cc);
+@@ -104,7 +106,6 @@
+ // State
+ bool recording;
+ bool encoding;
+- bool needs_resolution;
+ mutable QMutex start_stop_encoding_lock;
+ QMutex recording_wait_lock;
+ QWaitCondition recording_wait;
+@@ -113,7 +114,7 @@
+ bool cleartimeonpause;
+
+ // Encoding info
+- int width, height;
++ uint width, height;
+ int bitrate, maxbitrate, streamtype, aspectratio;
+ int audtype, audsamplerate, audbitratel1, audbitratel2, audbitratel3;
+ int audvolume;
+Index: libs/libmythtv/mpegrecorder.cpp
+===================================================================
+--- libs/libmythtv/mpegrecorder.cpp (revision 19056)
++++ libs/libmythtv/mpegrecorder.cpp (working copy)
+@@ -19,6 +19,7 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
++#include <sys/poll.h>
+
+ // avlib headers
+ extern "C" {
+@@ -86,7 +87,7 @@
+ requires_special_pause(false),
+ // State
+ recording(false), encoding(false),
+- needs_resolution(false), start_stop_encoding_lock(QMutex::Recursive),
++ start_stop_encoding_lock(QMutex::Recursive),
+ recording_wait_lock(), recording_wait(),
+ // Pausing state
+ cleartimeonpause(false),
+@@ -487,13 +488,21 @@
+
+ bool MpegRecorder::SetFormat(int chanfd)
+ {
++ uint idx;
+ struct v4l2_format vfmt;
+ bzero(&vfmt, sizeof(vfmt));
+
+ vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+- if (ioctl(chanfd, VIDIOC_G_FMT, &vfmt) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_G_FMT, &vfmt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 10)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Error getting format" + ENO);
+ return false;
+ }
+@@ -501,8 +510,15 @@
+ vfmt.fmt.pix.width = width;
+ vfmt.fmt.pix.height = height;
+
+- if (ioctl(chanfd, VIDIOC_S_FMT, &vfmt) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_FMT, &vfmt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Error setting format" + ENO);
+ return false;
+ }
+@@ -513,10 +529,19 @@
+ /// Set audio language mode
+ bool MpegRecorder::SetLanguageMode(int chanfd)
+ {
++ uint idx;
+ struct v4l2_tuner vt;
+ bzero(&vt, sizeof(struct v4l2_tuner));
+- if (ioctl(chanfd, VIDIOC_G_TUNER, &vt) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_G_TUNER, &vt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN + "Unable to get audio mode" + ENO);
+ return false;
+ }
+@@ -549,8 +574,15 @@
+ success = false;
+ }
+
+- if (ioctl(chanfd, VIDIOC_S_TUNER, &vt) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_TUNER, &vt) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN + "Unable to set audio mode" + ENO);
+ success = false;
+ }
+@@ -561,10 +593,19 @@
+ bool MpegRecorder::SetRecordingVolume(int chanfd)
+ {
+ // Get volume min/max values
++ uint idx;
+ struct v4l2_queryctrl qctrl;
+ qctrl.id = V4L2_CID_AUDIO_VOLUME;
+- if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to get recording volume parameters(max/min)" + ENO +
+ "\n\t\t\tusing default range [0,65535].");
+@@ -582,8 +623,15 @@
+ ctrl.id = V4L2_CID_AUDIO_VOLUME;
+ ctrl.value = ctrl_volume;
+
+- if (ioctl(chanfd, VIDIOC_S_CTRL, &ctrl) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_CTRL, &ctrl) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to set recording volume" + ENO + "\n\t\t\t" +
+ "If you are using an AverMedia M179 card this is normal.");
+@@ -765,6 +813,7 @@
+
+ for (uint i = 0; i < ext_ctrls.size(); i++)
+ {
++ uint idx;
+ struct v4l2_ext_controls ctrls;
+ bzero(&ctrls, sizeof(struct v4l2_ext_controls));
+
+@@ -774,8 +823,15 @@
+ ctrls.count = 1;
+ ctrls.controls = &ext_ctrls[i];
+
+- if (ioctl(fd, VIDIOC_S_EXT_CTRLS, &ctrls) < 0)
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(fd, VIDIOC_S_EXT_CTRLS, &ctrls) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ QMutexLocker locker(&control_description_lock);
+ VERBOSE(VB_IMPORTANT, QString("mpegrecorder.cpp:set_ctrls(): ") +
+ QString("Could not set %1 to %2")
+@@ -814,6 +870,30 @@
+ {
+ maxbitrate = high_mpeg4peakbitrate;
+ bitrate = high_mpeg4avgbitrate;
++
++ // query supported audio codecs and prefer AC3
++ uint idx;
++ struct v4l2_queryctrl qctrl;
++ qctrl.id = V4L2_CID_MPEG_AUDIO_ENCODING;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
++ if (ioctl(chanfd, VIDIOC_QUERYCTRL, &qctrl) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
++ VERBOSE(VB_IMPORTANT, LOC_WARN +
++ "Unable to get supported audio codecs." + ENO);
++ }
++ else
++ {
++ if (qctrl.minimum != qctrl.maximum)
++ add_ext_ctrl(ext_ctrls, V4L2_CID_MPEG_AUDIO_ENCODING,
++ qctrl.maximum);
++ }
+ }
+ maxbitrate = std::max(maxbitrate, bitrate);
+
+@@ -837,19 +917,36 @@
+ int audioinput = audiodevice.toUInt(&ok);
+ if (ok)
+ {
++ uint idx;
+ struct v4l2_audio ain;
+ bzero(&ain, sizeof(ain));
+ ain.index = audioinput;
+- if (ioctl(chanfd, VIDIOC_ENUMAUDIO, &ain) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_ENUMAUDIO, &ain) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to get audio input.");
+ }
+ else
+ {
+ ain.index = audioinput;
+- if (ioctl(chanfd, VIDIOC_S_AUDIO, &ain) < 0)
++
++ for (idx = 0; idx < 20; ++idx)
+ {
++ if (ioctl(chanfd, VIDIOC_S_AUDIO, &ain) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ {
+ VERBOSE(VB_IMPORTANT, LOC_WARN +
+ "Unable to set audio input.");
+ }
+@@ -1036,17 +1133,26 @@
+ if (deviceIsMpegFile)
+ elapsedTimer.start();
+ else if (_device_read_buffer)
+- _device_read_buffer->Start();
++ {
++ VERBOSE(VB_RECORD, LOC + "Initial startup of recorder");
+
+- needs_resolution = (driver == "hdpvr");
++ if (StartEncoding(readfd))
++ _device_read_buffer->Start();
++ else
++ {
++ VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to start recording");
++ recording = false;
++ QMutexLocker locker(&recording_wait_lock);
++ recording_wait.wakeAll();
++ _error = true;
++ }
++ }
+
+ QByteArray vdevice = videodevice.toAscii();
+ while (encoding && !_error)
+ {
+ if (PauseAndWait(100))
+ continue;
+-
+- HandleResolutionChanges();
+
+ if (deviceIsMpegFile)
+ {
+@@ -1090,35 +1196,7 @@
+ {
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "Device error detected");
+
+- _device_read_buffer->Stop();
+-
+- QMutexLocker locker(&start_stop_encoding_lock);
+-
+- StopEncoding(readfd);
+-
+- // Make sure the next things in the file are a PAT & PMT
+- if (_stream_data->PATSingleProgram() &&
+- _stream_data->PMTSingleProgram())
+- {
+- bool tmp = _wait_for_keyframe_option;
+- _wait_for_keyframe_option = false;
+- HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+- HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+- _wait_for_keyframe_option = tmp;
+- }
+-
+- if (StartEncoding(readfd))
+- {
+- _device_read_buffer->Start();
+- }
+- else
+- {
+- if (0 != close(readfd))
+- VERBOSE(VB_IMPORTANT, LOC_ERR + "Close error" + ENO);
+-
+- // Force card to be reopened on next iteration..
+- readfd = -1;
+- }
++ RestartEncoding();
+ }
+ else if (_device_read_buffer->IsEOF())
+ {
+@@ -1216,6 +1294,8 @@
+ }
+ }
+
++ VERBOSE(VB_RECORD, LOC + "StartRecording finishing up");
++
+ if (_device_read_buffer)
+ {
+ if (_device_read_buffer->IsRunning())
+@@ -1224,6 +1304,7 @@
+ delete _device_read_buffer;
+ _device_read_buffer = NULL;
+ }
++
+ StopEncoding(readfd);
+
+ FinishRecording();
+@@ -1373,52 +1454,95 @@
+
+ if (!paused)
+ {
++ VERBOSE(VB_RECORD, LOC + "PauseAndWait pause");
++
++ // Some drivers require streaming to be disabled before
++ // an input switch and other channel format setting.
++ if (requires_special_pause)
++ StopEncoding(readfd);
++
+ if (_device_read_buffer)
+ {
+ QMutex drb_lock;
+ drb_lock.lock();
+-
+ _device_read_buffer->SetRequestPause(true);
+-
+ pauseWait.wait(&drb_lock, timeout);
+ }
+ else
+- {
+- paused = true;
+ pauseWait.wakeAll();
+- }
+
+- // Some drivers require streaming to be disabled before
+- // an input switch and other channel format setting.
+- if (requires_special_pause)
+- StopEncoding(readfd);
+-
++ paused = true;
+ if (tvrec)
+ tvrec->RecorderPaused();
+ }
+
+ unpauseWait.wait(&waitlock, timeout);
+ }
+- if (!request_pause)
++
++ if (!request_pause && paused)
+ {
+- if (paused)
++ VERBOSE(VB_RECORD, LOC + "PauseAndWait unpause");
++
++ if (driver == "hdpvr")
+ {
+- // Some drivers require streaming to be disabled before
+- // an input switch and other channel format setting.
+- if (requires_special_pause)
+- StartEncoding(readfd);
++ m_h264_parser.Reset();
++ _wait_for_keyframe_option = true;
++ _seen_sps = false;
+
+- if (_device_read_buffer)
+- _device_read_buffer->SetRequestPause(false);
++ // Sleep any less than 1.5 seconds, and the HD-PVR will
++ // return the old resolution, when the resolution is changing.
++ usleep(1500 * 1000);
++ }
+
+- if (_stream_data)
+- _stream_data->Reset(_stream_data->DesiredProgram());
+- }
++ // Some drivers require streaming to be disabled before
++ // an input switch and other channel format setting.
++ if (requires_special_pause)
++ StartEncoding(readfd);
++
++ if (_device_read_buffer)
++ _device_read_buffer->SetRequestPause(false);
++
++ if (_stream_data)
++ _stream_data->Reset(_stream_data->DesiredProgram());
++
+ paused = false;
+ }
++
+ return paused;
+ }
+
++void MpegRecorder::RestartEncoding(void)
++{
++ VERBOSE(VB_RECORD, LOC + "RestartEncoding");
++
++ _device_read_buffer->Stop();
++
++ QMutexLocker locker(&start_stop_encoding_lock);
++
++ StopEncoding(readfd);
++
++ // Make sure the next things in the file are a PAT & PMT
++ if (_stream_data->PATSingleProgram() &&
++ _stream_data->PMTSingleProgram())
++ {
++ _wait_for_keyframe_option = false;
++ HandleSingleProgramPAT(_stream_data->PATSingleProgram());
++ HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
++ }
++
++ if (StartEncoding(readfd))
++ {
++ _device_read_buffer->Start();
++ }
++ else
++ {
++ if (0 != close(readfd))
++ VERBOSE(VB_IMPORTANT, LOC_ERR + "Close error" + ENO);
++
++ readfd = -1;
++ }
++}
++
+ bool MpegRecorder::StartEncoding(int fd)
+ {
+ QMutexLocker locker(&start_stop_encoding_lock);
+@@ -1427,13 +1551,22 @@
+ memset(&command, 0, sizeof(struct v4l2_encoder_cmd));
+ command.cmd = V4L2_ENC_CMD_START;
+
++ if (driver == "hdpvr")
++ HandleResolutionChanges();
++
+ VERBOSE(VB_RECORD, LOC + "StartEncoding");
+- needs_resolution = (driver == "hdpvr");
+
+- for (int idx = 0; idx < 10; ++idx)
++ for (int idx = 0; idx < 20; ++idx)
+ {
+ if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0)
+ {
++ if (driver == "hdpvr")
++ {
++ m_h264_parser.Reset();
++ _wait_for_keyframe_option = true;
++ _seen_sps = false;
++ }
++
+ VERBOSE(VB_RECORD, LOC + "Encoding started");
+ return true;
+ }
+@@ -1444,7 +1577,7 @@
+ return false;
+ }
+
+- usleep(250 * 1000);
++ usleep(100 * 1000);
+ }
+
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "StartEncoding - giving up" + ENO);
+@@ -1461,9 +1594,8 @@
+
+ VERBOSE(VB_RECORD, LOC + "StopEncoding");
+
+- for (int idx = 0; idx < 10; ++idx)
++ for (int idx = 0; idx < 20; ++idx)
+ {
+-
+ if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0)
+ {
+ VERBOSE(VB_RECORD, LOC + "Encoding stopped");
+@@ -1476,7 +1608,7 @@
+ return false;
+ }
+
+- usleep(250 * 1000);
++ usleep(100 * 1000);
+ }
+
+ VERBOSE(VB_IMPORTANT, LOC_ERR + "StopEncoding - giving up" + ENO);
+@@ -1544,7 +1676,7 @@
+ void MpegRecorder::HandleSingleProgramPMT(ProgramMapTable *pmt)
+ {
+ if (!pmt)
+-{
++ {
+ return;
+ }
+
+@@ -1564,27 +1696,89 @@
+ DTVRecorder::BufferedWrite(*(reinterpret_cast<TSPacket*>(&buf[i])));
+ }
+
++bool MpegRecorder::WaitFor_HDPVR(void)
++{
++ // After a resolution change, it can take the HD-PVR a few
++ // seconds before it is usable again.
++
++ // Tell it to start encoding, then wait for it to actually feed us
++ // some data.
++ QMutexLocker locker(&start_stop_encoding_lock);
++
++ struct v4l2_encoder_cmd command;
++ struct pollfd polls;
++ int idx;
++
++ memset(&command, 0, sizeof(struct v4l2_encoder_cmd));
++ command.cmd = V4L2_ENC_CMD_START;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
++ if (ioctl(readfd, VIDIOC_ENCODER_CMD, &command) == 0)
++ break;
++ usleep(100 * 1000);
++ }
++
++ if (idx == 20)
++ return false;
++
++ polls.fd = readfd;
++ polls.events = POLLIN;
++ polls.revents = 0;
++
++ for (idx = 0; idx < 10; ++idx)
++ {
++ if (poll(&polls, 1, 250) > 0)
++ break;
++ }
++
++ if (idx == 10)
++ return false;
++
++ // HD-PVR should now be "ready"
++ command.cmd = V4L2_ENC_CMD_STOP;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
++ if (ioctl(readfd, VIDIOC_ENCODER_CMD, &command) == 0)
++ return true;
++ usleep(100 * 1000);
++ }
++
++ return false;
++}
++
+ void MpegRecorder::HandleResolutionChanges(void)
+ {
+- if (!needs_resolution)
+- return;
+-
+ VERBOSE(VB_RECORD, LOC + "Checking Resolution");
+ struct v4l2_format vfmt;
+ memset(&vfmt, 0, sizeof(vfmt));
+ vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
++ if (driver == "hdpvr")
++ WaitFor_HDPVR();
++
++ uint idx;
+ uint pix = 0;
++
++ for (idx = 0; idx < 20; ++idx)
++ {
+ if (0 == ioctl(chanfd, VIDIOC_G_FMT, &vfmt))
+ {
+ VERBOSE(VB_RECORD, LOC + QString("Got Resolution %1x%2")
+ .arg(vfmt.fmt.pix.width).arg(vfmt.fmt.pix.height));
+ pix = vfmt.fmt.pix.width * vfmt.fmt.pix.height;
+- needs_resolution = false;
++ break;
++ }
++ // Typically takes 0.9 seconds after a resolution change
++ usleep(100 * 1000);
+ }
+
+ if (!pix)
++ {
++ VERBOSE(VB_RECORD, LOC + "Giving up detecting resolution");
+ return; // nothing to do, we don't have a resolution yet
++ }
+
+ int old_max = maxbitrate, old_avg = bitrate;
+ if (pix <= 768*568)
+@@ -1609,13 +1803,14 @@
+ if (old_max == old_avg)
+ {
+ VERBOSE(VB_RECORD, LOC +
+- QString("Old bitrate %1 CBR").arg(old_avg));
++ QString("Old bitrate %1 CBR for %2x%3")
++ .arg(old_avg).arg(width).arg(height));
+ }
+ else
+ {
+ VERBOSE(VB_RECORD, LOC +
+- QString("Old bitrate %1/%2 VBR")
+- .arg(old_avg).arg(old_max));
++ QString("Old bitrate %1/%2 VBR for %3x%4")
++ .arg(old_avg).arg(old_max).arg(width).arg(height));
+ }
+
+ if (maxbitrate == bitrate)
+@@ -1642,12 +1837,6 @@
+ maxbitrate * 1000);
+
+ set_ctrls(readfd, ext_ctrls);
++
+ }
+-
+- // Restart streaming. Shouldn't be needed? seems to be with current driver.
+- QMutexLocker locker(&start_stop_encoding_lock);
+- StopEncoding(readfd);
+- StartEncoding(readfd);
+-
+- needs_resolution = false;
+ }
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/patches/mythcommflag-avidemux.2.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/mythcommflag-avidemux.2.patch
new file mode 100644
index 0000000..d26645f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/patches/mythcommflag-avidemux.2.patch
@@ -0,0 +1,179 @@
+Index: programs/mythcommflag/main.cpp
+===================================================================
+--- programs/mythcommflag/main.cpp (revision 18596)
++++ programs/mythcommflag/main.cpp (working copy)
+@@ -300,6 +300,132 @@
+ return COMMFLAG_EXIT_NO_ERROR_WITH_NO_BREAKS;
+ }
+
++int GetAviDemux(QString list, QString chanid, QString starttime, const QString &outputfilename)
++{
++ QMap<long long, int> cutlist;
++ QMap<long long, int>::Iterator it;
++ QString result;
++ int startValue = 0;
++ long long myTotalFrames;
++ long long myFrameRate;
++
++ ProgramInfo *pginfo =
++ ProgramInfo::GetProgramFromRecorded(chanid, starttime);
++
++ NuppelVideoPlayer* nvp = new NuppelVideoPlayer("avidemux_export", pginfo);
++
++ myFrameRate = (long long)(nvp->GetFrameRate() * 1000);
++ myTotalFrames = 1000000; //nvp->GetTotalFrameCount();
++
++ if (!pginfo)
++ {
++ VERBOSE(VB_IMPORTANT,
++ QString("No program data exists for channel %1 at %2")
++ .arg(chanid).arg(starttime));
++ return COMMFLAG_BUGGY_EXIT_NO_CHAN_DATA;
++ }
++
++ QString filename = pginfo->GetPlaybackURL(TRUE);
++
++ if (list == "cutlist")
++ pginfo->GetCutList(cutlist);
++ else
++ pginfo->GetCommBreakList(cutlist);
++
++// Formatting of output data
++
++ for (it = cutlist.begin(); it != cutlist.end(); ++it)
++ {
++ if ((it.key() == 0) && (startValue == 0)) // Cutlist starts on first frame,
++ {
++ ++it;
++ startValue = it.key();
++ }
++
++ if ((it.key() != 0) && (startValue == 0)) // Cutlist starts on non-first frame
++ {
++ result += QString("app.addSegment(0,0,%1);").arg(it.key());
++ startValue = it.key();
++ }
++ else
++ {
++ if ((*it == MARK_COMM_END) && (startValue != 0) ||
++ (*it == MARK_CUT_END) && (startValue != 0))
++ {
++ if (result != "")
++ result += "\n";
++ startValue = it.key();
++ result += QString("app.addSegment(0,%1,").arg(it.key()); // Value is a start value
++ }
++ else
++ {
++ result += QString("%1);").arg(it.key() - startValue); // Value is an end value
++ }
++ }
++ }
++
++if (it.key() != myTotalFrames)
++ {
++ result += QString("%1);").arg(myTotalFrames);
++ }
++
++// Governs the file output:
++
++ QString tmp = "";
++ ostream *out = &cout;
++
++ if (outputfilename != "-"){
++ QByteArray tmp = outputfilename.toLocal8Bit();
++ out = new fstream(tmp.constData(), ios::app | ios::out );
++ }
++
++ if (outputfilename == ""){
++ VERBOSE(VB_IMPORTANT,
++ QString("Error: AVIDemux output requires the use of the --outputfile option."));
++ return COMMFLAG_EXIT_INVALID_CMDLINE;
++ }
++
++ tmp = QString("//AD <- Needed to identify//\n"
++ "//--automatically built--\n"
++ "//--Project:\n\n"
++ "var app = new Avidemux();\n\n"
++ "//** Video **\n"
++ "// 01 videos source\n"
++ "app.load(\"%1\");\n\n"
++ "app.clearSegments();\n\n"
++ "%2\n"
++ "app.markerA=0;\n"
++ "app.markerB=%3;\n"
++ "app.rebuildIndex();\n\n"
++ "//** Postproc **\n"
++ "app.video.setPostProc(3,3,0);\n\n"
++ "app.video.setFps1000(%4);\n\n"
++ "//** Filters **\n\n"
++ "//** Video Codec conf **\n"
++ "app.video.codec(\"Copy\",\"CQ=4\",\"0 \");\n\n"
++ "//** Audio **\n"
++ "app.audio.reset();\n"
++ "app.audio.codec(\"copy\",128,0,\"\");\n"
++ "app.audio.normalizeMode=0;\n"
++ "app.audio.normalizeValue=0;\n"
++ "app.audio.delay=0;\n"
++ "app.audio.mixer(\"NONE\");\n"
++ "app.setContainer(\"AVI\");\n"
++ "setSuccess(1);\n"
++ "//app.Exit();\n\n"
++ "//End of script\n").arg(filename).arg(result).arg(myTotalFrames).arg(myFrameRate).toLocal8Bit().constData();
++
++ const QByteArray tmp2 = tmp.toLocal8Bit();
++ *out << tmp2.constData() << endl;
++
++ VERBOSE(VB_IMPORTANT,
++ QString("AVIDemux Project generated for %1 at %2 with filename %3.")
++ .arg(chanid).arg(starttime).arg(outputfilename));
++
++ return COMMFLAG_EXIT_NO_ERROR_WITH_NO_BREAKS;
++}
++
++
+ void streamOutCommercialBreakList(
+ ostream &output, const QMap<long long, int> &commercialBreakList)
+ {
+@@ -811,6 +937,8 @@
+ bool clearCutlist = false;
+ bool getCutlist = false;
+ bool getSkipList = false;
++ bool getAviDemuxCutlist = false;
++ bool getAviDemuxSkiplist = false;
+ QString newCutList = QString::null;
+ QMap<QString, QString> settingsOverride;
+
+@@ -960,6 +1088,10 @@
+ getCutlist = true;
+ else if (!strcmp(a.argv()[argpos], "--getskiplist"))
+ getSkipList = true;
++ else if (!strcmp(a.argv()[argpos], "--getcutlist-avidemux"))
++ getAviDemuxCutlist = true;
++ else if (!strcmp(a.argv()[argpos], "--getskiplist-avidemux"))
++ getAviDemuxSkiplist = true;
+ else if (!strcmp(a.argv()[argpos], "--setcutlist"))
+ newCutList = (a.argv()[++argpos]);
+ else if (!strcmp(a.argv()[argpos], "-j"))
+@@ -1111,6 +1243,8 @@
+ " #-#[,#-#]... (ie, 1-100,1520-3012,4091-5094\n"
+ "--getcutlist Display the current cutlist\n"
+ "--getskiplist Display the current Commercial Skip list\n"
++ "--getcutlist-avidemux Export cutlist as AVIDemux Project File\n"
++ "--getskiplist-avidemux Export skiplist as AVIDemux Project File\n"
+ "-v or --verbose debug-level Use '-v help' for level info\n"
+ "--queue Insert flagging job into the JobQueue rather than\n"
+ " running flagging in the foreground\n"
+@@ -1223,6 +1357,12 @@
+ if (!newCutList.isNull())
+ return SetCutList(chanid, starttime, newCutList);
+
++ if (getAviDemuxCutlist)
++ return GetAviDemux("cutlist", chanid, starttime, outputfilename);
++
++ if (getAviDemuxSkiplist)
++ return GetAviDemux("commflag", chanid, starttime, outputfilename);
++
+ if (getCutlist)
+ return GetMarkupList("cutlist", chanid, starttime);
+
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/smolt_jump.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/smolt_jump.patch
new file mode 100644
index 0000000..0fc452a
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/smolt_jump.patch
@@ -0,0 +1,30 @@
+Index: programs/mythfrontend/networkcontrol.cpp
+===================================================================
+--- programs/mythfrontend/networkcontrol.cpp (revision 19291)
++++ programs/mythfrontend/networkcontrol.cpp (working copy)
+@@ -83,6 +83,7 @@
+ jumpMap["zoneminderliveview"] = "ZoneMinder Live View";
+ jumpMap["zoneminderevents"] = "ZoneMinder Events";
+ jumpMap["snapshot"] = "ScreenShot";
++ jumpMap["mythsmolt"] = "MythSmolt";
+
+ // These jump point names match the (lowercased) locations from gContext
+ jumpMap["channelrecpriority"] = "Channel Recording Priorities";
+@@ -191,7 +192,7 @@
+ pthread_create(&command_thread, NULL, CommandThread, this);
+
+ gContext->addListener(this);
+-
++
+ connect(this, SIGNAL(newConnection()), this, SLOT(newConnection()));
+ }
+
+@@ -307,7 +308,7 @@
+ cs = new QTextStream(s);
+ cs->setCodec("UTF-8");
+ }
+-
++
+ if (client)
+ {
+ closedOldConn = true;
diff --git a/abs/core-testing/mythtv/trunk/mythtv-svn/svn_main_menu_popup.patch b/abs/core-testing/mythtv/trunk/mythtv-svn/svn_main_menu_popup.patch
new file mode 100644
index 0000000..5556683
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-svn/svn_main_menu_popup.patch
@@ -0,0 +1,211 @@
+Index: libs/libmythui/myththemedmenu.h
+===================================================================
+--- libs/libmythui/myththemedmenu.h (revision 19291)
++++ libs/libmythui/myththemedmenu.h (working copy)
+@@ -2,6 +2,7 @@
+ #define MYTHTHEMEDMENU_H_
+
+ #include "mythscreentype.h"
++#include "mythdialogbox.h"
+ #include "mythuistatetype.h"
+ #include "mythuibuttonlist.h"
+ #include "xmlparsebase.h"
+@@ -77,6 +78,11 @@
+ void ReloadExitKey(void);
+ virtual void aboutToShow(void);
+
++ void doMenu();
++ void aboutScreen();
++ MythDialogBox *m_menuPopup;
++ void customEvent(QEvent *event);
++
+ protected:
+ virtual bool keyPressEvent(QKeyEvent *e);
+
+Index: libs/libmythui/myththemedmenu.cpp
+===================================================================
+--- libs/libmythui/myththemedmenu.cpp (revision 19291)
++++ libs/libmythui/myththemedmenu.cpp (working copy)
+@@ -32,6 +32,7 @@
+ m_callbackdata = NULL;
+
+ m_killable = false;
++
+ }
+
+ MythThemedMenuState::~MythThemedMenuState()
+@@ -95,7 +96,7 @@
+ m_exitModifier = -1;
+ m_menumode = "";
+ m_buttonList = NULL;
+-
++ m_menuPopup = NULL;
+ if (!m_state)
+ {
+ m_state = new MythThemedMenuState(parent, "themedmenustate");
+@@ -271,6 +272,10 @@
+ m_wantpop = true;
+ }
+ }
++ else if (action == "MENU")
++ {
++ doMenu();
++ }
+ else
+ handled = false;
+ }
+@@ -292,6 +297,154 @@
+ updateLCD();
+ }
+
++void MythThemedMenu::doMenu()
++{
++
++ if (m_menuPopup)
++ return;
++ int allowsd = GetMythDB()->GetNumSetting("AllowQuitShutdown");
++ int override_menu = GetMythDB()->GetNumSetting("OverRideExitMenu");
++ QString label = "System Menu";
++ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
++ m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup");
++ if (m_menuPopup->Create())
++ mainStack->AddScreen(m_menuPopup);
++ if ( override_menu == 0 )
++ {
++ if ( allowsd != 0 && allowsd !=4 )
++ {
++ m_menuPopup->SetReturnEvent(this,"popmenu_exit");
++ m_menuPopup->AddButton("Shutdown");
++ m_menuPopup->AddButton("Reboot");
++ }
++ else
++ {
++ m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
++ }
++ }
++ if ( override_menu == 5 )
++ { // reboot
++ m_menuPopup->SetReturnEvent(this,"popmenu_reboot");
++ m_menuPopup->AddButton("Reboot");
++ }
++ else if ( override_menu == 2 || override_menu == 4 )
++ { // shutdown
++ m_menuPopup->SetReturnEvent(this,"popmenu_shutdown");
++ m_menuPopup->AddButton("Shutdown");
++ }
++ else if ( override_menu == 3 || override_menu == 6 )
++ { // both
++ m_menuPopup->SetReturnEvent(this,"popmenu_exit");
++ m_menuPopup->AddButton("Shutdown");
++ m_menuPopup->AddButton("Reboot");
++ }
++ else
++ {
++ m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
++ }
++
++ m_menuPopup->AddButton("About");
++ m_menuPopup->AddButton("Cancel");
++
++}
++void MythThemedMenu::aboutScreen()
++{
++
++ extern const char *myth_source_version;
++ extern const char *myth_source_path;
++ QString distro_line;
++ distro_line="";
++
++ QFile file("/etc/os_myth_release");
++ if ( file.open(QFile::ReadOnly))
++ {
++ QTextStream t( &file ); // use a text stream
++ distro_line = t.readLine();
++ file.close();
++ }
++
++ QString label = "";
++ label.append(QObject::tr("Revision: ") + myth_source_version + " \n Branch:" + myth_source_path + "\n" + distro_line );
++
++ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
++ m_menuPopup = new MythDialogBox(label, mainStack, "About");
++ if (m_menuPopup->Create())
++ mainStack->AddScreen(m_menuPopup);
++
++ m_menuPopup->SetReturnEvent(this,"About");
++ m_menuPopup->AddButton("OK!");
++
++}
++
++void MythThemedMenu::customEvent(QEvent *event)
++{
++ if (event->type() == kMythDialogBoxCompletionEventType)
++ {
++ DialogCompletionEvent *dce =
++ dynamic_cast<DialogCompletionEvent*>(event);
++ QString resultid= dce->GetId();
++ int buttonnum = dce->GetResult();
++ QString halt_cmd=GetMythDB()->GetSetting("HaltCommand");
++ QString reboot_cmd=GetMythDB()->GetSetting("RebootCommand");
++
++ if (resultid == "popmenu_exit")
++ {
++ if (buttonnum == 0)
++ {
++ if (!halt_cmd.isEmpty() )
++ system(halt_cmd.toAscii());
++ }
++
++ if (buttonnum == 1)
++ {
++ if (!reboot_cmd.isEmpty() )
++ system(reboot_cmd.toAscii());
++ }
++
++ if (buttonnum == 2)
++ {
++ aboutScreen();
++ }
++ }
++
++ if (resultid == "popmenu_noexit")
++ {
++ if (buttonnum == 0)
++ aboutScreen();
++ }
++
++ if (resultid == "popmenu_reboot")
++ {
++ if (buttonnum == 0)
++ {
++ if (!reboot_cmd.isEmpty() )
++ system(reboot_cmd.toAscii());
++ }
++
++ if (buttonnum == 1)
++ {
++ aboutScreen();
++ }
++ }
++
++ if (resultid == "popmenu_shutdown")
++ {
++ if (buttonnum == 0)
++ {
++ if (!halt_cmd.isEmpty() )
++ system(halt_cmd.toAscii());
++ }
++
++ if (buttonnum == 1)
++ {
++ aboutScreen();
++ }
++ }
++
++ m_menuPopup = NULL;
++ }
++}
++
+ /** \brief Parses the element's tags and set the ThemeButton's type,
+ * text, depends, and action, then adds the button.
+ *
diff --git a/abs/core-testing/mythtv/trunk/mythtv-themes/PKGBUILD b/abs/core-testing/mythtv/trunk/mythtv-themes/PKGBUILD
new file mode 100755
index 0000000..8cd0d04
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/mythtv-themes/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=mythv-themes-svn
+pkgver=15924
+pkgrel=4
+pkgdesc="themes for mythtv"
+url="http://www.mythtv.org"
+license="GPL"
+depends=( )
+#makedepends=('sqlite3' 'sed')
+conflicts=()
+replaces=()
+backup=()
+#install='mythtv.install'
+source=()
+arch=('i686')
+md5sums=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/myththemes
+_svnmod=myththemes
+
+build() {
+echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+#svn co http://cvs.mythtv.org/svn/trunk/mythtv
+#svn co http://cvs.mythtv.org/svn/trunk/mythplugins
+#svn co http://cvs.mythtv.org/svn/trunk/myththemes
+cd $startdir/src/myththemes
+ make distclean
+ ./configure
+ #./configure --disable-all --enable-mythweather --enable-fftw --disable-aac
+ make || return 1
+ make INSTALL_ROOT=$startdir/pkg install
+# cd $startdir/src/$pkgname
+# cd mythmovietime
+# make || return 1
+# make INSTALL_ROOT=$startdir/pkg install
+
+}
diff --git a/abs/core-testing/mythtv/trunk/plugins/mytharchive/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mytharchive/PKGBUILD
new file mode 100644
index 0000000..4d3e179
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mytharchive/PKGBUILD
@@ -0,0 +1,41 @@
+pkgname=mytharchive-svn
+pkgver=16153
+pkgrel=3
+pkgdesc="MythTV plugin that lets you create DVDs from or archive your recorded shows."
+arch=('i686')
+url="http://www.mythtv.org"
+license=('GPL')
+depends=('mythtv-svn' 'libxmu' 'mysql-python' 'pil' 'dvdauthor')
+source=()
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ PLUGIN=mytharchive
+ cd $startdir/src/
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+
+ PLUGIN=mytharchive
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ msg "Correcting configure kde3 to kde"
+ sed -i 's#kde3#kde#' configure || return 1
+ make distclean
+ ./configure --enable-opengl --disable-all --enable-create-archive --enable-create-dvd --enable-mytharchive || return 1
+ qmake mythplugins.pro || return 1
+ make qmake || return 1
+ msg "Correcting Makefile kde3 to kde"
+ sed -i 's#kde3#kde#' ./mytharchive/mytharchive/Makefile || return 1
+ make -j 2 || return 1
+ make INSTALL_ROOT=$startdir/pkg install
+}
+
+
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythbrowser/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythbrowser/PKGBUILD
new file mode 100644
index 0000000..4c57cf0
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythbrowser/PKGBUILD
@@ -0,0 +1,35 @@
+
+pkgname=mythbrowser-svn
+pkgver=16153
+pkgrel=2
+pkgdesc="Mini web browser for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn' 'wget' 'libxvmc' 'kdelibs')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ pwd
+ PLUGIN=mythbrowser
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ make distclean
+ ./configure --enable-opengl --disable-all --enable-mythbrowser || return 1
+ # sed -i 's#kde3#kde#' ./mythbrowser/mythbrowser/Makefile || return 1
+ make || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythcontrols/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythcontrols/PKGBUILD
new file mode 100644
index 0000000..f4d6da6
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythcontrols/PKGBUILD
@@ -0,0 +1,35 @@
+pkgname=mythcontrols-svn
+pkgver=16153
+pkgrel=5
+pkgdesc="Experimental controls for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv'-svn)
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+PLUGIN=mythcontrols
+grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+if [ $? != 0 ]
+then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ make distclean
+ ./configure --disable-all --enable-opengl --enable-mythcontrols
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythflix/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythflix/PKGBUILD
new file mode 100644
index 0000000..9e8c92e
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythflix/PKGBUILD
@@ -0,0 +1,34 @@
+pkgname=mythflix-svn
+pkgver=16153
+pkgrel=2
+pkgdesc="Netflix access plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ PLUGIN=mythflix
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ make distclean
+ ./configure --disable-all --enable-opengl --enable-mythflix
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythgallery/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythgallery/PKGBUILD
new file mode 100644
index 0000000..52fb732
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythgallery/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=mythgallery-svn
+pkgver=16153
+pkgrel=3
+pkgdesc="Image gallery plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn' 'libexif' 'libtiff')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ export QMAKESPEC='linux-g++'
+ PLUGIN=mythgallery
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ make distclean
+ ./configure --disable-all --enable-opengl --enable-mythgallery --enable-exif
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythgame/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythgame/PKGBUILD
new file mode 100644
index 0000000..8c4257f
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythgame/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=mythgame-svn
+pkgver=16153
+pkgrel=4
+pkgdesc="Emulation plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn' 'zlib')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+PLUGIN=mythgame
+grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+if [ $? != 0 ]
+then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ export QMAKESPEC='linux-g++'
+ make distclean
+ ./configure --disable-all --enable-opengl --enable-mythgame
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythmovietime/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythmovietime/PKGBUILD
new file mode 100644
index 0000000..f83cdbf
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythmovietime/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=mythmovietime-svn
+pkgver=16153
+pkgrel=6
+pkgdesc="Emulation plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn' 'zlib')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+PLUGIN=mythmovietime
+grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+if [ $? != 0 ]
+then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ export QMAKESPEC='linux-g++'
+ make distclean
+ ./configure --disable-all --enable-mythmovies
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythmusic/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythmusic/PKGBUILD
new file mode 100644
index 0000000..28cbe82
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythmusic/PKGBUILD
@@ -0,0 +1,41 @@
+
+
+pkgname=mythmusic-svn
+pkgver=16153
+pkgrel=9
+pkgdesc="Music playing plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686' 'x86_64')
+#depends=('mythtv-svn' 'libid3tag' 'libmad' 'libvorbis' 'flac>=1.1.4' 'libcdaudio' \
+# 'cdparanoia' 'fftw2' 'sdl' 'faad2' 'lame' )
+
+ depends=('mythtv-svn ' 'libid3tag' 'flac>=1.1.4 ' 'a52dec' 'libcdaudio' 'libcddb' 'libdvdread' 'libid3tag' 'libmad' 'libogg' 'libtheora' 'libvorbis' 'taglib' 'libvisual' 'cdparanoia' 'sdl' 'faad2' 'lame' 'fftw2double')
+
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ make distclean
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+PLUGIN=mythmusic
+grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+if [ $? != 0 ]
+then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+
+# ./configure --disable-all --enable-mythmusic
+
+ make || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythmusic/music_flac.patch b/abs/core-testing/mythtv/trunk/plugins/mythmusic/music_flac.patch
new file mode 100644
index 0000000..b152249
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythmusic/music_flac.patch
@@ -0,0 +1,293 @@
+--- flacdecoder.cpp.old 2007-03-11 18:14:37.000000000 -0400
++++ flacdecoder.cpp 2007-03-11 18:15:34.000000000 -0400
+@@ -17,7 +17,7 @@
+
+ #include <qtimer.h>
+
+-static FLAC__SeekableStreamDecoderReadStatus flacread(const FLAC__SeekableStreamDecoder *decoder, FLAC__byte bufferp[], unsigned *bytes, void *client_data)
++static FLAC__StreamDecoderReadStatus flacread(const FLAC__StreamDecoder *decoder, FLAC__byte bufferp[], unsigned *bytes, void *client_data)
+ {
+ decoder = decoder;
+
+@@ -26,27 +26,27 @@
+
+ if (len == -1)
+ {
+- return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
++ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ }
+
+ *bytes = len;
+- return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
++ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+
+-static FLAC__SeekableStreamDecoderSeekStatus flacseek(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
++static FLAC__StreamDecoderSeekStatus flacseek(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
+ {
+ decoder = decoder;
+ FlacDecoder *dflac = (FlacDecoder *)client_data;
+
+ if (!dflac->input()->isDirectAccess())
+- return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
++ return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+
+ if (dflac->input()->at(absolute_byte_offset))
+- return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK;
+- return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
++ return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
++ return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+ }
+
+-static FLAC__SeekableStreamDecoderTellStatus flactell(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
++static FLAC__StreamDecoderTellStatus flactell(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
+ {
+ decoder = decoder;
+ FlacDecoder *dflac = (FlacDecoder *)client_data;
+@@ -54,20 +54,20 @@
+ long t = dflac->input()->at();
+ *absolute_byte_offset = t;
+
+- return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
++ return FLAC__STREAM_DECODER_TELL_STATUS_OK;
+ }
+
+-static FLAC__SeekableStreamDecoderLengthStatus flaclength(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
++static FLAC__StreamDecoderLengthStatus flaclength(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
+ {
+ decoder = decoder;
+
+ FlacDecoder *dflac = (FlacDecoder *)client_data;
+
+ *stream_length = dflac->input()->size();
+- return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
++ return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
+ }
+
+-static FLAC__bool flaceof(const FLAC__SeekableStreamDecoder *decoder, void *client_data)
++static FLAC__bool flaceof(const FLAC__StreamDecoder *decoder, void *client_data)
+ {
+ decoder = decoder;
+
+@@ -76,7 +76,7 @@
+ return dflac->input()->atEnd();
+ }
+
+-static FLAC__StreamDecoderWriteStatus flacwrite(const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++static FLAC__StreamDecoderWriteStatus flacwrite(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
+ {
+ decoder = decoder;
+
+@@ -132,7 +132,7 @@
+ }
+ }
+
+-static void flacmetadata(const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++static void flacmetadata(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
+ {
+ decoder = decoder;
+
+@@ -156,11 +156,11 @@
+ }
+ }
+
+-static void flacerror(const FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++static void flacerror(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
+ {
+ decoder = decoder;
+
+- FLAC__FileDecoder *file_decoder = (FLAC__FileDecoder *)client_data;
++ FLAC__StreamDecoder *file_decoder = (FLAC__StreamDecoder *)client_data;
+
+ file_decoder = file_decoder;
+ status = status;
+@@ -262,17 +262,8 @@
+ }
+ }
+
+- decoder = FLAC__seekable_stream_decoder_new();
+- FLAC__seekable_stream_decoder_set_md5_checking(decoder, false);
+- FLAC__seekable_stream_decoder_set_read_callback(decoder, flacread);
+- FLAC__seekable_stream_decoder_set_seek_callback(decoder, flacseek);
+- FLAC__seekable_stream_decoder_set_tell_callback(decoder, flactell);
+- FLAC__seekable_stream_decoder_set_length_callback(decoder, flaclength);
+- FLAC__seekable_stream_decoder_set_eof_callback(decoder, flaceof);
+- FLAC__seekable_stream_decoder_set_write_callback(decoder, flacwrite);
+- FLAC__seekable_stream_decoder_set_metadata_callback(decoder, flacmetadata);
+- FLAC__seekable_stream_decoder_set_error_callback(decoder, flacerror);
+- FLAC__seekable_stream_decoder_set_client_data(decoder, this);
++ decoder = FLAC__stream_decoder_new();
++ FLAC__stream_decoder_set_md5_checking(decoder, false);
+
+ freq = 0;
+ bitrate = 0;
+@@ -281,8 +272,17 @@
+ totalTime = 0;
+ totalTime = totalTime < 0 ? 0 : totalTime;
+
+- FLAC__seekable_stream_decoder_init(decoder);
+- FLAC__seekable_stream_decoder_process_until_end_of_metadata(decoder);
++ FLAC__stream_decoder_init_stream(decoder,
++ flacread,
++ flacseek,
++ flactell,
++ flaclength,
++ flaceof,
++ flacwrite,
++ flacmetadata,
++ flacerror,
++ this);
++ FLAC__stream_decoder_process_until_end_of_metadata(decoder);
+
+ inited = TRUE;
+ return TRUE;
+@@ -295,8 +295,8 @@
+
+ void FlacDecoder::deinit()
+ {
+- FLAC__seekable_stream_decoder_finish(decoder);
+- FLAC__seekable_stream_decoder_delete(decoder);
++ FLAC__stream_decoder_finish(decoder);
++ FLAC__stream_decoder_delete(decoder);
+
+ if (input()->isOpen())
+ input()->close();
+@@ -330,7 +330,7 @@
+ }
+
+ bool flacok = true;
+- FLAC__SeekableStreamDecoderState decoderstate;
++ FLAC__StreamDecoderState decoderstate;
+
+ while (! done && ! finish) {
+ lock();
+@@ -340,12 +340,12 @@
+ FLAC__uint64 sample = (FLAC__uint64)(seekTime * 44100.0);
+ if (sample > totalsamples - 50)
+ sample = totalsamples - 50;
+- FLAC__seekable_stream_decoder_seek_absolute(decoder, sample);
++ FLAC__stream_decoder_seek_absolute(decoder, sample);
+ seekTime = -1.0;
+ }
+
+- flacok = FLAC__seekable_stream_decoder_process_single(decoder);
+- decoderstate = FLAC__seekable_stream_decoder_get_state(decoder);
++ flacok = FLAC__stream_decoder_process_single(decoder);
++ decoderstate = FLAC__stream_decoder_get_state(decoder);
+
+ if (decoderstate == 0 || decoderstate == 1)
+ {
+--- flacdecoder.h.old 2007-03-11 18:14:37.000000000 -0400
++++ flacdecoder.h 2007-03-11 18:14:12.000000000 -0400
+@@ -35,7 +35,7 @@
+ char *output_buf;
+ ulong output_bytes, output_at;
+
+- FLAC__SeekableStreamDecoder *decoder;
++ FLAC__StreamDecoder *decoder;
+
+ unsigned int bks;
+ bool done, finish;
+--- flacencoder.cpp.old 2007-03-11 18:14:37.000000000 -0400
++++ flacencoder.cpp 2007-03-11 18:14:12.000000000 -0400
+@@ -9,7 +9,7 @@
+ #include "flacencoder.h"
+ #include "metaioflacvorbiscomment.h"
+
+-#include <FLAC/file_encoder.h>
++#include <FLAC/stream_encoder.h>
+ #include <FLAC/assert.h>
+ #include <mythtv/mythcontext.h>
+
+@@ -29,32 +29,32 @@
+ int rice_parameter_search_dist = 0;
+ int max_lpc_order = 8;
+
+- encoder = FLAC__file_encoder_new();
++ encoder = FLAC__stream_encoder_new();
+
+- FLAC__file_encoder_set_streamable_subset(encoder, true);
+- FLAC__file_encoder_set_do_mid_side_stereo(encoder, do_mid_side);
+- FLAC__file_encoder_set_loose_mid_side_stereo(encoder, loose_mid_side);
+- FLAC__file_encoder_set_channels(encoder, NUM_CHANNELS);
+- FLAC__file_encoder_set_bits_per_sample(encoder, 16);
+- FLAC__file_encoder_set_sample_rate(encoder, 44100);
+- FLAC__file_encoder_set_blocksize(encoder, blocksize);
+- FLAC__file_encoder_set_max_lpc_order(encoder, max_lpc_order);
+- FLAC__file_encoder_set_qlp_coeff_precision(encoder, qlp_coeff_precision);
+- FLAC__file_encoder_set_do_qlp_coeff_prec_search(encoder, false);
+- FLAC__file_encoder_set_do_escape_coding(encoder, do_escape_coding);
+- FLAC__file_encoder_set_do_exhaustive_model_search(encoder,
++ FLAC__stream_encoder_set_streamable_subset(encoder, true);
++ FLAC__stream_encoder_set_do_mid_side_stereo(encoder, do_mid_side);
++ FLAC__stream_encoder_set_loose_mid_side_stereo(encoder, loose_mid_side);
++ FLAC__stream_encoder_set_channels(encoder, NUM_CHANNELS);
++ FLAC__stream_encoder_set_bits_per_sample(encoder, 16);
++ FLAC__stream_encoder_set_sample_rate(encoder, 44100);
++ FLAC__stream_encoder_set_blocksize(encoder, blocksize);
++ FLAC__stream_encoder_set_max_lpc_order(encoder, max_lpc_order);
++ FLAC__stream_encoder_set_qlp_coeff_precision(encoder, qlp_coeff_precision);
++ FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder, false);
++ FLAC__stream_encoder_set_do_escape_coding(encoder, do_escape_coding);
++ FLAC__stream_encoder_set_do_exhaustive_model_search(encoder,
+ do_exhaustive_model_search);
+- FLAC__file_encoder_set_min_residual_partition_order(encoder,
++ FLAC__stream_encoder_set_min_residual_partition_order(encoder,
+ min_residual_partition_order);
+- FLAC__file_encoder_set_max_residual_partition_order(encoder,
++ FLAC__stream_encoder_set_max_residual_partition_order(encoder,
+ max_residual_partition_order);
+- FLAC__file_encoder_set_rice_parameter_search_dist(encoder,
++ FLAC__stream_encoder_set_rice_parameter_search_dist(encoder,
+ rice_parameter_search_dist);
+
+- FLAC__file_encoder_set_filename(encoder, outfile.local8Bit());
++
+
+- int ret = FLAC__file_encoder_init(encoder);
+- if (ret != FLAC__FILE_ENCODER_OK)
++ int ret = FLAC__stream_encoder_init_file(encoder, outfile.local8Bit(), NULL, NULL);
++ if (ret != FLAC__STREAM_ENCODER_OK)
+ {
+ VERBOSE(VB_GENERAL, QString("Error initializing FLAC encoder."
+ " Got return code: %1").arg(ret));
+@@ -70,8 +70,8 @@
+
+ if (encoder)
+ {
+- FLAC__file_encoder_finish(encoder);
+- FLAC__file_encoder_delete(encoder);
++ FLAC__stream_encoder_finish(encoder);
++ FLAC__stream_encoder_delete(encoder);
+ }
+
+ if (metadata)
+@@ -102,7 +102,7 @@
+
+ if(sampleindex == MAX_SAMPLES || (length == 0 && sampleindex > 0) )
+ {
+- if (!FLAC__file_encoder_process(encoder,
++ if (!FLAC__stream_encoder_process(encoder,
+ (const FLAC__int32 * const *) input,
+ sampleindex))
+ {
+--- flacencoder.h.old 2007-03-11 18:14:37.000000000 -0400
++++ flacencoder.h 2007-03-11 18:14:12.000000000 -0400
+@@ -4,7 +4,7 @@
+ #include <qstring.h>
+
+ #define HAVE_INTTYPES_H
+-#include <FLAC/file_encoder.h>
++#include <FLAC/stream_encoder.h>
+
+ #include "encoder.h"
+
+@@ -21,7 +21,7 @@
+ int addSamples(int16_t *bytes, unsigned int len);
+
+ private:
+- FLAC__FileEncoder *encoder;
++ FLAC__StreamEncoder *encoder;
+ unsigned int sampleindex;
+ FLAC__int32 inputin[NUM_CHANNELS][MAX_SAMPLES];
+ FLAC__int32 *input[NUM_CHANNELS];
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythnews/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythnews/PKGBUILD
new file mode 100644
index 0000000..4dafc20
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythnews/PKGBUILD
@@ -0,0 +1,34 @@
+pkgname=mythnews-svn
+pkgver=16153
+pkgrel=4
+pkgdesc="News checking plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ PLUGIN=mythnews
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ make distclean
+ ./configure --disable-all --enable-mythnews
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+md5sums=('2a9fbf45ae58a3a35857ce8d7c4d12db')
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythphone/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythphone/PKGBUILD
new file mode 100644
index 0000000..f6bf3ec
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythphone/PKGBUILD
@@ -0,0 +1,42 @@
+pkgname=mythphone-svn
+pkgver=16153
+pkgrel=3
+pkgdesc="Plugin that allows phone calls to be made to MythTv"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ make distclean
+ PLUGIN=mythphone
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+
+ msg "Correcting configure kde3 to kde"
+ sed -i 's#kde3#kde#' configure || return 1
+ ./configure --enable-opengl --disable-all --enable-mythphone || return 1
+ qmake mythplugins.pro || return 1
+ make qmake || return 1
+
+ msg "Correcting Makefile kde3 to kde"
+ sed -i 's#kde3#kde#' ./mythphone/mythphone/Makefile || return 1
+
+ make -j 2 || return 1
+ make INSTALL_ROOT=$startdir/pkg install
+}
+
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythvideo/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythvideo/PKGBUILD
new file mode 100644
index 0000000..4087034
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythvideo/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=mythvideo-svn
+pkgver=16153
+pkgrel=2
+pkgdesc="Video playback and browsing plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn' 'perlxml' 'perl-libwww' 'perl-uri' 'perl-xml-simple' 'ffmpeg')
+license="GPL"
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ make distclean
+ PLUGIN=mythvideo
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ ./configure --disable-all --enable-mythvideo --enable-transcode
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+md5sums=('2a9fbf45ae58a3a35857ce8d7c4d12db')
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweather/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythweather/PKGBUILD
new file mode 100644
index 0000000..98542b9
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweather/PKGBUILD
@@ -0,0 +1,35 @@
+pkgname=mythweather-svn
+pkgver=16153
+pkgrel=6
+pkgdesc="Weather checking plugin for MythTV"
+url="http://www.mythtv.org"
+arch=('i686')
+depends=('mythtv-svn' 'wget' 'perl-xml-sax' 'perl-soap-lite' 'perl-image-size' 'imagemagick')
+conflicts=('mythtv-plugins-svn')
+groups=('mythtv-all-plugins-svn')
+license="GPL"
+source=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+
+build() {
+ cd $startdir/src/
+ echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ cd $startdir/src/mythplugins
+ make distclean
+ PLUGIN=mythweather
+ grep -q programs-libs.pro $PLUGIN/$PLUGIN/$PLUGIN.pro
+ if [ $? != 0 ]
+ then
+ echo "include ( ../../programs-libs.pro )" >> $PLUGIN/$PLUGIN/$PLUGIN.pro
+ msg "appending program lib"
+ fi
+ ./configure --enable-opengl --disable-all --enable-mythweather
+
+ make -j 2 || return 1
+
+ make INSTALL_ROOT=$startdir/pkg install
+}
+md5sums=('2a9fbf45ae58a3a35857ce8d7c4d12db')
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/PKGBUILD b/abs/core-testing/mythtv/trunk/plugins/mythweb/PKGBUILD
new file mode 100755
index 0000000..52eb059
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/PKGBUILD
@@ -0,0 +1,35 @@
+pkgname=mythweb-svn
+pkgver=16153
+pkgrel=20
+pkgdesc="mythweb"
+url="http://www.mythtv.org"
+license="GPL"
+arch=('i686')
+depends=(php fcgi libmysqlclient )
+conflicts=('mythweb' 'mythweb-fixes')
+replaces=()
+backup=()
+install='mythweb.install'
+source=(mythweblighttpd.patch dblogininit.inc )
+md5sums=()
+_svntrunk=http://cvs.mythtv.org/svn/trunk/mythplugins
+_svnmod=mythplugins
+
+build() {
+echo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+#svn co http://cvs.mythtv.org/svn/trunk/mythtv
+#svn co http://cvs.mythtv.org/svn/trunk/mythplugins
+#svn co http://cvs.mythtv.org/svn/trunk/myththemes
+cd $startdir/src/mythplugins
+
+#take care of fing mythweb
+mkdir -p $startdir/pkg/data/srv/httpd/htdocs/
+cp -rp mythweb $startdir/pkg/data/srv/httpd/htdocs/
+cp -f $startdir/src/dblogininit.inc $startdir/pkg/data/srv/httpd/htdocs/mythweb/includes/
+cd $startdir/pkg/data/srv/httpd/htdocs/mythweb/includes
+patch -p0 < $startdir/src/mythweblighttpd.patch
+
+chown -R nobody:nobody $startdir/pkg/data/srv/httpd/htdocs/mythweb
+chmod -R 775 $startdir/pkg/data/srv/httpd/htdocs/mythweb
+}
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/dblogininit.inc b/abs/core-testing/mythtv/trunk/plugins/mythweb/dblogininit.inc
new file mode 100755
index 0000000..c5395c5
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/dblogininit.inc
@@ -0,0 +1,6 @@
+<?
+ $_SERVER["db_server"] = "localhost";
+ $_SERVER["db_name"] = "mythconverg";
+ $_SERVER["db_login"] = "mythtv";
+ $_SERVER["db_password"] = "mythtv";
+?>
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/mythweb.install b/abs/core-testing/mythtv/trunk/plugins/mythweb/mythweb.install
new file mode 100755
index 0000000..9162d98
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/mythweb.install
@@ -0,0 +1,37 @@
+
+# arg 1: the new package version
+pre_install () {
+/bin/true
+}
+
+post_install() {
+ cp /etc/lighttpd/lighttpd.conf /tmp
+ sed -e "s/# .* \"mod_fastcgi\",/\"mod_fastcgi\"\,/g" /tmp/lighttpd.conf > /etc/lighttpd/lighttpd.conf
+
+
+}
+pre_upgrade () {
+ pre_install
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+
+ /bin/true
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+/bint/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/mythweblighttpd.patch b/abs/core-testing/mythtv/trunk/plugins/mythweb/mythweblighttpd.patch
new file mode 100755
index 0000000..6403a88
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/mythweblighttpd.patch
@@ -0,0 +1,13 @@
+--- database.php.orig 2007-12-31 21:25:30.000000000 +0000
++++ database.php 2007-12-31 21:25:50.000000000 +0000
+@@ -18,6 +18,10 @@
+ custom_error("Please install the MySQL libraries for PHP.\n"
+ .'The package is usually called something like php-mysql.');
+ }
++ if (empty($_SERVER['db_server']) || empty($_SERVER['db_name']) || empty($_SERVER['db_login'])) {
++ require_once 'dblogininit.inc';
++ }
++
+
+ // No database connection info defined?
+ if (empty($_SERVER['db_server']) || empty($_SERVER['db_name']) || empty($_SERVER['db_login'])) {
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/dblogininit.inc b/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/dblogininit.inc
new file mode 100755
index 0000000..c5395c5
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/dblogininit.inc
@@ -0,0 +1,6 @@
+<?
+ $_SERVER["db_server"] = "localhost";
+ $_SERVER["db_name"] = "mythconverg";
+ $_SERVER["db_login"] = "mythtv";
+ $_SERVER["db_password"] = "mythtv";
+?>
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/lighttpd.conf b/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/lighttpd.conf
new file mode 100755
index 0000000..ff4e7dd
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/lighttpd.conf
@@ -0,0 +1,332 @@
+# lighttpd configuration file
+
+############ Options you really have to take care of ####################
+
+## modules to load
+# at least mod_access and mod_accesslog should be loaded
+# all other module should only be loaded if really neccesary
+# - saves some time
+# - saves memory
+server.modules = (
+ "mod_rewrite",
+# "mod_redirect",
+# "mod_alias",
+ "mod_access",
+# "mod_cml",
+# "mod_trigger_b4_dl",
+# "mod_auth",
+ "mod_status",
+ "mod_setenv",
+#fast_cgi needs to be enabled for mythweb, as all mythweb requests are passed to php-cgi.
+ "mod_fastcgi",
+# "mod_proxy",
+# "mod_simple_vhost",
+# "mod_evhost",
+# "mod_userdir",
+ "mod_cgi",
+# "mod_compress",
+# "mod_ssi",
+# "mod_usertrack",
+# "mod_expire",
+# "mod_secdownload",
+# "mod_rrdtool",
+ "mod_accesslog" )
+
+## a static document-root, for virtual-hosting take look at the
+## server.virtual-* options
+server.document-root = "/data/srv/httpd/htdocs"
+
+## where to send error-messages to
+server.errorlog = "/var/log/lighttpd/error.log"
+
+# files to check for if .../ is requested
+index-file.names = ( "index.php", "index.html",
+ "index.htm", "default.htm","mythweb.php")
+
+# mimetype mapping
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".sig" => "application/pgp-signature",
+ ".spl" => "application/futuresplash",
+ ".class" => "application/octet-stream",
+ ".ps" => "application/postscript",
+ ".torrent" => "application/x-bittorrent",
+ ".dvi" => "application/x-dvi",
+ ".gz" => "application/x-gzip",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".tar" => "application/x-tar",
+ ".zip" => "application/zip",
+ ".mp3" => "audio/mpeg",
+ ".m3u" => "audio/x-mpegurl",
+ ".wma" => "audio/x-ms-wma",
+ ".wax" => "audio/x-ms-wax",
+ ".ogg" => "application/ogg",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".xbm" => "image/x-xbitmap",
+ ".xpm" => "image/x-xpixmap",
+ ".xwd" => "image/x-xwindowdump",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".asc" => "text/plain",
+ ".c" => "text/plain",
+ ".cpp" => "text/plain",
+ ".log" => "text/plain",
+ ".conf" => "text/plain",
+ ".text" => "text/plain",
+ ".txt" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml",
+ ".mpeg" => "video/mpeg",
+ ".mpg" => "video/mpeg",
+ ".mov" => "video/quicktime",
+ ".qt" => "video/quicktime",
+ ".avi" => "video/x-msvideo",
+ ".asf" => "video/x-ms-asf",
+ ".asx" => "video/x-ms-asf",
+ ".wmv" => "video/x-ms-wmv",
+ ".bz2" => "application/x-bzip",
+ ".tbz" => "application/x-bzip-compressed-tar",
+ ".tar.bz2" => "application/x-bzip-compressed-tar",
+ ".nuv" => "video/nuppelvideo"
+ )
+
+
+# Use the "Content-Type" extended attribute to obtain mime type if possible
+mimetype.use-xattr = "enable"
+
+
+## send a different Server: header
+## be nice and keep it at lighttpd
+#server.tag = "lighttpd"
+
+#### accesslog module
+accesslog.filename = "/var/log/lighttpd/access.log"
+
+## deny access the file-extensions
+#
+# ~ is for backupfiles from vi, emacs, joe, ...
+# .inc is often used for code includes which should in general not be part
+# of the document-root
+url.access-deny = ( "~", ".inc" )
+
+$HTTP["url"] =~ "\.pdf$" {
+ server.range-requests = "disable"
+}
+
+######### Options that are good to be but not neccesary to be changed #######
+
+## bind to port (default: 80)
+#server.port = 80
+
+## bind to localhost (default: all interfaces)
+#server.bind = "grisu.home.kneschke.de"
+
+## error-handler for status 404
+#server.error-handler-404 = "/error-handler.html"
+#server.error-handler-404 = "/error-handler.php"
+
+## to help the rc.scripts
+server.pid-file = "/var/run/lighttpd.pid"
+
+
+###### virtual hosts
+##
+## If you want name-based virtual hosting add the next three settings and load
+## mod_simple_vhost
+##
+## document-root =
+## virtual-server-root + virtual-server-default-host + virtual-server-docroot
+## or
+## virtual-server-root + http-host + virtual-server-docroot
+##
+#simple-vhost.server-root = "/home/lighttpd/vhosts/"
+#simple-vhost.default-host = "lighttpd.localhost"
+#simple-vhost.document-root = "/pages/"
+##
+## Format: <errorfile-prefix><status-code>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
+
+## virtual directory listings
+#server.dir-listing = "enable"
+
+## enable debugging
+#debug.log-request-header = "enable"
+#debug.log-response-header = "enable"
+#debug.log-request-handling = "enable"
+#debug.log-file-not-found = "enable"
+
+### only root can use these options
+#
+# chroot() to directory (default: no chroot() )
+#server.chroot = "/"
+
+## change uid to <uid> (default: don't care)
+server.username = "nobody"
+
+## change uid to <uid> (default: don't care)
+server.groupname = "nobody"
+
+#### compress module
+#compress.cache-dir = "/home/lighttpd/cache/"
+#compress.filetype = ("text/plain", "text/html")
+
+#### proxy module
+## read proxy.txt for more info
+#proxy.server = ( ".php" =>
+# ( "localhost" =>
+# (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+# )
+
+
+
+
+## fastcgi module
+## read fastcgi.txt for more info
+## adjust the value of bin-path for your system.
+## If you intend to process alot of requests at the same time, increase
+## the value of min-procs and max-procs
+
+fastcgi.server = ( ".php" =>
+ ( "localhost" =>
+ (
+ "socket" => "/tmp/php-fastcgi.socket",
+ "bin-path" => "/usr/bin/php-cgi",
+ "min-procs" => 0,
+ "max-procs" => 1,
+ "max-load-per-proc" => 1,
+ "idle-timeout" => 10,
+ # Fix PATH_INFO for PHP scripts that rely on it (like Wordpress and mythweb).
+ "broken-scriptfilename" => "enable"
+ )
+ )
+)
+
+
+#the rewrite rule for mythweb.
+#This assumes that mythweb is installed at document.root/mythweb
+
+ url.rewrite = (
+ "^/mythweb(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*)$" => "mythweb/mythweb.php/$1"
+ )
+
+
+#### CGI module
+cgi.assign = ( ".pl" => "/usr/bin/perl")
+
+
+
+#### SSL engine
+#$SERVER["socket"] == "0.0.0.0:443" {
+# ssl.engine = "enable"
+# ssl.pemfile = "/home/lighttpd/ssl/server.pem"
+# server.errorlog = "/var/log/lighttpd/error-ssl.log"
+# accesslog.filename = "/var/log/lighttpd/access-ssl.log"
+# server.document-root = "/home/lighttpd/html-ssl"
+#}
+
+
+
+#### status module
+status.status-url = "/server-status"
+status.config-url = "/server-config"
+
+#### auth module
+## read authentication.txt for more info
+#auth.backend = "plain"
+#auth.backend.plain.userfile = "lighttpd.user"
+#auth.backend.plain.groupfile = "lighttpd.group"
+
+#auth.backend.ldap.hostname = "localhost"
+#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+#auth.backend.ldap.filter = "(uid=$)"
+#auth.require = ( "/server-status" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "user=jan"
+# ),
+# "/server-info" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "valid-user"
+# )
+# )
+
+#### url handling modules (rewrite, redirect, access)
+#url.rewrite = ( "^/$" => "/server-status" )
+#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
+
+#
+# define a pattern for the host url finding
+# %% => % sign
+# %0 => domain name + tld
+# %1 => tld
+# %2 => domain name without tld
+# %3 => subdomain 1 name
+# %4 => subdomain 2 name
+#
+#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
+
+#### expire module
+#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#### ssi
+#ssi.extension = ( ".shtml" )
+
+#### rrdtool
+#rrdtool.binary = "/usr/bin/rrdtool"
+#rrdtool.db-name = "/var/www/lighttpd.rrd"
+
+#### setenv
+#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+## for mod_trigger_b4_dl
+# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
+# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
+# trigger-before-download.trigger-url = "^/trigger/"
+# trigger-before-download.download-url = "^/download/"
+# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
+# trigger-before-download.trigger-timeout = 10
+
+## for mod_cml
+## don't forget to add index.cml to server.indexfiles
+# cml.extension = ".cml"
+# cml.memcache-hosts = ( "127.0.0.1:11211" )
+
+#### variable usage:
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
+#bar = 1
+#var.mystring = "foo"
+
+## integer add
+#bar += 1
+## string concat, with integer cast as string, result: "www.foo1.com"
+#server.name = "www." + mystring + var.bar + ".com"
+## array merge
+#index-file.names = (foo + ".php") + index-file.names
+#index-file.names += (foo + ".php")
+
+#### include
+#include /etc/lighttpd/lighttpd-inc.conf
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
+#include "lighttpd-inc.conf"
+
+#### include_shell
+#include_shell "echo var.a=1"
+## the above is same as:
+#var.a=1
diff --git a/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/mythweblighttpd.patch b/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/mythweblighttpd.patch
new file mode 100755
index 0000000..bebc93e
--- /dev/null
+++ b/abs/core-testing/mythtv/trunk/plugins/mythweb/xris/mythweblighttpd.patch
@@ -0,0 +1,16 @@
+--- init.php.orig 2006-11-23 21:37:13.000000000 +0000
++++ init.php 2006-11-23 21:40:04.000000000 +0000
+@@ -75,7 +75,12 @@
+ custom_error("Please install the MySQL libraries for PHP.\n"
+ .'The package is usually called something like php-mysql.');
+ }
+-
++
++
++// No database connection info defined?
++ if (empty($_SERVER['db_server']) || empty($_SERVER['db_name']) || empty($_SERVER['db_login'])) {
++ require_once 'dblogininit.inc';
++ }
+ // No database connection info defined?
+ if (empty($_SERVER['db_server']) || empty($_SERVER['db_name']) || empty($_SERVER['db_login'])) {
+ tailored_error('db_vars_error');
diff --git a/abs/core-testing/nvidia-beta/NVIDIA_kernel-169.12-2286310.diff b/abs/core-testing/nvidia-beta/NVIDIA_kernel-169.12-2286310.diff
new file mode 100644
index 0000000..e511cfb
--- /dev/null
+++ b/abs/core-testing/nvidia-beta/NVIDIA_kernel-169.12-2286310.diff
@@ -0,0 +1,637 @@
+diff -ru usr/src/nv/Makefile.kbuild usr/src/nv.2286310/Makefile.kbuild
+--- usr/src/nv/Makefile.kbuild 2008-03-16 14:13:10.000000000 -0700
++++ usr/src/nv.2286310/Makefile.kbuild 2008-03-16 14:37:47.204131496 -0700
+@@ -177,6 +177,7 @@
+ vmap \
+ signal_struct \
+ agp_backend_acquire \
++ set_pages_uc \
+ change_page_attr \
+ pci_get_class \
+ sysctl_max_map_count \
+diff -ru usr/src/nv/conftest.sh usr/src/nv.2286310/conftest.sh
+--- usr/src/nv/conftest.sh 2008-03-16 14:13:10.000000000 -0700
++++ usr/src/nv.2286310/conftest.sh 2008-03-16 14:37:47.204131496 -0700
+@@ -100,6 +100,32 @@
+ fi
+ ;;
+
++ set_pages_uc)
++ #
++ # Determine if the set_pages_uc() function is present.
++ #
++ echo "#include <linux/autoconf.h>
++ #include <asm/cacheflush.h>
++ void conftest_set_pages_uc(void) {
++ set_pages_uc();
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#undef NV_SET_PAGES_UC_PRESENT" >> conftest.h
++ return
++ else
++ echo "#ifdef NV_CHANGE_PAGE_ATTR_PRESENT" >> conftest.h
++ echo "#undef NV_CHANGE_PAGE_ATTR_PRESENT" >> conftest.h
++ echo "#endif" >> conftest.h
++ echo "#define NV_SET_PAGES_UC_PRESENT" >> conftest.h
++ return
++ fi
++ ;;
++
+ change_page_attr)
+ #
+ # Determine if the change_page_attr() function is
+@@ -124,7 +150,9 @@
+ rm -f conftest$$.o
+ return
+ else
++ echo "#ifndef NV_SET_PAGES_UC_PRESENT" >> conftest.h
+ echo "#define NV_CHANGE_PAGE_ATTR_PRESENT" >> conftest.h
++ echo "#endif" >> conftest.h
+ return
+ fi
+ ;;
+@@ -524,6 +552,8 @@
+ return
+ fi
+
++ rm -f conftest$$.o
++
+ echo "#include <linux/autoconf.h>
+ #include <linux/interrupt.h>
+ irq_handler_t conftest_isr;
+diff -ru usr/src/nv/nv-linux.h usr/src/nv.2286310/nv-linux.h
+--- usr/src/nv/nv-linux.h 2008-03-16 14:13:10.000000000 -0700
++++ usr/src/nv.2286310/nv-linux.h 2008-03-16 14:37:47.204131496 -0700
+@@ -871,9 +871,10 @@
+
+ #define NV_PGD_OFFSET(address, kernel, mm) \
+ ({ \
++ struct mm_struct *__mm = (mm); \
+ pgd_t *__pgd; \
+ if (!kernel) \
+- __pgd = pgd_offset(mm, address); \
++ __pgd = pgd_offset(__mm, address); \
+ else \
+ __pgd = pgd_offset_k(address); \
+ __pgd; \
+@@ -1208,21 +1209,24 @@
+ nv_check_pci_config_space(nv, cb); \
+ }
+
++extern int nv_update_memory_types;
++
+ /*
+- * a BUG() is triggered on early 2.6 x86_64 kernels. the underlying
+- * problem actually exists on many architectures and kernels, but
+- * these are the only kernels that check the condition and trigger
+- * a BUG(). note that this is a problem of the core kernel, not an
+- * nvidia bug (and can still be triggered by agpgart). let's avoid
+- * change_page_attr on those kernels.
++ * Using change_page_attr() on early Linux/x86-64 2.6 kernels may
++ * result in a BUG() being triggered. The underlying problem
++ * actually exists on multiple architectures and kernels, but only
++ * the above check for the condition and trigger a BUG().
++ *
++ * Note that this is a due to a bug in the Linux kernel, not an
++ * NVIDIA driver bug (it can also be triggered by AGPGART).
++ *
++ * We therefore need to determine at runtime if change_page_attr()
++ * can be used safely on these kernels.
+ */
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+-extern int nv_use_cpa;
+-
+-#if defined(NVCPU_X86_64) && !defined(KERNEL_2_4) && \
+- (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11))
+-#define NV_CHANGE_PAGE_ATTR_BUG_PRESENT 1
+-#endif
++#if defined(NV_CHANGE_PAGE_ATTR_PRESENT) && defined(NVCPU_X86_64) && \
++ !defined(KERNEL_2_4) && \
++ (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11))
++#define NV_CHANGE_PAGE_ATTR_BUG_PRESENT
+ #endif
+
+ #if defined(NVCPU_X86) || defined(NVCPU_X86_64)
+@@ -1234,7 +1238,7 @@
+ *
+ * We need to be careful to mask out _PAGE_NX when the host system
+ * doesn't support this feature or when it's disabled: the kernel
+- * may not do this in its implementation of the change_page_attr()
++ * may not do this in its implementation of the change_page_attr()
+ * interface.
+ */
+ #ifndef X86_FEATURE_NX
+diff -ru usr/src/nv/nv-reg.h usr/src/nv.2286310/nv-reg.h
+--- usr/src/nv/nv-reg.h 2008-03-16 14:13:10.000000000 -0700
++++ usr/src/nv.2286310/nv-reg.h 2008-03-16 14:37:47.204131496 -0700
+@@ -391,34 +391,36 @@
+ #define NV_REG_REMAP_LIMIT NV_REG_STRING(__NV_REMAP_LIMIT)
+
+ /*
+- * Option: UseCPA
++ * Option: UpdateMemoryTypes
+ *
+ * Description:
+ *
+- * Many kernels have a broken implementation of change_page_attr that leads
+- * to cache aliasing problems. x86_64 kernels between 2.6.0 and 2.6.10 will
+- * force a kernel BUG_ON() when this condition is encountered. For this
+- * reason, the NVIDIA driver is very careful about not using the CPA kernel
+- * interface on these kernels.
+- *
+- * Some distributions have backported this fix to kernel versions that fall
+- * within this version range. The NVIDIA driver attempts to automatically
+- * detect these fixes and reenable usage of the change_page_attr interface.
+- *
+- * Due to the serious nature of the problems that can arise from this, the
+- * NVIDIA driver implements a manual registry key to force usage of this API
+- * to be enabled or disabled. This registry key can be used to force usage
+- * of the API on a known fixed kernel if the NVIDIA driver fails to detect
+- * the kernel as fixed. This registry key can also be used to disable usage
+- * of the API on a bad kernel that is misdetected as a fixed kernel.
+- *
+- * The default value is '-1' (use NVIDIA driver default logic)
+- * A value of '0' will forcibly disable change_page_attr calls.
+- * A value of '1' will forcibly enable change_page_attr calls.
++ * Many kernels have broken implementations of the change_page_attr()
++ * kernel interface that may cause cache aliasing problems. Linux/x86-64
++ * kernels between 2.6.0 and 2.6.10 may prompt kernel BUG()s due to
++ * improper accounting in the interface's large page management code, for
++ * example. For this reason, the NVIDIA Linux driver is very careful about
++ * not using the change_page_attr() kernel interface on these kernels.
++ *
++ * Due to the serious nature of the problems that can arise from bugs in
++ * the change_page_attr(), set_pages_{uc,wb}() and other kernel interfaces
++ * used to modify memory types, the NVIDIA driver implements a manual
++ * registry key override to allow forcibly enabling or disabling use of
++ * these APIs.
++ *
++ * Possible values:
++ *
++ * ~0 = use the NVIDIA driver's default logic (default)
++ * 0 = enable use of change_page_attr(), etc.
++ * 1 = disable use of change_page_attr(), etc.
++ *
++ * By default, the NVIDIA driver will attempt to auto-detect if it can
++ * safely use the change_page_attr() and other kernel interfaces to modify
++ * the memory types of kernel mappings.
+ */
+
+-#define __NV_USE_CPA UseCPA
+-#define NV_REG_USE_CPA NV_REG_STRING(__NV_USE_CPA)
++#define __NV_UPDATE_MEMORY_TYPES UpdateMemoryTypes
++#define NV_REG_UPDATE_MEMORY_TYPES NV_REG_STRING(__NV_UPDATE_MEMORY_TYPES)
+
+ /*
+ * Option: RegistryDwords
+@@ -490,7 +492,7 @@
+ NV_DEFINE_REG_ENTRY(__NV_DEVICE_FILE_GID, 0);
+ NV_DEFINE_REG_ENTRY(__NV_DEVICE_FILE_MODE, 0666);
+ NV_DEFINE_REG_ENTRY(__NV_REMAP_LIMIT, 0);
+-NV_DEFINE_REG_ENTRY(__NV_USE_CPA, -1);
++NV_DEFINE_REG_ENTRY(__NV_UPDATE_MEMORY_TYPES, ~0);
+ NV_DEFINE_REG_ENTRY(__NV_USE_VBIOS, 1);
+ NV_DEFINE_REG_ENTRY(__NV_RM_EDGE_INTR_CHECK, 1);
+
+@@ -535,7 +537,7 @@
+ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_DEVICE_FILE_GID),
+ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_DEVICE_FILE_MODE),
+ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_REMAP_LIMIT),
+- NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_USE_CPA),
++ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_UPDATE_MEMORY_TYPES),
+ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_USE_VBIOS),
+ NV_DEFINE_PARAMS_TABLE_ENTRY(__NV_RM_EDGE_INTR_CHECK),
+ {NULL, NULL, NULL}
+diff -ru usr/src/nv/nv-vm.c usr/src/nv.2286310/nv-vm.c
+--- usr/src/nv/nv-vm.c 2008-03-16 14:13:09.000000000 -0700
++++ usr/src/nv.2286310/nv-vm.c 2008-03-16 14:37:47.204131496 -0700
+@@ -43,42 +43,40 @@
+ }
+ #endif
+
+-/*
+- * AMD Athlon processors expose a subtle bug in the Linux
+- * kernel, that may lead to AGP memory corruption. Recent
+- * kernel versions had a workaround for this problem, but
+- * 2.4.20 is the first kernel to address it properly. The
+- * page_attr API provides the means to solve the problem.
+- */
+-
+ static inline void nv_set_page_attrib_uncached(nv_pte_t *page_ptr)
+ {
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+- if (nv_use_cpa)
++ if (nv_update_memory_types)
+ {
+- struct page *page = virt_to_page(__va(page_ptr->phys_addr));
++#if defined(NV_SET_PAGES_UC_PRESENT)
++ struct page *page = NV_GET_PAGE_STRUCT(page_ptr->phys_addr);
++ set_pages_uc(page, 1);
++#elif defined(NV_CHANGE_PAGE_ATTR_PRESENT)
++ struct page *page = NV_GET_PAGE_STRUCT(page_ptr->phys_addr);
+ pgprot_t prot = PAGE_KERNEL_NOCACHE;
+ #if defined(NVCPU_X86) || defined(NVCPU_X86_64)
+ pgprot_val(prot) &= __nv_supported_pte_mask;
+ #endif
+ change_page_attr(page, 1, prot);
+- }
+ #endif
++ }
+ }
+
+ static inline void nv_set_page_attrib_cached(nv_pte_t *page_ptr)
+ {
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+- if (nv_use_cpa)
++ if (nv_update_memory_types)
+ {
+- struct page *page = virt_to_page(__va(page_ptr->phys_addr));
++#if defined(NV_SET_PAGES_UC_PRESENT)
++ struct page *page = NV_GET_PAGE_STRUCT(page_ptr->phys_addr);
++ set_pages_wb(page, 1);
++#elif defined(NV_CHANGE_PAGE_ATTR_PRESENT)
++ struct page *page = NV_GET_PAGE_STRUCT(page_ptr->phys_addr);
+ pgprot_t prot = PAGE_KERNEL;
+ #if defined(NVCPU_X86) || defined(NVCPU_X86_64)
+ pgprot_val(prot) &= __nv_supported_pte_mask;
+ #endif
+ change_page_attr(page, 1, prot);
++#endif
+ }
+-#endif /* NV_CHANGE_PAGE_ATTR_PRESENT */
+ }
+
+ static inline void nv_lock_page(nv_pte_t *page_ptr)
+@@ -360,7 +358,8 @@
+ #if defined(NV_CPA_NEEDS_FLUSHING)
+ nv_execute_on_all_cpus(cache_flush, NULL);
+ #endif
+-#if defined (NVCPU_X86) || defined (NVCPU_X86_64)
++#if (defined(NVCPU_X86) || defined(NVCPU_X86_64)) && \
++ defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+ global_flush_tlb();
+ #endif
+ nv_ext_flush_caches(); // handle other platform flushes if present
+@@ -662,7 +661,7 @@
+
+ address = (unsigned long)virt_addr + i * PAGE_SIZE;
+
+- pgd = NV_PGD_OFFSET(address, 1, &init_mm);
++ pgd = NV_PGD_OFFSET(address, 1, NULL);
+ if (!NV_PGD_PRESENT(pgd))
+ goto failed;
+
+diff -ru usr/src/nv/nv.c usr/src/nv.2286310/nv.c
+--- usr/src/nv/nv.c 2008-03-16 14:13:09.000000000 -0700
++++ usr/src/nv.2286310/nv.c 2008-03-16 14:37:47.208131723 -0700
+@@ -15,6 +15,7 @@
+ #include "nv_compiler.h"
+ #include "os-agp.h"
+ #include "nv-vm.h"
++#include "nv-reg.h"
+
+ #ifdef MODULE_ALIAS_CHARDEV_MAJOR
+ MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
+@@ -116,10 +117,7 @@
+ unsigned int nv_remap_limit;
+ #endif
+
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+-int nv_use_cpa = 1;
+-#endif
+-
++int nv_update_memory_types = 1;
+ static int nv_mmconfig_failure_detected = 0;
+
+ static void *nv_pte_t_cache = NULL;
+@@ -1030,30 +1028,26 @@
+ #endif /* defined(NV_BUILD_NV_PAT_SUPPORT) */
+ }
+
+-
+ #if defined(NV_CHANGE_PAGE_ATTR_BUG_PRESENT)
+-
+-/* nv_verify_cpa_interface - determine if the change_page_attr bug is fixed
+- * in this kernel.
++/*
++ * nv_verify_cpa_interface() - determine if the change_page_attr() large page
++ * management accounting bug known to exist in early Linux/x86-64 kernels
++ * is present in this kernel.
+ *
+- * there's really not a good way to determine if change_page_attr is fixed.
+- * we can't really use cpa on 2.6 x86_64 kernels < 2.6.11, as if we run into
+- * the accounting bug, the kernel will throw a BUG. this isn't 100% accurate,
+- * as it doesn't throw a bug until we try to restore the caching attributes
+- * of the page. so if we can track down a 4M allocation, we can mark it
+- * uncached and see if the accounting was done correctly.
+- *
+- * this is a little ugly, but the most accurate approach to determining if
+- * this kernel is good.
++ * There's really no good way to determine if change_page_attr() is working
++ * correctly. We can't reliably use change_page_attr() on Linux/x86-64 2.6
++ * kernels < 2.6.11: if we run into the accounting bug, the Linux kernel will
++ * trigger a BUG() if we attempt to restore the WB memory type of a page
++ * originally part of a large page.
+ *
+- * why do we even bother? some distributions have back-ported the cpa fix to
+- * kernels < 2.6.11. we want to use change_page_attr to avoid random corruption
+- * and hangs, but need to make sure it's safe to do so.
++ * So if we can successfully allocate such a page, change its memory type to
++ * UC and check if the accounting was done correctly, we can determine if
++ * the change_page_attr() interface can be used safely.
+ *
+- * return values:
+- * 0 - test passed, interface works
+- * 1 - test failed, status unclear
+- * -1 - test failed, interface broken
++ * Return values:
++ * 0 - test passed, the change_page_attr() interface works
++ * 1 - test failed, the status is unclear
++ * -1 - test failed, the change_page_attr() interface is broken
+ */
+
+ static inline pte_t *check_large_page(unsigned long vaddr)
+@@ -1061,7 +1055,7 @@
+ pgd_t *pgd = NULL;
+ pmd_t *pmd = NULL;
+
+- pgd = NV_PGD_OFFSET(vaddr, 1, &init_mm);
++ pgd = NV_PGD_OFFSET(vaddr, 1, NULL);
+ if (!NV_PGD_PRESENT(pgd))
+ return NULL;
+
+@@ -1171,20 +1165,29 @@
+
+ return 1;
+ }
+-
+ #endif /* defined(NV_CHANGE_PAGE_ATTR_BUG_PRESENT) */
+
+-
+-// verify that the kernel's mapping matches the requested type
+-// this is to protect against accidental cache aliasing problems
++/*
++ * nv_verify_page_mappings() - verify that the kernel mapping of the specified
++ * page matches the specified type. This is to help detect bugs in the Linux
++ * kernel's change_page_attr() interface, early.
++ *
++ * This function relies on the ability to perform kernel virtul address to PFN
++ * translations and therefore on 'init_mm'. Unfortunately, the latter is no
++ * longer exported in recent Linux/x86 2.6 kernels. The export was removed at
++ * roughtly the same time as the set_pages_{uc,wb}() change_page_attr()
++ * replacement interfaces were introduced; hopefully, it will be sufficient to
++ * check for their presence.
++ */
+ int nv_verify_page_mappings(
+ nv_pte_t *page_ptr,
+ unsigned int cachetype
+ )
+ {
++#if defined(NV_CHANGE_PAGE_ATTR_PRESENT) || \
++ (defined(NV_SET_PAGES_UC_PRESENT) && !defined(NVCPU_X86))
+ unsigned long retval = -1;
+ #if defined(NVCPU_X86) || defined(NVCPU_X86_64)
+- struct mm_struct *mm;
+ pgd_t *pgd = NULL;
+ pmd_t *pmd = NULL;
+ pte_t *pte = NULL;
+@@ -1192,15 +1195,12 @@
+ unsigned long address;
+ static int count = 0;
+
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+- if (!nv_use_cpa)
++ if (!nv_update_memory_types)
+ return 0;
+-#endif
+
+ address = (unsigned long)__va(page_ptr->phys_addr);
+- mm = &init_mm; // always a kernel page
+
+- pgd = NV_PGD_OFFSET(address, 1, mm);
++ pgd = NV_PGD_OFFSET(address, 1, NULL);
+ if (!NV_PGD_PRESENT(pgd))
+ {
+ nv_printf(NV_DBG_ERRORS, "NVRM: pgd not present for addr 0x%lx\n", address);
+@@ -1266,8 +1266,11 @@
+ }
+
+ failed:
+-#endif
++#endif /* defined(NVCPU_X86) || defined(NVCPU_X86_64) */
+ return retval;
++#else
++ return 0;
++#endif
+ }
+
+ #if defined(NV_BUILD_NV_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU)
+@@ -1313,7 +1316,7 @@
+ static int __init nvidia_init_module(void)
+ {
+ int rc;
+- U032 i, count;
++ U032 i, count, data;
+ nv_state_t *nv = NV_STATE_PTR(&nv_ctl_device);
+ nv_stack_t *sp = NULL;
+
+@@ -1485,43 +1488,42 @@
+ /* create /proc/driver/nvidia */
+ nvos_proc_create();
+
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
++ /*
++ * Give users an opportunity to disable the driver's use of
++ * the change_page_attr() and set_pages_{uc,wb}() kernel
++ * interfaces.
++ */
++ rc = rm_read_registry_dword(sp, nv,
++ "NVreg", NV_REG_UPDATE_MEMORY_TYPES, &data);
++ if ((rc == 0) && ((int)data != ~0))
+ {
+- int data;
+-
+- // allow the user to override us with a registry key
+- rc = rm_read_registry_dword(sp, nv, "NVreg", "UseCPA", &data);
+- if ((rc == 0) && (data != -1))
+- {
+- nv_use_cpa = data;
+- }
++ nv_update_memory_types = data;
++ }
+ #if defined(NV_CHANGE_PAGE_ATTR_BUG_PRESENT)
+- else
++ /*
++ * Unless we explicitely detect that the change_page_attr()
++ * inteface is fixed, disable usage of the interface on
++ * this kernel. Notify the user of this problem using the
++ * driver's /proc warnings interface (read by the installer
++ * and the bug report script).
++ */
++ else
++ {
++ rc = nv_verify_cpa_interface();
++ if (rc < 0)
+ {
+- /*
+- * Unless we explicitely detect that the change_page_attr()
+- * inteface is fixed, disable usage of the interface on
+- * this kernel. Notify the user of this problem using the
+- * driver's /proc warnings interface (read by the installer
+- * and the bug report script).
+- */
+- rc = nv_verify_cpa_interface();
+- if (rc < 0)
+- {
+- nv_prints(NV_DBG_ERRORS, __cpgattr_warning);
+- nvos_proc_add_warning_file("change_page_attr", __cpgattr_warning);
+- nv_use_cpa = 0;
+- }
+- else if (rc != 0)
+- {
+- nv_prints(NV_DBG_ERRORS, __cpgattr_warning_2);
+- nvos_proc_add_warning_file("change_page_attr", __cpgattr_warning_2);
+- nv_use_cpa = 0;
+- }
++ nv_prints(NV_DBG_ERRORS, __cpgattr_warning);
++ nvos_proc_add_warning_file("change_page_attr", __cpgattr_warning);
++ nv_update_memory_types = 0;
++ }
++ else if (rc != 0)
++ {
++ nv_prints(NV_DBG_ERRORS, __cpgattr_warning_2);
++ nvos_proc_add_warning_file("change_page_attr", __cpgattr_warning_2);
++ nv_update_memory_types = 0;
+ }
+-#endif
+ }
+-#endif
++#endif /* defined(NV_CHANGE_PAGE_ATTR_BUG_PRESENT) */
+
+ #if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION) && !defined(HAVE_COMPAT_IOCTL)
+ /* Register ioctl()'s for 32-bit clients */
+@@ -3482,8 +3484,21 @@
+ pte_t *pte = NULL;
+ NvU64 retval;
+
+- mm = (kern) ? &init_mm : current->mm;
+- if (!kern) down_read(&current->mm->mmap_sem);
++ if (!kern)
++ {
++ mm = current->mm;
++ down_read(&mm->mmap_sem);
++ }
++ else
++ {
++#if defined(NV_SET_PAGES_UC_PRESENT) && defined(NVCPU_X86)
++ /* nv_printf(NV_DBG_ERRORS,
++ "NVRM: can't translate KVA in nv_get_phys_address()!\n"); */
++ return 0;
++#else
++ mm = NULL;
++#endif
++ }
+
+ pgd = NV_PGD_OFFSET(address, kern, mm);
+ if (!NV_PGD_PRESENT(pgd))
+@@ -3504,22 +3519,24 @@
+ retval &= ~_PAGE_NX;
+ #endif
+
+- if (!kern) up_read(&current->mm->mmap_sem);
++ if (!kern)
++ up_read(&mm->mmap_sem);
+ return retval;
+
+ failed:
+- if (!kern) up_read(&current->mm->mmap_sem);
++ if (!kern)
++ up_read(&mm->mmap_sem);
+ return 0;
+ }
+
+ NvU64 NV_API_CALL nv_get_kern_phys_address(NvU64 address)
+ {
+- // make sure this address is a kernel pointer
++ /* make sure this address is a kernel virtual address */
+ #if defined(DEBUG) && !defined(CONFIG_X86_4G)
+ if (address < PAGE_OFFSET)
+ {
+ nv_printf(NV_DBG_WARNINGS,
+- "NVRM: user address passed to get_kern_phys_address: 0x%lx\n",
++ "NVRM: user address passed to get_kern_phys_address: 0x%llx!\n",
+ address);
+ return 0;
+ }
+@@ -3534,12 +3551,12 @@
+
+ NvU64 NV_API_CALL nv_get_kern_user_address(NvU64 address)
+ {
+- // make sure this address is not a kernel pointer
++ /* make sure this address is not a kernel virtual address */
+ #if defined(DEBUG) && !defined(CONFIG_X86_4G)
+ if (address >= PAGE_OFFSET)
+ {
+ nv_printf(NV_DBG_WARNINGS,
+- "NVRM: kernel address passed to get_user_phys_address: 0x%lx\n",
++ "NVRM: kernel address passed to get_user_phys_address: 0x%llx!\n",
+ address);
+ return 0;
+ }
+@@ -4316,16 +4333,12 @@
+ return -1;
+ }
+
+-int NV_API_CALL nv_no_incoherent_mappings
+-(
+- void
+-)
++int NV_API_CALL nv_no_incoherent_mappings(void)
+ {
+ if(nv_ext_no_incoherent_mappings() == 1)
+ return 1;
+-
+-#if defined(NV_CHANGE_PAGE_ATTR_PRESENT)
+- return 1;
++#if defined(NV_CHANGE_PAGE_ATTR_PRESENT) || defined(NV_SET_PAGES_UC_PRESENT)
++ return (nv_update_memory_types);
+ #else
+ return 0;
+ #endif
+diff -ru usr/src/nv/os-interface.c usr/src/nv.2286310/os-interface.c
+--- usr/src/nv/os-interface.c 2008-03-16 14:13:09.000000000 -0700
++++ usr/src/nv.2286310/os-interface.c 2008-03-16 14:37:47.208131723 -0700
+@@ -1198,6 +1198,18 @@
+ {
+ void *vaddr;
+
++ if (start == 0)
++ {
++ if (mode != NV_MEMORY_CACHED)
++ {
++ nv_printf(NV_DBG_ERRORS,
++ "NVRM: os_map_kernel_space: won't map address 0x%0llx UC!\n", start);
++ return NULL;
++ }
++ else
++ return (void *)PAGE_OFFSET;
++ }
++
+ if (!NV_MAY_SLEEP())
+ {
+ nv_printf(NV_DBG_ERRORS,
+@@ -1230,6 +1242,9 @@
+ NvU64 size_bytes
+ )
+ {
++ if (addr == (void *)PAGE_OFFSET)
++ return;
++
+ NV_IOUNMAP(addr, size_bytes);
+ }
+
diff --git a/abs/core-testing/nvidia-beta/PKGBUILD b/abs/core-testing/nvidia-beta/PKGBUILD
new file mode 100644
index 0000000..e822996
--- /dev/null
+++ b/abs/core-testing/nvidia-beta/PKGBUILD
@@ -0,0 +1,38 @@
+pkgname=nvidia-beta
+pkgver=180.11
+_kernver='2.6.26-ARCH'
+pkgrel=2
+pkgdesc="NVIDIA beta drivers for kernel26"
+arch=('i686' 'x86_64')
+[ "$CARCH" = "i686" ] && ARCH=x86 && NV=0
+[ "$CARCH" = "x86_64" ] && ARCH=x86_64 && NV=0
+provides=('nvidia')
+url="http://www.nvidia.com/"
+depends=('kernel26' 'nvidia-utils-beta')
+conflicts=('nvidia' 'nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy')
+license=('custom')
+install=nvidia.install
+source=(ftp://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg${NV}.run)
+md5sums=('759a1aa16073616e3104f461dffbeded')
+[ "$CARCH" = "x86_64" ] && md5sums=('3c7a1bb6c9e55a8df0ec4e396e9187b2')
+
+build()
+{
+ # Extract
+ echo ${_kernver}
+ cd $startdir/src/
+ sh NVIDIA-Linux-$ARCH-${pkgver}-pkg${NV}.run --extract-only
+ cd NVIDIA-Linux-$ARCH-${pkgver}-pkg${NV}
+
+ # Any extra patches are applied in here...
+
+ cd usr/src/nv/
+ ln -s Makefile.kbuild Makefile
+ make SYSSRC=/lib/modules/${_kernver}/build module
+
+ # install kernel module
+ mkdir -p $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
+ install -m644 nvidia.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
+
+ sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
+} \ No newline at end of file
diff --git a/abs/core-testing/nvidia-beta/nvidia.install b/abs/core-testing/nvidia-beta/nvidia.install
new file mode 100644
index 0000000..dbbec39
--- /dev/null
+++ b/abs/core-testing/nvidia-beta/nvidia.install
@@ -0,0 +1,22 @@
+# arg 1: the new package version
+post_install() {
+ KERNEL_VERSION='2.6.26-ARCH'
+ depmod -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+ rmmod nvidia || echo 'In order to use the new nvidia module, exit Xserver and unload it manually.'
+}
+
+# arg 1: the old package version
+post_remove() {
+ KERNEL_VERSION='2.6.26-ARCH'
+ depmod -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/core-testing/nvidia-utils-beta/PKGBUILD b/abs/core-testing/nvidia-utils-beta/PKGBUILD
new file mode 100644
index 0000000..e0dd0df
--- /dev/null
+++ b/abs/core-testing/nvidia-utils-beta/PKGBUILD
@@ -0,0 +1,67 @@
+pkgname=nvidia-utils-beta
+pkgver=180.11
+pkgrel=1
+pkgdesc="NVIDIA beta drivers utilities and libraries."
+provides=('nvidia-utils' 'libgl')
+arch=('i686' 'x86_64')
+[ "$CARCH" = "i686" ] && ARCH=x86 && NV=0
+[ "$CARCH" = "x86_64" ] && ARCH=x86_64 && NV=0
+url="http://www.nvidia.com/"
+depends=('xorg-server')
+conflicts=('libgl' 'libgl-dri' 'ati-fglrx-utils' 'nvidia-legacy-utils' \
+ 'nvidia-71xx-utils' 'nvidia-96xx-utils')
+license=('custom')
+install=nvidia.install
+source=(ftp://download.nvidia.com/XFree86/Linux-${ARCH}/${pkgver}/NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}.run \
+ supported-cards.txt)
+
+
+[ "$CARCH" = "x86_64" ] && md5sums=('3c7a1bb6c9e55a8df0ec4e396e9187b2'
+ '5b5835bdb1508a57591b812c109a2679')
+
+
+options=(docs !strip)
+
+build()
+{
+ # override nvida install routine and do it the long way.
+ cd $startdir/src/
+ sh NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}.run --extract-only
+ cd NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}/usr/
+ mkdir -p $startdir/pkg/usr/{include/cuda,include/vdpau,lib,bin,share/applications,share/pixmaps,man/man1}
+# mkdir -p $startdir/pkg/usr/{lib,bin,share/applications,share/pixmaps,man/man1}
+ mkdir -p $startdir/pkg/usr/lib/xorg/modules/{extensions,drivers}
+ mkdir -p $startdir/pkg/usr/share/licenses/nvidia/
+ cp -rp include/cuda/* $startdir/pkg/usr/include/cuda || return 1
+ cp -rp include/vdpau/* $startdir/pkg/usr/include/vdpau || return 1
+ install lib/{libGLcore,libGL,libnvidia-cfg,libcuda,tls/libnvidia-tls}.so.${pkgver} \
+ $startdir/pkg/usr/lib/ || return 1
+ install -m644 share/man/man1/* $startdir/pkg/usr/man/man1/ || return 1
+ rm $startdir/pkg/usr/man/man1/nvidia-installer.1.gz || return 1
+ install X11R6/lib/libXv* $startdir/pkg/usr/lib/ || return 1
+ install -m644 share/applications/nvidia-settings.desktop $startdir/pkg/usr/share/applications/ || return 1
+ # fix nvidia .desktop file
+ sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i $startdir/pkg/usr/share/applications/nvidia-settings.desktop
+ install -m644 share/pixmaps/nvidia-settings.png $startdir/pkg/usr/share/pixmaps/ || return 1
+ install X11R6/lib/modules/libnvidia-wfb.so.$pkgver $startdir/pkg/usr/lib/xorg/modules || return 1
+ install X11R6/lib/modules/drivers/nvidia_drv.so $startdir/pkg/usr/lib/xorg/modules/drivers || return 1
+ install X11R6/lib/modules/extensions/libglx.so.$pkgver $startdir/pkg/usr/lib/xorg/modules/extensions || return 1
+ install -m755 bin/nvidia-{settings,xconfig,bug-report.sh} $startdir/pkg/usr/bin/ || return 1
+ cd $startdir/pkg/usr/lib/
+ ln -s libGL.so.$pkgver libGL.so || return 1
+ ln -s libGL.so.$pkgver libGL.so.1 || return 1
+ ln -s libGLcore.so.$pkgver libGLcore.so.1 || return 1
+ ln -s libnvidia-cfg.so.$pkgver libnvidia-cfg.so.1 || return 1
+ ln -s libnvidia-tls.so.$pkgver libnvidia-tls.so.1 || return 1
+ ln -s libcuda.so.$pkgver libcuda.so.1 || return 1
+ ln -s libXvMCNVIDIA.so.$pkgver libXvMCNVIDIA_dynamic.so.1 || return 1
+ cd $startdir/pkg/usr/lib/xorg/modules/extensions
+ ln -s libglx.so.$pkgver libglx.so || return 1
+
+ install -m644 $startdir/src/NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}/LICENSE $startdir/pkg/usr/share/licenses/nvidia/ || return 1
+ ln -s nvidia $startdir/pkg/usr/share/licenses/nvidia-utils || return 1
+ install -D -m644 $startdir/src/NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}/usr/share/doc/README.txt $startdir/pkg/usr/share/doc/nvidia/README || return 1
+ install -D -m644 $startdir/src/supported-cards.txt $startdir/pkg/usr/share/doc/nvidia/supported-cards.txt || return 1
+
+ find $startdir/pkg/usr -type d -exec chmod 755 {} \;
+}
diff --git a/abs/core-testing/nvidia-utils-beta/nvidia.install b/abs/core-testing/nvidia-utils-beta/nvidia.install
new file mode 100644
index 0000000..7d46ed6
--- /dev/null
+++ b/abs/core-testing/nvidia-utils-beta/nvidia.install
@@ -0,0 +1,40 @@
+# arg 1: the new package version
+post_install() {
+
+ echo -------------------------------
+ echo By using this package you accept the NVIDIA license,
+ echo which has been installed in /usr/share/licenses/nvidia/LICENSE
+ echo If you do not accept this license, you must remove the package immediately.
+ echo Dont forget to update your /etc/X11/xorg.conf
+ echo In order to use nvidia-settings, you need to install the 'gtk2' package.
+ echo In order to use nvidia-xconfig, you need to install the 'pkgconfig' package.
+ echo -------------------------------
+ echo nvidia 9746 drops support for Geforce 3 and 4 cards
+ echo If you have such a card, install the nvidia-96xx, nvidia-96xx-utils,
+ echo nvidia-96xx-ck, nvidia-96xx-beyond, nvidia-96xx-suspend2 packages
+ echo For a list of supported cards, see /usr/share/doc/nvidia/supported-cards.txt
+ echo -------------------------------
+
+ #echo ":: Updating symlinks to use built-in libwfb"
+ #ln -sf /usr/lib/xorg/modules/libnvidia-wfb.so.* \
+ # /usr/lib/xorg/modules/libwfb.so
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+ echo ":: Updating symlinks to use xorg-server libwfb"
+ ln -sf /usr/lib/xorg/modules/libwfb.so.* \
+ /usr/lib/xorg/modules/libwfb.so
+}
+
+post_remove() {
+ echo ":: Updating symlinks to use xorg-server libwfb"
+ ln -sf /usr/lib/xorg/modules/libwfb.so.* \
+ /usr/lib/xorg/modules/libwfb.so
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/core-testing/nvidia-utils-beta/supported-cards.txt b/abs/core-testing/nvidia-utils-beta/supported-cards.txt
new file mode 100644
index 0000000..ce4c3d4
--- /dev/null
+++ b/abs/core-testing/nvidia-utils-beta/supported-cards.txt
@@ -0,0 +1,292 @@
+Archlinux currently manages three branches of the NVIDIA binary driver:
+
+nvidia (latest nvidia release)
+nvidia-96xx (96xx legacy branch)
+nvidia-71xx (71xx legacy branch)
+
+This excerpt from the NVIDIA 100.14.09 README lists the supported devices
+for each of those:
+
+______________________________________________________________________________
+
+Appendix A. Supported NVIDIA GPU Products
+______________________________________________________________________________
+
+For the most complete and accurate listing of supported GPUs, please see the
+Supported Products List, available from the NVIDIA Linux x86 Graphics Driver
+download page. Please go to http://www.nvidia.com/object/unix.html, follow the
+Archive link under the Linux x86 heading, follow the link for the 100.14.09
+driver, and then go to the Supported Products List.
+
+
+A1. NVIDIA GEFORCE GPUS
+
+
+ NVIDIA GPU product Device PCI ID
+ ---------------------------------- ----------------------------------
+ GeForce 6800 Ultra 0x0040
+ GeForce 6800 0x0041
+ GeForce 6800 LE 0x0042
+ GeForce 6800 XE 0x0043
+ GeForce 6800 XT 0x0044
+ GeForce 6800 GT 0x0045
+ GeForce 6800 GT 0x0046
+ GeForce 6800 GS 0x0047
+ GeForce 6800 XT 0x0048
+ GeForce 7800 GTX 0x0090
+ GeForce 7800 GTX 0x0091
+ GeForce 7800 GTX 0x0092
+ GeForce 7800 GS 0x0093
+ GeForce 7800 SLI 0x0095
+ GeForce Go 7800 0x0098
+ GeForce Go 7800 GTX 0x0099
+ GeForce 6800 GS 0x00C0
+ GeForce 6800 0x00C1
+ GeForce 6800 LE 0x00C2
+ GeForce 6800 XT 0x00C3
+ GeForce Go 6800 0x00C8
+ GeForce Go 6800 Ultra 0x00C9
+ GeForce 6800 Ultra/GeForce 6800 0x00F0
+ GeForce 6600 GT 0x00F1
+ GeForce 6600 0x00F2
+ GeForce 6200 0x00F3
+ GeForce 6600 LE 0x00F4
+ GeForce 7800 GS 0x00F5
+ GeForce 6800 GS/XT 0x00F6
+ GeForce 6800 Ultra 0x00F9
+ GeForce PCX 5750 0x00FA
+ GeForce PCX 5900 0x00FB
+ GeForce PCX 5300 0x00FC
+ GeForce PCX 4300 0x00FF
+ GeForce 6600 GT 0x0140
+ GeForce 6600 0x0141
+ GeForce 6600 LE 0x0142
+ GeForce 6600 VE 0x0143
+ GeForce Go 6600 0x0144
+ GeForce 6610 XL 0x0145
+ GeForce Go 6600 TE/6200 TE 0x0146
+ GeForce 6700 XL 0x0147
+ GeForce Go 6600 0x0148
+ GeForce Go 6600 GT 0x0149
+ GeForce 6200 0x014F
+ GeForce 6500 0x0160
+ GeForce 6200 TurboCache(TM) 0x0161
+ GeForce 6200SE TurboCache(TM) 0x0162
+ GeForce 6200 LE 0x0163
+ GeForce Go 6200 0x0164
+ GeForce Go 6400 0x0166
+ GeForce Go 6200 0x0167
+ GeForce Go 6400 0x0168
+ GeForce 6250 0x0169
+ GeForce 7100 GS 0x016A
+ GeForce 8800 GTX 0x0191
+ GeForce 8800 GTS 0x0193
+ GeForce 8800 Ultra 0x0194
+ GeForce 7350 LE 0x01D0
+ GeForce 7300 LE 0x01D1
+ GeForce 7300 SE/7200 GS 0x01D3
+ GeForce Go 7200 0x01D6
+ GeForce Go 7300 0x01D7
+ GeForce Go 7400 0x01D8
+ GeForce 7500 LE 0x01DD
+ GeForce 7300 GS 0x01DF
+ GeForce 6800 0x0211
+ GeForce 6800 LE 0x0212
+ GeForce 6800 GT 0x0215
+ GeForce 6800 XT 0x0218
+ GeForce 6200 0x0221
+ GeForce 6200 A-LE 0x0222
+ GeForce 6150 0x0240
+ GeForce 6150 LE 0x0241
+ GeForce 6100 0x0242
+ GeForce Go 6150 0x0244
+ GeForce Go 6100 0x0247
+ GeForce 7900 GTX 0x0290
+ GeForce 7900 GT/GTO 0x0291
+ GeForce 7900 GS 0x0292
+ GeForce 7950 GX2 0x0293
+ GeForce 7950 GX2 0x0294
+ GeForce 7950 GT 0x0295
+ GeForce Go 7950 GTX 0x0297
+ GeForce Go 7900 GS 0x0298
+ GeForce Go 7900 GTX 0x0299
+ GeForce 7600 GT/Unknown GPU 0x02E0
+ GeForce 7600 GS 0x02E1
+ GeForce FX 5800 Ultra 0x0301
+ GeForce FX 5800 0x0302
+ GeForce FX 5600 Ultra 0x0311
+ GeForce FX 5600 0x0312
+ GeForce FX 5600XT 0x0314
+ GeForce FX Go5600 0x031A
+ GeForce FX Go5650 0x031B
+ GeForce FX 5200 0x0320
+ GeForce FX 5200 Ultra 0x0321
+ GeForce FX 5200 0x0322
+ GeForce FX 5200LE 0x0323
+ GeForce FX Go5200 0x0324
+ GeForce FX Go5250 0x0325
+ GeForce FX 5500 0x0326
+ GeForce FX 5100 0x0327
+ GeForce FX Go5200 32M/64M 0x0328
+ GeForce FX Go53xx 0x032C
+ GeForce FX Go5100 0x032D
+ GeForce FX 5900 Ultra 0x0330
+ GeForce FX 5900 0x0331
+ GeForce FX 5900XT 0x0332
+ GeForce FX 5950 Ultra 0x0333
+ GeForce FX 5900ZT 0x0334
+ GeForce FX 5700 Ultra 0x0341
+ GeForce FX 5700 0x0342
+ GeForce FX 5700LE 0x0343
+ GeForce FX 5700VE 0x0344
+ GeForce FX Go5700 0x0347
+ GeForce FX Go5700 0x0348
+ GeForce 7650 GS 0x0390
+ GeForce 7600 GT 0x0391
+ GeForce 7600 GS 0x0392
+ GeForce 7300 GT 0x0393
+ GeForce 7600 LE 0x0394
+ GeForce 7300 GT 0x0395
+ GeForce Go 7600 0x0398
+ GeForce 6150SE nForce 430 0x03D0
+ GeForce 6100 nForce 405 0x03D1
+ GeForce 6100 nForce 400 0x03D2
+ GeForce 6100 nForce 420 0x03D5
+ GeForce 8600 GTS 0x0400
+ GeForce 8600 GT 0x0402
+ GeForce 8600M GT 0x0407
+ GeForce 8500 GT 0x0421
+ GeForce 8400 GS 0x0422
+ GeForce 8300 GS 0x0423
+ GeForce 8600M GS 0x0425
+ GeForce 8400M GT 0x0426
+ GeForce 8400M GS 0x0427
+ GeForce 8400M G 0x0428
+
+
+
+A2. NVIDIA QUADRO GPUS
+
+
+ NVIDIA GPU product Device PCI ID
+ ------------------------------------------------------ ---------------
+ Quadro FX 4000 0x004E
+ Quadro FX 4500 0x009D
+ Quadro FX Go1400 0x00CC
+ Quadro FX 3450/4000 SDI 0x00CD
+ Quadro FX 1400 0x00CE
+ Quadro FX 4400/Quadro FX 3400 0x00F8
+ Quadro FX 330 0x00FC
+ Quadro NVS 280 PCI-E/Quadro FX 330 0x00FD
+ Quadro FX 1300 0x00FE
+ Quadro NVS 440 0x014A
+ Quadro FX 540M/Quadro FX 540M 0x014C
+ Quadro FX 550 0x014D
+ Quadro FX 540 0x014E
+ Quadro NVS 285 0x0165
+ Quadro FX 5600 0x019D
+ Quadro FX 4600 0x019E
+ Quadro NVS 110M 0x01D7
+ Quadro NVS 110M 0x01DA
+ Quadro NVS 120M 0x01DB
+ Quadro FX 350M 0x01DC
+ Quadro FX 350 0x01DE
+ Quadro NVS 210S / NVIDIA GeForce 6150LE 0x0245
+ Quadro FX 2500M 0x029A
+ Quadro FX 1500M 0x029B
+ Quadro FX 5500 0x029C
+ Quadro FX 3500 0x029D
+ Quadro FX 1500 0x029E
+ Quadro FX 4500 X2 0x029F
+ Quadro FX 2000 0x0308
+ Quadro FX 1000 0x0309
+ Quadro FX Go700 0x031C
+ Quadro NVS 55/280 PCI 0x032A
+ Quadro FX 500/FX 600 0x032B
+ Quadro FX 3000 0x0338
+ Quadro FX 700 0x033F
+ Quadro FX Go1000 0x034C
+ Quadro FX 1100 0x034E
+ Quadro FX 560 0x039E
+ Quadro NVS 320M 0x040B
+ Quadro FX 570M 0x040C
+ Quadro FX 1600M 0x040D
+ Quadro NVS 140M 0x0429
+ Quadro NVS 130M 0x042A
+ Quadro NVS 135M 0x042B
+ Quadro FX 360M 0x042D
+
+
+Below are the legacy GPUs that are no longer supported in the unified driver.
+These GPUs will continue to be maintained through the special legacy NVIDIA
+GPU driver releases.
+
+The 1.0-96xx driver supports the following set of GPUs:
+
+
+ NVIDIA GPU product Device PCI ID
+ ---------------------------------- ----------------------------------
+ GeForce2 MX/MX 400 0x0110
+ GeForce2 MX 100/200 0x0111
+ GeForce2 Go 0x0112
+ Quadro2 MXR/EX/Go 0x0113
+ GeForce4 MX 460 0x0170
+ GeForce4 MX 440 0x0171
+ GeForce4 MX 420 0x0172
+ GeForce4 MX 440-SE 0x0173
+ GeForce4 440 Go 0x0174
+ GeForce4 420 Go 0x0175
+ GeForce4 420 Go 32M 0x0176
+ GeForce4 460 Go 0x0177
+ Quadro4 550 XGL 0x0178
+ GeForce4 440 Go 64M 0x0179
+ Quadro NVS 400 0x017A
+ Quadro4 500 GoGL 0x017C
+ GeForce4 410 Go 16M 0x017D
+ GeForce4 MX 440 with AGP8X 0x0181
+ GeForce4 MX 440SE with AGP8X 0x0182
+ GeForce4 MX 420 with AGP8X 0x0183
+ GeForce4 MX 4000 0x0185
+ Quadro4 580 XGL 0x0188
+ Quadro NVS 280 SD 0x018A
+ Quadro4 380 XGL 0x018B
+ Quadro NVS 50 PCI 0x018C
+ GeForce2 Integrated GPU 0x01A0
+ GeForce4 MX Integrated GPU 0x01F0
+ GeForce3 0x0200
+ GeForce3 Ti 200 0x0201
+ GeForce3 Ti 500 0x0202
+ Quadro DCC 0x0203
+ GeForce4 Ti 4600 0x0250
+ GeForce4 Ti 4400 0x0251
+ GeForce4 Ti 4200 0x0253
+ Quadro4 900 XGL 0x0258
+ Quadro4 750 XGL 0x0259
+ Quadro4 700 XGL 0x025B
+ GeForce4 Ti 4800 0x0280
+ GeForce4 Ti 4200 with AGP8X 0x0281
+ GeForce4 Ti 4800 SE 0x0282
+ GeForce4 4200 Go 0x0286
+ Quadro4 980 XGL 0x0288
+ Quadro4 780 XGL 0x0289
+ Quadro4 700 GoGL 0x028C
+
+
+The 1.0-71xx driver supports the following set of GPUs:
+
+
+ NVIDIA GPU product Device PCI ID
+ ---------------------------------- ----------------------------------
+ RIVA TNT 0x0020
+ RIVA TNT2/TNT2 Pro 0x0028
+ RIVA TNT2 Ultra 0x0029
+ Vanta/Vanta LT 0x002C
+ RIVA TNT2 Model 64/Model 64 Pro 0x002D
+ Aladdin TNT2 0x00A0
+ GeForce 256 0x0100
+ GeForce DDR 0x0101
+ Quadro 0x0103
+ GeForce2 GTS/GeForce2 Pro 0x0150
+ GeForce2 Ti 0x0151
+ GeForce2 Ultra 0x0152
+ Quadro2 Pro 0x0153
diff --git a/abs/core-testing/nvidia/PKGBUILD b/abs/core-testing/nvidia/PKGBUILD
index b1af8b5..0814d77 100644
--- a/abs/core-testing/nvidia/PKGBUILD
+++ b/abs/core-testing/nvidia/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=nvidia
pkgver=173.14.12
_kernver='2.6.26-ARCH'
-pkgrel=3
+pkgrel=4
pkgdesc="NVIDIA drivers for kernel26."
arch=('i686' 'x86_64')
[ "$CARCH" = "i686" ] && ARCH=x86
diff --git a/abs/core-testing/read-edid-2.0.0.tar.gz b/abs/core-testing/read-edid-2.0.0.tar.gz
new file mode 100644
index 0000000..9160c9d
--- /dev/null
+++ b/abs/core-testing/read-edid-2.0.0.tar.gz
Binary files differ
diff --git a/abs/core-testing/runit-scripts/PKGBUILD b/abs/core-testing/runit-scripts/PKGBUILD
index 3792572..cc00956 100755
--- a/abs/core-testing/runit-scripts/PKGBUILD
+++ b/abs/core-testing/runit-scripts/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=runit-scripts
pkgver=1.8.0
-pkgrel=15
+pkgrel=21
pkgdesc="collection of startup scripts for runit"
url="http://smarden.org/runit/"
license="BSD"
diff --git a/abs/core-testing/runit-scripts/runitscripts/1 b/abs/core-testing/runit-scripts/runitscripts/1
index 748930f..b9ff184 100755
--- a/abs/core-testing/runit-scripts/runitscripts/1
+++ b/abs/core-testing/runit-scripts/runitscripts/1
@@ -2,7 +2,7 @@
/etc/rc.sysinit
hostname `cat /etc/hostname`
/sbin/sysctl -p 2>/dev/null >/dev/null
-#/usr/bin/load-modules-mythvantage.sh
+/usr/LH/bin/load-modules-mythvantage.sh
rm /etc/dhcpc/dhcpcd*.pid 2>/dev/null
rm -f /etc/sv/frontend/.runtime/* 2>/dev/null
rm -f /etc/runit/reboot 2>/dev/null
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish
index 0dd33de..5ebda4c 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish
+++ b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish
@@ -1,4 +1,10 @@
#!/bin/bash
. /etc/profile
-DISPLAY=localhost:50 evrouter -q
-rm -rf /tmp/.evrouter*
+which evrouter >/dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ DISPLAY=localhost:50 evrouter -q
+ rm -rf /tmp/.evrouter*
+else
+ sv down evrouter
+fi \ No newline at end of file
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run
index 1d7389a..5697f6f 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run
@@ -1,5 +1,13 @@
#!/bin/bash
. /etc/profile
-sv start Xvfb
-su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*"
+which evrouter >/dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ ps -ef |grep -v grep|grep -q "Xvfb :50"
+ if [ ! $? = 0 ]
+ then
+ sv start Xvfb
+ fi
+ su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*"
+fi
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run
index 9908256..ceda8db 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run
@@ -33,7 +33,9 @@ case $ReceiverType in
Usb-imon)
DEVICE=/dev/lirc_imon
;;
-
+ Hauppauge)
+ DEVICE=/dev/lirc3
+ ;;
*)
DEVICE=`ls /dev/lirc[0-9] 2>/dev/null |sort |sed '/./,$!d'|head -n 1 `
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ncid/finish b/abs/core-testing/runit-scripts/runitscripts/services/ncid/finish
new file mode 100644
index 0000000..953a4a1
--- /dev/null
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ncid/finish
@@ -0,0 +1,9 @@
+#!/bin/bash
+exec 2>&1
+which ncid 2>/dev/null >/dev/null
+if [ ! $? = 0 ]
+then
+ sv down ncid
+fi
+
+
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ncid/run b/abs/core-testing/runit-scripts/runitscripts/services/ncid/run
index 8a90707..7dbc8ba 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/ncid/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ncid/run
@@ -1,5 +1,12 @@
#!/bin/sh
exec 2>&1
-sv start ncidd
-exec /usr/bin/ncid --no-gui --all --call-prog --program /usr/bin/ncid.py 127.0.0.1 3333
+which ncid 2>/dev/null >/dev/null
+if [ $? = 0 ]
+then
+ if [ -f /var/service/ncidd/run ]
+ then
+ sv start ncidd
+ fi
+ exec /usr/bin/ncid --no-gui --all --call-prog --program /usr/bin/ncid.py 127.0.0.1 3333
+fi
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ncidd/finish b/abs/core-testing/runit-scripts/runitscripts/services/ncidd/finish
new file mode 100644
index 0000000..ab39d39
--- /dev/null
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ncidd/finish
@@ -0,0 +1,9 @@
+#!/bin/bash
+exec 2>&1
+which ncidd 2>/dev/null >/dev/null
+if [ ! $? = 0 ]
+then
+ sv down ncid
+fi
+
+
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ncidd/run b/abs/core-testing/runit-scripts/runitscripts/services/ncidd/run
index 6b032db..f1c710a 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/ncidd/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ncidd/run
@@ -1,3 +1,7 @@
#!/bin/sh
exec 2>&1
-exec /usr/sbin/ncidd -D 2>&1
+which ncidd > /dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ exec /usr/sbin/ncidd -D 2>&1
+fi
diff --git a/abs/core-testing/sysvinit/PKGBUILD b/abs/core-testing/sysvinit/PKGBUILD
index 2a32da9..6fbb3cd 100644
--- a/abs/core-testing/sysvinit/PKGBUILD
+++ b/abs/core-testing/sysvinit/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=sysvinit
pkgver=2.86
-pkgrel=11
+pkgrel=12
pkgdesc="Linux System V Init"
arch=(i686 x86_64)
license=('GPL')
diff --git a/abs/core-testing/sysvinit/halt-init.patch b/abs/core-testing/sysvinit/halt-init.patch
index 3c61e0f..88eb0ce 100644
--- a/abs/core-testing/sysvinit/halt-init.patch
+++ b/abs/core-testing/sysvinit/halt-init.patch
@@ -7,8 +7,8 @@
+ if (!strcmp(progname, "reboot.init")) do_reboot = 1;
+ if (!strcmp(progname, "poweroff.init")) do_poweroff = 1;
+
-+ fprintf(stderr, "%d: do_reboot \n ", do_reboot);
-+ fprintf(stderr, "%d: do_poweroff \n ", do_poweroff);
++ //fprintf(stderr, "%d: do_reboot \n ", do_reboot);
++ //fprintf(stderr, "%d: do_poweroff \n ", do_poweroff);
+ //fprintf(stderr, "%s: \n", progname);
+ //do_nothing = 1;
+
diff --git a/abs/core-testing/vi/PKGBUILD b/abs/core-testing/vi/PKGBUILD
index 3bfc4db..5d6d984 100644
--- a/abs/core-testing/vi/PKGBUILD
+++ b/abs/core-testing/vi/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=vi
_srcver=7.2
-_patchlevel=30
+_patchlevel=65
pkgver=${_srcver}.${_patchlevel}
pkgrel=1
pkgdesc="a highly configurable, improved version of the vi text editor (basic version)"