226,7 → 226,7 |
declare EXTENDED_FACTOR=0 |
# Verbosity level so far from the command line can only be muted (see -q) |
# it can be overridden, though |
declare -i VERBOSITY=$V_INFO |
declare -i VERBOSITY=$V_ALL |
# Set to 1 to disable colours in console output |
declare -i SIMPLE_FEEDBACK=0 |
# See coherence_check for more details |
1716,15 → 1716,6 |
echo "$1$SUFFIX_FBACK" |
fi >&2 |
} |
# |
# Print a debugging message |
# notice($1 = text) |
notice() { |
if [[ $VERBOSITY -gt $V_INFO ]]; then |
[[ $SIMPLE_FEEDBACK -eq 0 ]] && echo -n "$PREFIX_DBG" |
echo "$1$SUFFIX_FBACK" |
fi >&2 |
} |
|
# |
# Same as inf but with no colour ever. |
1766,7 → 1757,7 |
return 0 |
fi |
fi |
notice "[TRACE]: $func ${*}" |
echo "${PREFIX_DBG}[TRACE]: $func ${*}${SUFFIX_FBACK}" >&2 |
} |
|
# |
2568,14 → 2559,11 |
capture_impl() { |
trace $@ |
local f=$1 stamp=$2 ofile=$3 |
RESULT='' |
|
# Avoid recapturing if timestamp is already captured. |
# The extended set includes the standard set so when using the extended mode |
#+this will avoid some captures, specially with mplayer, since it doesn't |
#+have ms precission |
# FIXME: This often won't work with ffmpeg since there might be a slight |
# difference in ms. |
local key= |
# Normalise key values' decimals |
if [[ $CAPTURER_HAS_MS -eq 0 ]]; then |
2585,9 → 2573,10 |
fi |
local cached=$(grep "^$key:" <<<"$CAPTURES") |
if [[ $cached ]]; then |
notice "Skipped capture at $(pretty_stamp $key)" |
cp "${cached#*:}" "$ofile" # TODO: Is 'cp -s' safe? |
else |
return $? |
fi |
|
local capfn=${CAPTURER}_capture |
if [[ $DVD_MODE -eq 1 ]]; then |
capfn=${CAPTURER}_dvd_capture |
2596,7 → 2585,6 |
$capfn "$f" "$stamp" "$ofile" || { |
return $EX_SOFTWARE |
} |
fi |
|
RESULT="$key:$ofile" |
} |
5137,7 → 5125,6 |
exit |
fi |
DEBUG=1 |
VERBOSITY=$V_ALL |
inf "Testing internal consistency..." |
tmp=$INTERNAL_NO_TRACE |
INTERNAL_NO_TRACE=1 # Avoid any tracing during the test |