r3769 - in vdr/vdr-plugin-mp3/trunk/debian: . DVD-VCD

Tobias Grimm tiber-guest at alioth.debian.org
Wed Jan 3 19:43:10 CET 2007


Author: tiber-guest
Date: 2007-01-03 19:43:09 +0100 (Wed, 03 Jan 2007)
New Revision: 3769

Added:
   vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/
   vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/DVD
   vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/VCD
   vdr/vdr-plugin-mp3/trunk/debian/mplayer.sh
   vdr/vdr-plugin-mp3/trunk/debian/mplayersources.conf
   vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.dirs
   vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.docs
   vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.examples
   vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.install
   vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.links
   vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.postinst
   vdr/vdr-plugin-mp3/trunk/debian/vdrmplayer.sh.conf
Modified:
   vdr/vdr-plugin-mp3/trunk/debian/changelog
   vdr/vdr-plugin-mp3/trunk/debian/control
   vdr/vdr-plugin-mp3/trunk/debian/copyright
   vdr/vdr-plugin-mp3/trunk/debian/rules
Log:
* Now also compiling vdr-plugin-mplayer as mplayer has officially become
  available in Debian

Added: vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/DVD
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/DVD	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/DVD	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1 @@
+dummy file for playing a DVD with mplayer.sh

Added: vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/VCD
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/VCD	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/DVD-VCD/VCD	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1 @@
+dummy file for playing a VCD with mplayer.sh

Modified: vdr/vdr-plugin-mp3/trunk/debian/changelog
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/changelog	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/changelog	2007-01-03 18:43:09 UTC (rev 3769)
@@ -1,11 +1,17 @@
 vdr-plugin-mp3 (0.9.15-6) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
+
+  [ Thomas Günther ]
   * Replaced VDRdevel adaptions in debian/rules with make-special-vdr,
     Build-Depend on vdr-dev (>= 1.4.4-2)
 
- -- Thomas Günther <tom at toms-cafe.de>  Sun, 17 Dec 2006 16:25:08 +0100
+  [ Tobias Grimm ]
+  * Now also compiling vdr-plugin-mplayer as mplayer has officially become
+    available in Debian
 
+ -- Tobias Grimm <tg at e-tobi.net>  Wed,  3 Jan 2007 19:41:37 +0100
+
 vdr-plugin-mp3 (0.9.15-5) unstable; urgency=low
 
   * Fixed encoding of Thomas Günther's name in debian/copyright

Modified: vdr/vdr-plugin-mp3/trunk/debian/control
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/control	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/control	2007-01-03 18:43:09 UTC (rev 3769)
@@ -14,3 +14,11 @@
  This plugin for VDR allows to play back mp3's, ogg-files and 
  audio-cds.
 XB-VDR-Patchlevel: ${vdr:Patchlevel}
+
+Package: vdr-plugin-mplayer
+Architecture: any
+Depends: ${shlibs:Depends}, ${vdr:Depends}, eject (>=2.0.3-1), mplayer
+Description: MPlayer playback plugin for VDR
+ This plugin for VDR allows to play back any video format supported
+ by MPLayer.
+XB-VDR-Patchlevel: ${vdr:Patchlevel}

Modified: vdr/vdr-plugin-mp3/trunk/debian/copyright
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/copyright	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/copyright	2007-01-03 18:43:09 UTC (rev 3769)
@@ -5,6 +5,10 @@
 
 Upstream Author: Stefan Hülswitt <huels at iname.com>
 
+The mplayer.sh script from Juri Haberland was downloaded from: 
+
+  http://batleth.sapienti-sat.org/projects/VDR/
+
 Debian Maintainers:
 
   Tobias Grimm <tg at e-tobi.net>

Added: vdr/vdr-plugin-mp3/trunk/debian/mplayer.sh
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/mplayer.sh	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/mplayer.sh	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1,611 @@
+#!/bin/bash
+#
+# $Id: mplayer.sh,v 1.41.2.2 2004/11/06 20:58:47 juri Exp $
+#
+
+unset LANG
+declare VERSION="0.8.6"
+
+# History (as always in the source code :-)
+# 0.8.6b (by Mysterix mandaxy at gmx.de)
+#       http://vdrportal.de/board/thread.php?postid=411671#post411671
+#       - add check by use mode Traditonell instead of slave for correct handling AID
+#       
+# 0.8.6a (by Mysterix mandaxy at gmx.de)
+#       - add handling AID to parse different Audiolines in mplayer  
+#       - add handling of Playlistfiles (*m3u/*.pls) for parsing playlists to mplayer
+#       - IMPORTANT NOTE:
+#         These changes are needed by new vdr-mp3-plugin version (0-9-14)
+#         and only an workaround! I'm a Noob in this kind of Coding and hope
+#         Juri Haberland (Original Author of this Script) or any other professional one
+#         will write a correct and comfortable Solution. :)
+#
+# 0.8.6 - fixed a copy'n'paste bug regarding the subtitle background 
+#	  alpha color (thanks to Christian Haider)
+#	- changed the fps values from rational values to integer ones
+#	- fixed a typo setting DETC (thanks to Soeren Sonnenburg)
+#	- disabled the use of -forceidx for RealVideos, because since
+#	  mplayer-1.0pre5 it isn't necessary anymore
+#
+# 0.8.5 - changed the check for the existence of the video file to check also
+#	  that it can actually be read
+#	- added a new PAL height: 544
+#	- [experimental] use detelicining (detc) filter to play NTSC as PAL;
+#	  thanks to Martin Hoffmann for this one
+#	- [experimental] make the detelecinig filter configurable via conf-file
+#	- changed the warning messages about wrong DVD options to be displayed
+#	  only when DEBUG is set to true
+#	- added a comment to mplayer.sh.conf that the DVD dummy files MUST be
+#	  named DVD/VCD in capital letters
+#	- removed '-afm 9' from AO defaults, because audio filters by numbers are
+#	  removed from MPlayer (9 meant hwac, it is handeled differently anyway)
+#	- changed the the use of the -speed parameter: the man pages says one
+#	  should use a value between 0.01 and 100, not something like 25:24
+#
+# 0.8.4 - added some more debugging info
+#	- changed the MPlayer option that is used to play DVDs and VCDs from
+#	  -vcd/-dvd to VCD:// and DVD://
+#	- added cuefile support for MPlayer version 1.0x
+#	- added new config option to distinguish MPlayer versions (0.9x or 1.0)
+#	  important for playing cuefiles
+#	- fixed bug in detecting empty CACHE option
+#	- fixed a bug where USE_SPEED is ignored and '-speed' always used
+#	- added a check for the return value of 'mplayer -identify'
+#	- added support for AC3 sound when playing a DVD
+#	- make audio output configurable via config file (e.g. for DXR3)
+#
+# 0.8.3 - changed the default value of USERDEF from '-really-quiet' to '-quiet',
+#	  because it suppressed the progressbar messages from mplayer
+#	- added '-dvd 1' to the DVD call to reliably play a DVD
+#	  (though only the first one)
+#
+# 0.8.2 - changed the way mplayer is called to identify files;
+#	  should prevent the opening of a X window, that happens
+#	  on some systems
+#	- play mpeg files without any scaling if possible
+#	- added config line for AC3 out via DVB card (thanks to Christian Jacobsen)
+#	- added a new config option to choose the video out device;
+#	  intended for dx3 users
+#	- added config options for subtitles (thanks to Martin Åkerström)
+#	- fixed a bug when SLOW_CPU is set to "false" instead of being
+#	  just commented out
+#	- minor code clean-up
+#	- cleanup some comments and messages
+#
+# 0.8.1 - fixed a bug when DVDFiles or DVD not set correctly
+#	- if path to mplayer is incorrect, log an error and exit
+#	- cue file support; you can now choose a cue file as input;
+#	  after I did this on user request, I asked myself, for what
+#	  do one needs this, as mplayer can play .bin files directly...
+#	- support for 16/9 TV sets (thanks to Vaclav Janecek)
+#
+# 0.8.0 - bumped the version number to be more flexible
+#       - added VCD/DVD support
+#
+# 0.0.7 - clear LANG variable
+#       - added support for slow computers: reduces the Y
+#         resolution to the half of the possible maximum
+#       - use kind of a window for detecting the frames_per_sec
+#
+# 0.0.6a-jha
+#	- fixed a bug that prevented the SLAVE mode from working
+#
+# 0.0.6-jha
+#	- major rework
+#	- added config option to disable either NTSC or PAL support
+#	- added mplayer's '-speed' option; is disabled by default (see
+#	  config file), because it didn't work as expected for me
+#	- rudimentary sub titles support:
+#	  if a sub titles file (.sub suffix) with exactly the
+#	  same name as the played video file exists, it is used
+#	  (not really useful yet)
+#	- changed the was the config file is parsed:
+#	  let's do it the simple way, just source the file
+# =================================================
+# --->  IMPORTANT! you MUST use the new config file
+# =================================================
+#
+# 0.0.5d-jha
+#       - added AC3 support (thanks to Christian Jacobsen
+#         <christian.jacobsen -at- stageholding.de>)
+#       - better support for mplayers SLAVE mode
+#       - fixed some scaling problems
+#       - some minor clean-ups
+#
+# 0.0.5c-jha
+#       - play videos with 24 or 23.976 fps as NTSC, not PAL
+#
+# 0.0.5b-jha
+#       - Improved getvidxy - thanks to new mplayer option '-identify'
+#         it gets now the correct values for X-/Y-resolution
+#         and the framerate (if defined in the video file)
+#         for all media files
+#       - reworked the scaling calculation to scale only if needed
+#         and if so, scale as little as possible to save CPU power
+#       - distinguish between NTSC and PAL files; play them with
+#         the right TV norm
+#
+# 0.0.4	Improved getvidxy - No Temp Files needed anymore!
+#
+# 0.0.3	Seems to work fine - still lacks support for X x 432 Files
+#	What about MPEG Files ? 
+#
+
+
+function initialize () {
+  # source config file
+  source "$CFGFIL"
+
+  # Debug Mode ?
+  if test -z "$DEBUG" -o "$DEBUG" != "true"; then DEBUG=false; fi
+
+  # use AC3?
+  if test -z "$USEAC3" -o "$USEAC3" != "true"; then USEAC3=false; fi
+  debugvar USEAC3 "$USEAC3"
+
+  # AC3 command line
+  if test -z "$AC3AOUT"; then
+    errorcfg AC3AOUT
+    exit
+  else
+    debugvar AC3AOUT "$AC3AOUT"
+  fi
+
+  # TV aspect ratio
+  if test -z "$TV_ASPECT"; then errorcfg TV_ASPECT; fi
+  debugvar TV_ASPECT "$TV_ASPECT"
+
+  # can do PAL?
+  if test -z "$PAL" -o "$PAL" != "true"; then PAL=false; fi
+  debugvar PAL "$PAL"
+
+  # can do NTSC?
+  if test -z "$NTSC" -o "$NTSC" != "true"; then NTSC=false; fi
+  debugvar NTSC "$NTSC"
+
+  if test $NTSC == "false" -a $PAL == "false"; then
+    echolog "*** FATAL: Config Options NTSC and PAL both set to false ... Exiting."
+    exit
+  fi
+
+  # use speed setting?
+  SPEED=""
+  if test -z "$USE_SPEED"; then USE_SPEED=false; fi
+  debugvar USE_SPEED "$USE_SPEED"
+
+  # which detelecining filter should be used, if configured
+  # to play NTSC as PAL
+  if test -z "$DETC_FILTER"; then DETC_FILTER="detc=dr=2:am=1"; fi
+  debugvar DETC_FILTER "$DETC_FILTER"
+
+  # where is Mplayer
+  if ! test -x "$MPLAYER" -a -f "$MPLAYER"; then
+    echolog "*** Option MPLAYER not found in config file or not set correctly"
+    exit
+  else
+    debugvar MPLAYER "$MPLAYER"
+  fi
+
+  if test -z "$VOP"; then errorcfg VOP; exit; else debugvar VOP "$VOP"; fi
+
+  if test -z "$VO"; then errorcfg VO; exit; else debugvar VO "$VO"; fi
+
+  if test -z "$AO"; then errorcfg AO; exit; else debugvar AO "$AO"; fi
+  AOUT="-ao $AO"
+
+  if test -z $CACHE; then
+    echolog "*** Option CACHE not set in config file - calling mplayer without Cache!"
+    CACHESTR="-nocache"
+  else
+    CACHESTR="-cache $CACHE"; debugvar CACHE "$CACHE"; debugvar CACHESTR "$CACHESTR"
+  fi
+
+  if test -z "$FRAMEDROP" -o "$FRAMEDROP" != "true"; then FRAMEDROP=false; fi
+  debugvar FRAMEDROP "$FRAMEDROP"
+  if $FRAMEDROP; then FDSTR="-framedrop"; fi 
+  debugvar FDSTR "$FDSTR"
+
+  declare LIRCSTR="" # no extra Lirc option!
+  if ! test -z "$LIRCRC"; then LIRCSTR="-lircconf $LIRCRC"; fi
+  debugvar LIRCRC "$LIRCRC"; debugvar LIRCSTR "$LIRCSTR"
+
+  if ! test -z "$SUBPOS"; then SUBTITLES=" -subpos $SUBPOS"; fi
+  if ! test -z "$SUBCOLOR"; then SUBTITLES="$SUBTITLES -sub-bg-color $SUBCOLOR"; fi
+  if ! test -z "$SUBALPHA"; then SUBTITLES="$SUBTITLES -sub-bg-alpha $SUBALPHA"; fi
+
+  debugvar SUBTITLE "$SUBTITLES"
+
+  if test "$SLAVE" != "SLAVE"; then
+    REMOTE="$LIRCSTR"
+  else
+    REMOTE="-slave -nolirc"
+  fi
+  debugvar REMOTE "$REMOTE"
+
+  if ! test -z "$USERDEF"; then echolog "*** Use Option USERDEF at your own risk!"; fi
+  debugvar USERDEF "$USERDEF"
+
+  if test -z $XResPAL; then errorcfg XResPAL; exit; else debugvar XResPAL "${XResPAL[*]}"; fi
+  if test -z $XResNTSC; then errorcfg XResNTSC; exit; else debugvar XResNTSC "${XResNTSC[*]}"; fi
+
+  # do we run on a slow computer?
+  if test -z "$SLOW_CPU" -o "$SLOW_CPU" == "false"; then
+    SLOW_CPU=false
+  else
+    XResPAL=(352)
+    XResNTSC=(352)
+    debugvar XResPAL "${XResPAL[*]}"
+    debugvar XResNTSC "${XResNTSC[*]}"
+  fi
+  debugvar SLOW_CPU "$SLOW_CPU"
+
+  if ! test -d "$DVDFiles"; then debugmsg "*** Option DVDFiles not set correctly! You will not be able to play VCD/DVD" ""; DVDFiles=""; fi
+  debugvar DVDFiles "$DVDFiles"
+  if ! test -b "$DVD"; then debugmsg "*** Option DVD not set correctly! You will not be able to play VCD/DVD" ""; DVD=""; fi
+  debugvar DVD "$DVD"
+  if test -z $DVDLANG; then DVDLANG="en"; fi
+  debugvar DVDLANG "$DVDLANG"
+
+  # extra DVD options
+  debugvar DVDOPTIONS "$DVDOPTIONS"
+
+  # extra VCD options
+  debugvar VCDOPTIONS "$VCDOPTIONS"
+
+  # play MPEG files without rescaling?
+  if test -z "$MPEG_DIRECT" -o "$MPEG_DIRECT" != "false"; then MPEG_DIRECT="true"; fi
+  debugvar MPEG_DIRECT "$MPEG_DIRECT"
+
+  # get the file extension of the video
+  SUFFIX=$(echo -e "${FILE:$[${#FILE}-4]:4}" | tr [A-Z] [a-z])
+  debugvar SUFFIX $SUFFIX
+
+  if test -z "$MPLAYER_V1"; then
+      echolog "*** MPLAYER_V1 not set! Setting it to 'false'."
+      echolog "*** If you cannot play cue-files, then set it to 'true'."
+      MPLAYER_V1="false"
+  fi
+  debugvar MPLAYER_V1 "$MPLAYER_V1"
+
+  return;
+}
+
+
+function getvidxy () {
+
+  # call: getvidxy
+  # determine x and y resolution of the file! 
+  # output: variable ORIG_X and ORIG_Y (global)
+
+  # variable definitions
+  local TEMP1 MPLAYER_RETURN
+  ORIG_X=0; ORIG_Y=0
+
+  TEMP1=`$MPLAYER -identify -vo null -ao null -frames 0 "$FILE" 2>/dev/null | grep -i -e "^ID_"`
+  MPLAYER_RETURN=$?
+  debugmsg "OutputFromMPLAYER:" "$TEMP1"
+  debugmsg "MPLAYER_RETURN: " "$MPLAYER_RETURN"
+
+  if test $MPLAYER_RETURN -ne 0; then
+     echolog "*** FATAL: something went wrong analyzing the video; mplayer reported an error!" 
+     echolog "*** FATAL: check your mplayer installation. Exiting..." 
+     exit
+  fi
+
+  ORIG_X=`echo "$TEMP1"|grep ID_VIDEO_WIDTH|cut -d"=" -f2`
+  debugmsg "parsed output for ORIG_X:" $ORIG_X
+
+  ORIG_Y=`echo "$TEMP1"|grep ID_VIDEO_HEIGHT|cut -d"=" -f2`
+  debugmsg "parsed output for ORIG_Y:" $ORIG_Y
+
+  ORIG_FPS=`echo "$TEMP1"|grep ID_VIDEO_FPS|cut -d"=" -f2`
+  debugmsg "parsed output for ORIG_FPS:" $ORIG_FPS
+
+  ORIG_ASPECT=`echo "$TEMP1"|grep ID_VIDEO_ASPECT|cut -d"=" -f2`
+  debugmsg "parsed output for ORIG_ASPECT:" $ORIG_ASPECT
+
+  VIDEO_FORMAT=`echo "$TEMP1"|grep ID_VIDEO_FORMAT|cut -d"=" -f2`
+  debugmsg "parsed output for VIDEO_FORMAT:" $VIDEO_FORMAT
+
+  AUDIO_CODEC=`echo "$TEMP1"|grep ID_AUDIO_CODEC|cut -d"=" -f2`
+  debugmsg "parsed output for AUDIO_CODEC:" $AUDIO_CODEC
+
+  return;
+}
+
+
+function calcnewxy () {
+  local -i MAX_X TEMP_ASPECT
+#  TEMP_ASPECT=`echo $ORIG_ASPECT|sed 's/\.//'`
+#  if test $TEMP_ASPECT -eq 0; then TEMP_ASPECT=$((4000/3)); fi
+
+  if test $ORIG_X -gt 352 -o $ORIG_Y -gt $HALF_Y; then
+    MAX_X=$(($FULL_Y*$TV_ASPECT))
+  else
+    MAX_X=$(($HALF_Y*$TV_ASPECT))
+  fi
+  debugvar MAX_X $MAX_X
+
+  NEW_Y=$(($MAX_X*$ORIG_Y/$ORIG_X)); debugvar NEW_Y $NEW_Y
+  echolog "*** INFO: For Sqare Pixels we would scale to $MAX_X x $NEW_Y ..."
+  test $NEW_Y -gt $FULL_Y && NEW_Y=$FULL_Y 	# force full screen/ ignore aspect ratio!
+
+  return;
+}
+
+
+function choosebestx () {
+  local -i MAX_X INDEX
+  local XResTEMP
+  declare repeat=true
+  INDEX=0
+
+  if $SLOW_CPU; then
+    XResTEMP=(352)
+  else
+    if test $HALF_Y -eq 240; then
+      XResTEMP=(${XResNTSC[*]})
+    else
+      if test $HALF_Y -eq 288; then
+        XResTEMP=(${XResPAL[*]})
+      else
+	echolog "*** FATAL: HALF_Y not set or unknown: \"$HALF_Y\" ... Exiting."
+	exit
+      fi
+    fi
+  fi
+  debugvar XResTEMP "${XResTEMP[*]}"
+
+  ANZAHL=${#XResTEMP[*]}
+  debugvar AnzahlVonXResTEMP $ANZAHL
+
+  until ! $repeat; do
+    if test ${XResTEMP[$INDEX]} -ge $ORIG_X; then repeat=false; NEW_X=${XResTEMP[$INDEX]}; fi
+    INDEX=$(($INDEX+1))
+    if test $INDEX -ge $ANZAHL; then repeat=false; NEW_X=${XResTEMP[$ANZAHL-1]}; fi
+  done
+  debugvar NEW_X $NEW_X
+
+  return;
+}
+
+
+function choosebesty () {
+  if test \( $ORIG_Y -eq $HALF_Y -a $ORIG_X -eq 352 \) -o \( $ORIG_Y -eq $FULL_Y -a ! $SLOW_CPU \); then
+    REAL_Y=$ORIG_Y
+    NEW_Y=$ORIG_Y
+    NEW_X=$ORIG_X
+    debugmsg "setting NEW = ORIG"
+  else
+    if test $ORIG_X -gt 352 -o $ORIG_Y -gt $HALF_Y; then
+      REAL_Y=$FULL_Y
+      debugmsg "setting REAL_Y = FULL_Y"
+    else
+      REAL_Y=$HALF_Y
+      debugmsg "setting REAL_Y = HALF_Y"
+    fi
+  fi
+  return;
+}
+
+
+function set_ntsc () {
+  HALF_Y=240
+  if $SLOW_CPU; then
+    FULL_Y=$HALF_Y
+  else
+    FULL_Y=480
+  fi
+  NEW_FPS="30"
+  return;
+}
+
+
+function set_pal () {
+  HALF_Y=288
+  if $SLOW_CPU; then
+    FULL_Y=$HALF_Y
+  else
+    FULL_Y=576
+  fi
+  NEW_FPS="25"
+  return;
+}
+
+
+function checkforac3 () {
+  if test "X$AUDIO_CODEC" == "Xa52" && $USEAC3; then AOUT="$AC3AOUT"; fi
+  return; 
+}
+
+
+function checktvnorm () {
+local -i TEMP_FPS
+TEMP_FPS=`echo $ORIG_FPS|sed 's/\.//'`
+  if test $TEMP_FPS -ge "23000" -a $TEMP_FPS -le "24499"; then
+    debugmsg "Film"
+    if $NTSC; then
+      set_ntsc
+    else
+      set_pal
+      $USE_SPEED && SPEED="-speed 1.04" # 25/24 = 1.04
+    fi
+  else
+    if test \( $TEMP_FPS -ge "14000" -a $TEMP_FPS -le "16000" \) -o \( $TEMP_FPS -ge "29000" -a $TEMP_FPS -le "30499" \); then
+      debugmsg "NTSC"
+      if $NTSC; then
+        set_ntsc
+      else
+        set_pal
+        if $USE_SPEED; then
+	  SPEED="-speed 1.04" # 25/24 = 1.04
+	  DETC=",$DETC_FILTER"
+	fi
+      fi
+    else
+      debugmsg "PAL or unknown" $ORIG_FPS
+      if $PAL; then
+        set_pal
+      else
+        set_ntsc
+	$USE_SPEED && SPEED="-speed 1.19" # 29.97/25 = 1.19
+      fi
+    fi
+  fi
+  return;
+}
+
+
+function echolog () {
+  # prints the string on stdout and into /var/log/messages using logger!
+  logger -s -- "$1"
+  return;
+}
+
+
+function errorcfg () {
+  echolog "*** FATAL: Config Option $1 not found in config file ... Exiting."
+  exit;
+}
+
+
+function debugvar () {
+  if $DEBUG; then echolog "*** DEBUG: Variable $1 has value \"$2\""; fi
+  return;
+}
+
+
+function debugmsg () {
+  if $DEBUG; then echolog "*** DEBUG: $1 \"$2\""; fi
+  return;
+}
+
+
+# begin main!
+#
+#
+# ---------------------------------------------------------------------------
+#
+#
+
+declare -i ORIG_X ORIG_Y
+declare -i NEW_X NEW_Y
+declare -i HALF_Y FULL_Y
+declare ORIG_FPS NEW_FPS ORIG_ASPECT VIDEO_FORMAT AUDIO_CODEC
+declare CMDLINE AOUT REMOTE USERDEF SUFFIX
+declare FILE="$1"
+declare -a XResPAL[0]
+declare -a XResNTSC[0]
+declare FDSTR=""
+declare SUBTITLES=""
+declare DETC=""
+
+
+while shift; do
+  if [ "$1" = "SLAVE" ]; then
+    SLAVE="SLAVE"
+  elif [ "$1" = "AID" ]; then
+      AID="AID"
+      AIDLEVEL="$2"
+    shift
+  fi
+done
+		  
+		  
+echolog "*** Starting mplayer.sh Version $VERSION"
+
+# Check if file a Playlist and set neccassary parameter
+case "$FILE" in
+  *.pls | *.m3u)
+    PLS="true"
+    PLSFILE="$FILE"
+    first=`grep -v -m1 "^#" $FILE`
+    FILE="$first"
+  ;;
+  *)
+    FILE="$FILE"
+  ;;
+esac
+
+
+if test -z "$FILE"; then echolog "*** USAGE: mplayer.sh <File_to_be_played>"; exit; fi
+if ! test -r "$FILE"; then echolog "*** ERROR: Make sure $FILE exists and is readable - otherwise it cannot be played ;-)"; exit; fi
+
+# Check if config file exists!
+declare CFGFIL="/etc/vdr/plugins/vdrmplayer.sh.conf"
+debugvar CFGFIL $CFGFIL
+if ! test -f $CFGFIL; then echolog "*** FATAL: $CFGFIL not found!!! Exiting." ; exit; fi
+
+# read config file and initialize the variables
+initialize
+
+
+if test \( "$FILE" == "$DVDFiles/DVD" -o "$FILE" == "$DVDFiles/VCD" \) -a -n "$DVDFiles" -a -n "$DVD"; then
+    if test "$FILE" == "$DVDFiles/DVD"; then
+    	$USEAC3 && AOUT="$AC3AOUT"
+        CMDLINE="$MPLAYER -vo $VO $AOUT -alang $DVDLANG $DVDOPTIONS $FDSTR $CACHESTR $REMOTE $USERDEF -dvd-device $DVD dvd://"
+    fi
+    if test "$FILE" == "$DVDFiles/VCD"; then
+        CMDLINE="$MPLAYER -vo $VO $AOUT $VCDOPTIONS $FDSTR $CACHESTR $REMOTE $USERDEF -cdrom-device $DVD vcd://"
+    fi
+    unset FILE
+elif test "${SUFFIX}" == ".cue"; then
+    if $MPLAYER_V1; then      
+        CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF cue://$FILE:2"
+	unset FILE
+    else
+        CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF -vcd 2 -cuefile"
+    fi
+else
+    # Try to determine the video attributes
+    if $DEBUG; then echolog "*** DEBUG: Calling getvidxy function to analyze source video stream ..."; fi
+    getvidxy
+    echolog "*** INFO: Source Video has Resolution of $ORIG_X x $ORIG_Y ..."
+    if test $ORIG_X -eq 0 -o $ORIG_Y -eq 0; then echolog "*** FATAL: something went wrong analyzing the video; check your mplayer version ..."; exit; fi
+
+    NEW_FPS=$ORIG_FPS
+
+#    if `echo "$VIDEO_FORMAT"| egrep -q "RV??"`; then
+#      FORCEIDX="-forceidx"
+#    else
+#      FORCEIDX=""
+#    fi
+
+    checkforac3
+    checktvnorm
+    calcnewxy
+    choosebestx
+    choosebesty
+    if test $NEW_X -eq 0 -o $NEW_Y -eq 0; then echolog "*** FATAL: Illegal Resolution ..."; exit; fi
+
+    if test $MPEG_DIRECT == "true" -a \( $VIDEO_FORMAT == "0x10000001" -o $VIDEO_FORMAT == "0x10000002" \) -a \( \
+             \( $PAL  -a $NEW_FPS == "25" -a \( \( $ORIG_X == "352" -a $ORIG_Y == "288" \) -o \( $ORIG_Y == "576" -a \
+             \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "528" -o $ORIG_X == "544" -o $ORIG_X == "688" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) -o \
+             \( $NTSC -a $NEW_FPS == "30" -a \( \( $ORIG_X == "352" -a $ORIG_Y == "240" \) -o \( $ORIG_Y == "480" -a \
+             \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "512" -o $ORIG_X == "640" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) \
+       \) ; then
+      CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF"
+    else
+      CMDLINE="$MPLAYER -vo $VO $AOUT -vop $VOP:$NEW_FPS,expand=$NEW_X:$REAL_Y:-1:-1:1,scale=$NEW_X:${NEW_Y}${DETC} $SPEED $FDSTR $CACHESTR $REMOTE $SUBTITLES $USERDEF $FORCEIDX"
+    fi
+fi
+
+
+# Check and Set AID for mplayer to use different Audiolines
+if test "$AID" == "AID";then
+ OPTAID=" -aid $AIDLEVEL" 
+ CMDLINE="$CMDLINE $OPTAID"
+fi
+
+# Check for Playlist and add neccessary commandlines 
+if test "$PLS" == "true";then
+ OPTPLS=" -playlist "
+ FILE="$PLSFILE" 
+ CMDLINE="$CMDLINE $OPTPLS"
+fi
+
+#echolog "$CMDLINE"
+
+debugvar CMDLINE "$CMDLINE"
+exec $CMDLINE "$FILE"
+exit

Added: vdr/vdr-plugin-mp3/trunk/debian/mplayersources.conf
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/mplayersources.conf	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/mplayersources.conf	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1,3 @@
+/tmp;tmp;0
+/dvd;DVD;1
+/var/lib/vdr-plugin-mplayer/DVD-VCD;DVD oder VCD;0

Modified: vdr/vdr-plugin-mp3/trunk/debian/rules
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/rules	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/rules	2007-01-03 18:43:09 UTC (rev 3769)
@@ -24,7 +24,7 @@
 endif
 
 MAKE_OPTIONS = VDRDIR=/usr/include/vdr LIBDIR=. \
-               WITH_OSS_OUTPUT=1 WITHOUT_MPLAYER=1
+               WITH_OSS_OUTPUT=1
 
 configure: configure-stamp
 configure-stamp: patch-stamp
@@ -62,6 +62,12 @@
 	cp $(CURDIR)/examples/mp3sources.conf.example \
 	  $(CURDIR)/debian/vdr-plugin-mp3/etc/vdr/plugins/mp3sources.conf
 
+	install -m 755 $(CURDIR)/debian/mount.sh \
+	  $(CURDIR)/debian/vdr-plugin-mplayer/usr/share/vdr-plugin-mplayer/mount
+
+	install -m 755 $(CURDIR)/debian/mplayer.sh \
+	  $(CURDIR)/debian/vdr-plugin-mplayer/usr/share/vdr-plugin-mplayer/mplayer
+
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.

Added: vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.dirs
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.dirs	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.dirs	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1 @@
+usr/share/vdr-plugin-mplayer/

Added: vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.docs
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.docs	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.docs	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1,3 @@
+README
+MANUAL
+debian/README.Debian

Added: vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.examples
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.examples	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.examples	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1 @@
+debian/mplayersources.conf

Added: vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.install
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.install	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.install	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1,6 @@
+libvdr-mplayer.so.*             usr/lib/vdr/plugins/
+
+debian/vdrmplayer.sh.conf       etc/vdr/plugins/
+debian/mplayersources.conf      etc/vdr/plugins/
+
+debian/DVD-VCD                  var/lib/vdr-plugin-mplayer/

Added: vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.links
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.links	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.links	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1 @@
+etc/vdr/plugins/mplayersources.conf    var/lib/vdr/plugins/mplayersources.conf

Added: vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.postinst
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.postinst	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdr-plugin-mplayer.postinst	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1,48 @@
+#! /bin/sh
+# postinst script for vdr-plugin-mplayer
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+# source debconf lib
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure)
+        # ensure that the cache dir is correctly owned
+        if [ -d /var/lib/vdr-plugin-mplayer ] ; then
+            chown -R vdr:vdr /var/lib/vdr-plugin-mplayer || true
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0

Added: vdr/vdr-plugin-mp3/trunk/debian/vdrmplayer.sh.conf
===================================================================
--- vdr/vdr-plugin-mp3/trunk/debian/vdrmplayer.sh.conf	2006-12-28 15:53:22 UTC (rev 3768)
+++ vdr/vdr-plugin-mp3/trunk/debian/vdrmplayer.sh.conf	2007-01-03 18:43:09 UTC (rev 3769)
@@ -0,0 +1,132 @@
+# Config File for mplayer.sh ...
+#
+# $Id: mplayer.sh.conf,v 1.24 2004/03/08 13:08:26 juri Exp $
+#
+# ***
+# *** Mandatory Values 
+# *** 
+#
+# Where to find mplayer executable ?
+MPLAYER="/usr/bin/mplayer"
+
+# Video Out Filter lavc or fame - see mplayer DVB docs for details !
+#VOP="lavc=9000"
+VOP="lavc=5000"
+
+# Video out device
+# most users will want the default of 'mpegpes', but users with a dxr3
+# need to use 'dxr3'
+#VO="dxr3"
+VO="mpegpes"
+
+# Audio output device and possible additional options
+# most users will want the default of 'mpegpes', but users with a dxr3
+# need to use 'oss:/dev/em8300_ma-0'
+#AO="oss:/dev/em8300_ma-0"
+AO="mpegpes"
+
+# X-Resolutions for the DVBs card (smallest value first!)
+#
+XResPAL=(352	480	528	544	688	704	720)
+XResNTSC=(352	480	512	640	704	720)
+
+# Set the following to 'true' or 'false' according to
+# the capabilities of your TV set.
+#
+# In case of NTSC="false", see also DETC_FILTER below
+#
+# At least _one_ has to be true!
+# If your TV can do both, I strongly recommend to keep both set to "true"!
+PAL="true"
+NTSC="true"
+
+# Use mplayer's -speed option for videos with a different
+# frames/s value than the selected TV norm
+#
+# this setting is only used if either PAL or NTSC
+# is set to false!
+USE_SPEED="true"
+
+# set to true if you want to use AC3 output
+USEAC3="false"
+
+# how to play AC3 audio?
+# for AC3 via sound card (ALSA driver):
+#AC3AOUT="-ao alsa9 -ac hwac3"
+# for AC3 via DVB (doesn't need AC3overDVB patch);
+# needs MPlayer 0.90 final, or newer:
+AC3AOUT="-ao mpegpes -ac hwac3"
+
+# what aspect ratio has your TV set?
+# either 4/3 (conventional) or 16/9 (widescreen)
+#TV_ASPECT="16/9"
+TV_ASPECT="4/3"
+
+# ***
+# *** Optional Setting *** Simply Remove them if they do not fit your needs...
+# ***
+
+# What detelecinig filter should we use to play NTSC material as PAL?
+# This is only used if you have set NTSC to false and PAL to true.
+# If you use MPlayer versions 1.0 or higher I recommend to use the
+# following setting "ivtc=1", but this is not supported by MPlayer 0.9x
+#DETC_FILTER="ivtc=1"
+DETC_FILTER="detc=dr=2:am=1"
+
+# What version of MPlayer do you have?
+# if you have 0.9x then choose 'false'
+# if you have 1.0(pre) then choose 'true'
+MPLAYER_V1="true"
+
+# Cache Option for MPlayer
+CACHE="4096"
+
+# Framedrop
+FRAMEDROP="true"
+
+# Lirc RC File
+#LIRCRC="/video/.lircrc"
+
+# do we have a slow CPU?
+# if so, reduce the Y resolution to the half of the possible maximum:
+# NTSC: 240
+# PAL: 288
+# uncomment the following line if you have a slow CPU:
+#SLOW_CPU="true"
+
+# Where to find DVD/VCD dummy files? (just a fake and empty text file for the plugin)
+# Example: create two empty text files (DVD and VCD) in /video/plugins/DVD-VCD/
+# !!!The files must be named VCD and DVD (all capital letters)!!!
+DVDFiles="/var/lib/vdr-plugin-mplayer/DVD-VCD"
+
+# What is your DVD-ROM device ?
+DVD="/dev/hdc"
+
+# What languages do your DVD's use ?
+DVDLANG="de"
+
+# extra DVD options
+DVDOPTIONS="-aop list=volume:volume=170"
+
+# extra VCD options
+VCDOPTIONS=""
+
+# should MPEG files be played directly (without rescaling) if possible?
+MPEG_DIRECT="true"
+
+#Subtitle options
+SUBPOS="80"		#Vertical position 0-100
+SUBCOLOR="0"		#Background color 0=black 255=white
+SUBALPHA="30"		#Background transparency (0-255)
+
+# Userdefined Options - make sure they do not collide with options
+# used in mplayer.sh
+# Only for experienced users
+# USERDEF="-what -option you ever -like to give -to mplayer"
+# Use "-osdlevel 0" to hide the mplayer osd (not recommended for dxr3 output)
+USERDEF="-quiet -osdlevel 0"
+
+# set to true to enable debugging output
+#DEBUG="true"
+
+# End of Options 




More information about the pkg-vdr-dvb-changes mailing list