annotate TOOLS/midentify.sh @ 35490:a5f5f61a7a35

Replace confusing guiInfoMediumClear() by MediumPrepare(). (It has been completely rewritten.) Now call MediumPrepare() only once for all play events. Check for current StreamType and clear stuff not being used for this stream type (and only stuff that need to be cleared).
author ib
date Mon, 03 Dec 2012 16:26:39 +0000
parents 877e37095c2d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27198
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
1 #!/bin/sh
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
2 #
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
3 # This is a wrapper around the -identify functionality.
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
4 # It is supposed to escape the output properly, so it can be easily
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
5 # used in shellscripts by 'eval'ing the output of this script.
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
6 #
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
7 # Written by Tobias Diedrich <ranma+mplayer@tdiedrich.de>
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
8 # Licensed under GNU GPL.
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
9
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
10 if [ -z "$1" ]; then
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
11 echo "Usage: midentify.sh <file> [<file> ...]"
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
12 exit 1
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
13 fi
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
14
34598
877e37095c2d Optimize midentify script to not wasted time filling the cache.
reimar
parents: 27198
diff changeset
15 mplayer -noconfig all -cache-min 0 -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
27198
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
16 sed -ne '/^ID_/ {
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
17 s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p
305dc504c407 Give all shell scripts a .sh suffix for consistency.
diego
parents:
diff changeset
18 }'