patch-omxplayer 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --- omxplayer-0.3.orig/omxplayer 2014-01-07 09:24:29.000000000 +0100
  2. +++ omxplayer-0.3/omxplayer 2014-01-10 17:57:55.229752300 +0100
  3. @@ -1,4 +1,4 @@
  4. -#!/bin/bash
  5. +#!/bin/sh
  6. #
  7. # OMXPlayer launcher script.
  8. #
  9. @@ -13,38 +13,10 @@ else
  10. OMXPLAYER_LIBS="$OMXPLAYER_LIBS:/usr/lib/omxplayer"
  11. fi
  12. -refresh_regex='(|.* )(-r|--refresh)( .*|$)'
  13. -audio_regex='.*\.(mp3|wav|wma|cda|ogg|ogm|aac|ac3|flac)( .*|$)'
  14. -
  15. fbset_bin=`which fbset`
  16. -xset_bin=`which xset`
  17. -xrefresh_bin=`which xrefresh`
  18. -
  19. -if [ -z $NOREFRESH ] || [ "$NOREFRESH" == "0" ]; then
  20. - if [[ $@ =~ $refresh_regex ]] && [[ ! $@ =~ $audio_regex ]]; then
  21. - check_failed=0
  22. -
  23. - if [ -z $fbset_bin ]; then
  24. - echo "WARNING: You are going to run omxplayer with -r/--refresh and you don't have fbset installed, this can cause black screen when it finishes playing."
  25. - check_failed=1
  26. - fi
  27. -
  28. - if [ ! -z $DISPLAY ]; then
  29. - if [ -z $xset_bin ] || [ -z $xrefresh_bin ]; then
  30. - echo "WARNING: You are going to run omxplayer with -r/--refresh and you don't have xset and xrefresh installed (x11-xserver-utils package on Debian/Raspbian), this can cause black screen when it finishes playing."
  31. - check_failed=1
  32. - fi
  33. - fi
  34. -
  35. - if [ "$check_failed" == "1" ]; then
  36. - read -sn 1 -p "Press any key to continue or Ctrl-C to quit."
  37. - echo
  38. - fi
  39. - fi
  40. -fi
  41. -OMXPLAYER_DBUS_ADDR=`mktemp -t omxplayer-XXXXX`
  42. -OMXPLAYER_DBUS_PID=`mktemp -t omxplayer-XXXXX`
  43. +OMXPLAYER_DBUS_ADDR=`mktemp`
  44. +OMXPLAYER_DBUS_PID=`mktemp`
  45. exec 5> $OMXPLAYER_DBUS_ADDR
  46. exec 6> $OMXPLAYER_DBUS_PID
  47. @@ -66,16 +38,7 @@ fi
  48. rm -f $OMXPLAYER_DBUS_ADDR
  49. rm -f $OMXPLAYER_DBUS_PID
  50. -if [ ! -z $NOREFRESH ] && [ "$NOREFRESH" == "1" ]; then
  51. - exit 0
  52. -fi
  53. -
  54. -if [[ $@ =~ $audio_regex ]]; then
  55. - exit 0
  56. -fi
  57. -
  58. -if [[ $@ =~ $refresh_regex ]]; then
  59. - if [ ! -z $fbset_bin ]; then
  60. +if [ ! -z $fbset_bin ]; then
  61. DEPTH2=`$fbset_bin | head -3 | tail -1 | cut -d " " -f 10`
  62. if [ "$DEPTH2" == "8" ]; then
  63. @@ -89,16 +52,5 @@ if [[ $@ =~ $refresh_regex ]]; then
  64. $fbset_bin -depth $DEPTH1 > /dev/null 2>&1
  65. $fbset_bin -depth $DEPTH2 > /dev/null 2>&1
  66. - fi
  67. -
  68. - if [ ! -z $xset_bin ] && [ ! -z $xrefresh_bin ]; then
  69. - if [ -z $DISPLAY ]; then
  70. - DISPLAY=":0"
  71. - fi
  72. -
  73. - $xset_bin -display $DISPLAY -q > /dev/null 2>&1
  74. - if [ "$?" == "0" ]; then
  75. - $xrefresh_bin -display $DISPLAY > /dev/null 2>&1
  76. - fi
  77. - fi
  78. fi
  79. +