[tovid] r3538 committed - Disable 'glass' framestyle for some players...

1 view
Skip to first unread message

to...@googlecode.com

unread,
Mar 17, 2015, 4:19:30 PM3/17/15
to tovi...@googlegroups.com
Revision: 3538
Author: grepper
Date: Tue Mar 17 20:19:18 2015 UTC
Log: Disable 'glass' framestyle for some players

* disable glass for some mplayer2 and mpv
* Add -without-transcode

https://code.google.com/p/tovid/source/detail?r=3538

Modified:
/trunk/tovid/src/todisc

=======================================
--- /trunk/tovid/src/todisc Wed Feb 18 01:07:04 2015 UTC
+++ /trunk/tovid/src/todisc Tue Mar 17 20:19:18 2015 UTC
@@ -700,8 +700,8 @@
}

# check if file is a video. Usage: is_video FILE
-is_video()
-{
+is_video()
+{
local result=$($FFmpeg -i "$1" 2>&1);
# ffmpeg calls an image a video stream, so eliminate that
grep -E -qi 'image2|_pipe' <<< "$result" && return 1;
@@ -2589,6 +2589,9 @@
ENCODE_ONLY=:
NOMENU=:
;;
+ "-without-transcode" )
+ use_transcode=false
+ ;;
"-out" )
shift
OUT_DIRECTORY="$1"
@@ -4197,7 +4200,7 @@
yecho "The following files differ from the $ASPECT_RATIO aspect
ratio
we are using, even if they are to be re-encoded by makempg here."
echo
- printf "\"%s\"\n" ${warn_files[@]}
+ printf "\"%s\"\n" "${warn_files[@]}"
echo
yecho "You can not mix different aspect ratios in the same menu.
They need to be put in a separate titleset. You may want to quit
@@ -4407,8 +4410,8 @@
QUICKMENU_IS_BACKGROUND=:
fi
fi
-if $QUICK_MENU && ! $QUICKMENU_IS_SHOWCASE && ! $QUICKMENU_IS_BACKGROUND;
then
- if ! $SWITCHED; then
+if $QUICK_MENU && ! $QUICKMENU_IS_SHOWCASE && !
${QUICKMENU_IS_BACKGROUND}; then
+ if ! ${SWITCHED}; then
yecho
if { $DO_TITLESETS || $TITLESET_MODE ; }; then
yech=yecho
@@ -4451,13 +4454,30 @@
yecho
SC_FRAMESTYLE="none"
fi
-if [[ $SC_FRAMESTYLE = "glass" ]] && $QUICK_MENU; then
- yecho
- yecho "You can not use 'glass' frame style with -quick-menu, \
- disabling this option"
- yecho
- SC_FRAMESTYLE="none"
-fi
+if [[ $SC_FRAMESTYLE = "glass" ]]; then
+ if $QUICK_MENU; then
+ yecho
+ yecho "You can not use 'glass' frame style with -quick-menu, \
+ disabling this option"
+ yecho
+ SC_FRAMESTYLE="none"
+ elif [[ $TOVID_MPLAYER == "mplayer" ]]; then
+ if grep -qi mplayer2 <<< "$(mplayer -h)"; then
+ player=mplayer2
+ fi
+ elif [[ $TOVID_MPLAYER == "mpv" ]];then
+ player="mpv"
+ fi
+ if [[ $player ]]; then
+ url="www.mplayerhq.hu"
+
+ info_message "You need 'mplayer' ($url) to use
-framestyle-glass \
+ It is not supported for ${player}.
+ Disabling this option"
+ $WARN && continue_in 10
+ SC_FRAMESTYLE="none"
+ fi
+fi
# allow user to only specify one audio file for all submenus
if [ ${#SM_AUDIO[@]} -eq 1 ]; then
if ((sshows>1)); then
Reply all
Reply to author
Forward
0 new messages