#! /bin/sh
#
# MPEG information extraction plugin for the GTKtalog project
#
# (C) 2001 Panagiotis Issaris <panagiotis.issaris@advalvas.be>
#

# Variable set with configure script
PLUGIN_MPEGINFO_PROG=mpgtx

# what plugin to use?
if test "x$PLUGIN_MPEGINFO_PROG" = "xmpgtx";
then
    mpgtx -i $1 2> /dev/null
else
    if test "x$PLUGIN_MPEGINFO_PROG" = "xplaympeg";
    then
        plaympeg --noaudio --novideo "$1" |awk '/Video/ {res=$2} /Audio/ {freq=$6; ch=$7} END{print res " " freq " " ch}' -
    else
        echo "plugin not defined"
    fi    
fi
