From: paul Date: Wed, 12 Oct 2016 09:31:16 +0000 (+0000) Subject: switch to mplayer2 again X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=245ccbdc1b5cd5e9fe8fc5dc58e58ed8399cd225;p=serve0 switch to mplayer2 again svn path=/trunk/; revision=151 --- diff --git a/actions/playctl.sh b/actions/playctl.sh index 6944771..1fd907b 100755 --- a/actions/playctl.sh +++ b/actions/playctl.sh @@ -39,7 +39,7 @@ elif [ -n "${_POST[seek]+x}" ]; then elif [ -n "${_POST[pasink]+x}" ]; then stream="$(\ pactl list sink-inputs \ - | sed -rn '/Sink Input #/{:X;N;/application.name =/!bX;s;Sink Input #([0-9]+).+application.name = "MPlayer";\1;p}' \ + | sed -rn '/Sink Input #/{:X;N;/application.name =/!bX;s;Sink Input #([0-9]+).+application.name = "(MPlayer|mplayer2)";\1;p}' \ )" pactl move-sink-input "$stream" "${_POST[pasink]}" elif [ -n "${_POST[osd]+x}" ]; then diff --git a/actions/watch.sh b/actions/watch.sh index 913e621..7db9c64 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -77,17 +77,17 @@ case "${_COOKIE[watch]}" in export XDG_RUNTIME_DIR="/run/user/$uid" # required for Pulseaudio xrandr >/dev/null # helps enable all screens - nohup /usr/bin/mplayer -ao pulse \ - -slave -input file="$fifofile" \ - -volume "$volume" \ - "$playuri" >"$statusfile" 2>/dev/null & - - # # MPlayer2: # nohup /usr/bin/mplayer -ao pulse \ - # --slave --input=file="$fifofile" \ - # --volume="$volume" \ + # -slave -input file="$fifofile" \ + # -volume "$volume" \ # "$playuri" >"$statusfile" 2>/dev/null & + # MPlayer2: (statusline on stderr) + nohup /usr/bin/mplayer -ao pulse \ + --slave --input=file="$fifofile" \ + --volume="$volume" \ + "$playuri" 2>"$statusfile" >/dev/null & + chmod 600 "$statusfile" redirect "?p=playctl&${watch_link}"