Mailinglist Archive: opensuse-factory (475 mails)

< Previous Next >
[opensuse-factory] A small suggestion regarding RealPlayer.
  • From: Nathan Moschkin <ironywrit@xxxxxxxxxxx>
  • Date: Thu, 14 Aug 2008 21:37:50 -0400
  • Message-id: <48A4DDEE.5080106@xxxxxxxxxxx>
For those of us who have both KDE and Gnome systems installed, or perhaps even for anyone ... getting RealPlayer to work with audio required that I go tromping through the internet to eventually stumble upon a script that starts RealPlayer under artsdsp (for a couple of reasons, one being that RealPlayer, by default, is launching from a script, now...)

Here's the script I found, online. Apparently it's been a problem since version 9...

This starts real player using the artsdsp ... it definitely works, and I'm using Gnome as my desktop environment.



---


#!/bin/sh

# If you don't have readlink, fill in the path to hxplay.bin here.
HELIX_LIBS="/usr/lib/RealPlayer10" ; export HELIX_LIBS

# To install this script, create a symlink to it from somewhere in your
# path. Do *not* move the script out of the HelixPlayer directory, since
# it relies on the true location of hxplay to derive the location of the
# HelixPlayer directory

# REALPLAYSYMLINK and REALPLAYSCRIPT are only used to derive REALPLAYDIR

if [ ! -d "$HELIX_LIBS" ]; then
REALPLAYSCRIPT=""
if [ -h "$0" ]; then
REALPLAYSYMLINK=`which $0`

# Search for something we can use as readlink
READLINK=`which readlink` 2> /dev/null;
PERL=`which perl` 2> /dev/null;
PYTHON=`which python` 2> /dev/null;
if [ -x "$READLINK" ] ; then
# echo "Using readlink"
REALPLAYSCRIPT=`$READLINK $REALPLAYSYMLINK`
elif [ -x "$PERL" ] ; then
# echo "Using perl"
REALPLAYSCRIPT=`$PERL -e 'print readlink($ARGV[0])' -- $REALPLAYSYMLINK` elif [ -x "$PYTHON" ] ; then
# echo "Using python"
REALPLAYSCRIPT=`echo 'import os; print os.readlink("/usr/local/bin/hxplay")' | $PYTHON -`
else
# echo "Using ls (directory name cannot contain spaces)"
REALPLAYSCRIPT=`ls -l $REALPLAYSYMLINK | sed -e 's/.* //'`
fi
else
REALPLAYSCRIPT=`which $0`
fi

if [ ! -x "$REALPLAYSCRIPT" ] ; then
echo "Cannot find the HelixPlayer directory."
echo "Please set the path in the hxplay script."
exit
fi

# if REALPLAYDIR detection doesn't work, hardcode the directory here
REALPLAYDIR=`dirname $REALPLAYSCRIPT`

# setup environment
# find our common, plugin and codec dlls
HELIX_LIBS=$REALPLAYDIR
export HELIX_LIBS
fi

# See if LD_PRELOAD contains any of the sound server libs. If so, remove them.
LD_PRELOAD=`echo $LD_PRELOAD | sed -e 's/\([^:]*libesd[^:]*\|[^:]*libarts[^:]*\):\?//g'`
export LD_PRELOAD

if [ -n "$LD_PRELOAD" ]; then
echo "Warning: LD_PRELOAD=\"$LD_PRELOAD\""
fi
# execute binary (and pass args), optionally running via catchsegv
REALPLAYBIN=$HELIX_LIBS/realplay.bin
if [ -n "$DEBUG" -a -x "$CATCHSEGV" ]; then
$CATCHSEGV artsdsp $REALPLAYBIN ${1+"$@"}
else
while /bin/true; do
# Restart the player if exit code is 10
artsdsp $REALPLAYBIN "$@"
if [ $? -ne 10 ]; then
break
fi
done
fi

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages