Kodi Community Forum
New MythTV add-on using libcmyth - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



- fiveisalive - 2012-02-14

Powderking Wrote:Thanks alot for your reply!

Is it right that running bootstrap isn't necessary anymore?

AFAIK bootstrap normally needs to be done only once (upon your first checkout from github).


- Powderking - 2012-02-14

Great!
This will speed up updating Smile

Thanks alot!


Mythtv is now forked as Torc - druhboruch - 2012-02-16

http://www.phoronix.com/scan.php?page=news_item&px=MTA1Nzg

What does it mean for the future of mythtv and xbmc plugin?


git install script for oneiric - sysadm1n - 2012-02-17

First of all, THANK YOU to everyone at XBMC for such an incredible project!!! I'm especially glad to see the PVR things come together.

I've put together a little one-off script to install it from git that might make things easier for some. It's been tested in Ubuntu 11.10 and Mint 12.

To use it, open a terminal, paste the xbmc-pvr-install.sh text below into a file, then run it as your normal user. For example:
Code:
nano xbmc-pvr-install.sh
sh xbmc-pvr-install.sh

xbmc-pvr-install.sh
Code:
#!/bin/bash
##
## xbmc-pvr-install.sh
##
## AUTHOR: sysadmin
## VERSION: 0.2
## DATE: 2012-02-16
## LICENSE: GPL
## WARRANTY: None
##
CPUS=$(cat /proc/cpuinfo | grep -m 1 "cpu cores" | tr -d "cpu cores\t: ")
JOBS=$(($CPUS+1))
echo
echo "Backing up your XBMC folder..."
TIMESTAMP=$(date +%d%m%y%H%M)
cp -a ~/.xbmc ~/xbmc-$TIMESTAMP
echo "Your XBMC folder has been backed up to ~/xbmc-"$TIMESTAMP
read -p "Press [ENTER] to continue or <CTRL>-<C> to NOT delete your XBMC folder..." null
rm -rf ~/.xbmc
echo
echo "Updating system and installing dependencies..."
echo
sudo add-apt-repository ppa:team-xbmc/unstable
sudo add-apt-repository ppa:pulse-eight/libcec
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install ccache git
sudo apt-get build-dep xbmc -y
echo
echo "Making ~/src directory and downloading XBMC..."
echo
mkdir ~/src
cd ~/src
git clone https://github.com/tsp/xbmc.git
echo
echo "Building XBMC..."
echo
cd xbmc
./bootstrap
./configure
make --jobs=$JOBS
echo
echo "Installing XBMC..."
echo
sudo make install
sync
echo
echo "Making launch script..."
cd ~
echo "XBMC_HOME=/usr/local/share/xbmc /usr/local/bin/xbmc" > xbmc-pvr
chmod +x xbmc-pvr
echo
echo
echo "Done!"
echo "To run it, type ~/xbmc-pvr"

Cheers! Smile


- Powderking - 2012-02-18

That's great! Thanks alot.

I have merged your script with my attempt to update xbmc.

I wasn't sure how to test if git has updated something. So probably when running not longer than one minute after the last execution it compile's again because it tests if there's a change in the code dir.

Set the working dir to the directory where the source is. Now it should match with sysadm1n's script.

vdpau is the default. For those who don't want it uncomment the line #optConfigParams="". Or run it with -c "" option. The "" are needed because an argument is needed with the -c option.

Set usrName to the user name you run XBMC as. I run it as user xbmc. It's used to backup the user folder.

I prefer a little different place and timestamp. Just change it to your needs.



Code:
#!/bin/bash
##
## update-xbmc
##
## AUTHOR: Powderking
## VERSION: 0.1
## DATE: 2012-02-18
## LICENSE: GPL
## WARRANTY: None
##
set -ue

# Set working directory
WorkDir=~/src/xbmc

# Set default configuration parameter
optConfigParams="--enable-vdpau=yes"
#optConfigParams=""

# XBMC user name
usrName=xbmc

# XBMC users backup destination
bakFolder=~/xbmc-usrdata-backup


############################
# Option argument handling #
############################
     usageHelp="Usage: ${0##*/} [OPTIONS]"
      helpHelp="-h                   Show help"
      initHelp="-d                   Install dependencies"
bootstrapHelp="-b                   Bootstrap"
configureHelp="-c CONFIG_PARAM      Configure with optional configuration parameter, standard: $optConfigParams)"
   installHelp="-i                   Install (using sudo)"
badOptionHelp="Option not recognised"

printHelpAndExit(){
  echo "$usageHelp"
  echo "Update XBMC PVR libcmyth branch"
  echo
  echo "Options:"
#  echo "  $initHelp"
  echo "  $bootstrapHelp"
  echo "  $configureHelp"
  echo "  $installHelp"
  echo "  $helpHelp"
  exit $1
}
printErrorHelpAndExit(){
  echo
  echo "$@"
  echo
  echo
  printHelpAndExit 1
}
optInit=false
optBootstrap=false
optConfig=false
optInstall=false

while getopts "hbc:i" optionName; do            #TODO: Installing dependencies...
#while getopts "hdbc:i" optionName; do            #TODO: Installing dependencies...
  case "$optionName" in
    h)    printHelpAndExit 0;;
    d)    optInit=true;;
    b)    optBootstrap=true;;
    c)    optConfig=true; optConfigParams="$OPTARG";;
    i)    optInstall=true;;
    [?])  printErrorHelpAndExit "$badOptionHelp";;
  esac
done
shift $(($OPTIND - 1))  # get rid of the options
if [ $# -ne 0 ]; then
  printErrorHelpAndExit "$badOptionHelp"
fi


########
# Main #
########
CPUS=$(cat /proc/cpuinfo | grep -m 1 "cpu cores" | tr -d "cpu cores\t: ")
JOBS=$(($CPUS * 2))
TIMESTAMP=$(date +%Y%m%d_%H%M)

[ ! -d "$bakFolder" ] && mkdir "$bakFolder"
[ ! -d "$WorkDir" ] && mkdir -p "$WorkDir"; cd $WorkDir

if [ $optInit == true ]; then
    optBootstrap=true
    echo
    echo "Installing dependencies..."
    echo TODO
fi

echo
echo "Pulling new commits from git..."
git pull origin master

if [[ $(find . -mmin -1 | grep -v ".git" | wc -l) -gt 0 ]]; then
    if [ $optBootstrap == true ]; then
        optConfig=true
        echo
        echo "Bootstraping..."
        ./bootstrap
    fi

    if [ $optConfig == true ]; then
        echo
        echo "Configuring... (Using '$optConfigParams')"
        ./configure "$optConfigParams"
    fi

    echo
    echo "Compiling... (Using '--jobs=$JOBS')"
    make --jobs=$JOBS
    
    if [ $optInstall == true ]; then
            echo
            echo "Backing up XBMC users folder... (/home/"$usrName"/.xbmc => "$bakFolder"/"$usrName"-$TIMESTAMP)"
            cp -a /home/"$usrName"/.xbmc "$bakFolder"/"$usrName"-$TIMESTAMP
        echo
        echo "Installing..."
        sudo make install
    else
        echo
        echo "Comilation ok, use '${0##*/} -i' to install."
    fi
fi

exit 0



- fiveisalive - 2012-02-23

Any chance of a sync with https://github.com/opdenkamp/xbmc ? Last sync was Feb 6 and there are some good bug fixes in the main PVR code that would be nice to test with the cmyth add-on.


- tsp42 - 2012-02-24

Sure. It should be synced know. Sorry for the lack of updates but to much work to do.


- flitter2009 - 2012-02-24

Thanks tsp! Did this go both ways? Is the libcmyth addon now in the opdenkamp branch? (I'm in xvba land)


- sysadm1n - 2012-02-24

flitter2009 Wrote:...(I'm in xvba land)

Using the latest fglrx driver from ATI/AMD you don't need to do anything special for xvba. Here's a snippet from my xorg log:
Code:
[    97.818] (II) Module amdxmm: vendor="X.Org Foundation"
[    97.818]    compiled for 1.4.99.906, module version = 2.0.0
[    97.818] (II) Loading extension AMDXVOPL
[    97.818] (II) Loading extension AMDXVBA
[    97.818] [-     XMM_GLX] [I ]glesxXvInit Configureable RGBOutputColorRange
[    97.854] (II) fglrx(0): UVD feature is enabled(II) fglrx(0):



- Jimmer - 2012-02-24

Hey tsp,

Just a quick note to say that the last merge compiles fine on my Maverick box, but compile always stumbles and falls over on my ATV running Hardy at the point where it's tackling the vdr-vnsi addon. Compile output here:

http://pastebin.com/2AG3BTqQ

any thoughts about what might have changed to affect Hardy but not Maverick?

Jim

- just a ps: I use ccache and wondered if my cache may have become corrupt somehow. Anyway, I completely cleared the cache and still have the same compile errors. Nothing has changed on the box: I use it purely for this branch and never update anything (unless a dependency changes, which I don't think it has?)


Crash on start - neuroGeek - 2012-02-25

I have been running this version of XBMC for a while, periodically doing a git pull and recompiling. Yesterday I did this and XBMC no longer starts. I updated again today, and recompiled and get the same thing. I have moved my .xbmc folder so that it's trying to start fresh, with no extra plugins or settings, but I get the same error. When I run xbmc, I get this:

Code:
xbmc.bin: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Aborted (core dumped)
Crash report available at /home/jay/xbmc_crashlog-20120225_153414.log

Sometimes, I get this instead: http://paste.ubuntu.com/857004/

My crashlog is here: http://paste.ubuntu.com/857008/


- tsp42 - 2012-02-26

flitter2009: no not yet. I still want to finish the addonGUI code first and get it proper tested.

Jimmer: Maybe an older version of GCC causes it? The latest update may fix the compile error though.

neuroGeek: I saw the same error, but it disappeared after recompiling the latest version (and running apt-get upgrade). Not sure what caused it, other than it seems to be caused by the python interface.


- flitter2009 - 2012-02-26

Thanks tsp42! Your hard work is well appreciated!


- Jimmer - 2012-02-26

tsp42 Wrote:Jimmer: Maybe an older version of GCC causes it? The latest update may fix the compile error though.

Could be caused by GCC? I think you're right....

I should have just read the compiler warnings properly! At the bottom of the following files:
lib/platform/threads/mutex.h
lib/platform/threads/threads.h
lib/platform/sockets/sockets.h
xbmc/pvrclients/tvheadend/HTSPData.h

any references to "bool&" after PLATFORM::CCondition need to be changed to simply "bool"

Not sure why an older GCC would hate that, but there you go......

PS found an issue addressing this with LLVM and some other header files on opdenkamp's github. I posted these one's as well, so hopefully a fix will naturally trickle down....


Building trouble - tricky720101 - 2012-02-26

Hi all,

Having trouble building the latest version of xbmc my system is:
ubuntu 3.0.0.16-generic 32-bit.

I used the script by sysadm1n
The error is:
make[2]: Entering directory `/home/rick/src/xbmc/lib/cpluff/libcpluff'
make[2]: *** No rule to make target `../kazlib/list.c', needed by `list.lo'. Stop.
make[2]: Leaving directory `/home/rick/src/xbmc/lib/cpluff/libcpluff'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rick/src/xbmc/lib/cpluff/libcpluff'
make: *** [lib/cpluff/libcpluff/.libs/libcpluff.a] Error 2

Does anyone know why and how to fix this??

cheers

rick