[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Merging totem and totem-xine



Bill Nottingham <notting <at> redhat.com> writes:
<snip>
> Toshio Kuratomi (a.badger <at> gmail.com) said: 
> > Pick one as the default (Probably totem-gstreamer since the rest of our 
> > infrastructure is based around gstreamer.)  The other one can either be 
> > invoked by using totem-xine or a shell script can be used to select which 
> > one to run (based on what's installed, an environment variable, and the 
> > default.)
> 
> Surely you just want to have the engines selected by a user pref?

I'd go for a shell script (probably the same one symlinked). Something like:

#!/bin/sh

if [ -f ~/.local/etc/sysconfig/totem ] ; then
      . ~/.local/etc/sysconfig/totem
else if [ -f /etc/sysconfig/totem ] ; then
      . /etc/sysconfig/totem
fi

# Default to GStreamer if there's no config
if [ -z $TOTEM_BACKEND ] ; then
      TOTEM_BACKEND=gstreamer
fi
# Default to GStreamer if the backend is invalid
if [ $TOTEM_BACKEND != "xine" -a $TOTEM_BACKEND != "gstreamer" ] ; then
      TOTEM_BACKEND=gstreamer
fi

BIN=$0
shift

exec $BIN-$TOTEM_BACKEND $*

Obviously, not tested, but this would allow to switch between backends. This
would also need some checking whether or not the backend is there.

I'm not interested in users being able to select one backend for each of the 4
binaries, it would just create more confusion.

Cheers


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]