[cvs-annodex] commit (/annodex): scripts/trunk/m2anx

conrad nobody at lists.annodex.net
Thu Sep 9 14:26:55 EST 2004


Update of /annodex (new revision 556)

Modified files:
   scripts/trunk/m2anx

Log Message:
add option to use specified CMML file


Modified: scripts/trunk/m2anx
===================================================================
--- scripts/trunk/m2anx	2004-09-09 04:17:57 UTC (rev 555)
+++ scripts/trunk/m2anx	2004-09-09 04:26:54 UTC (rev 556)
@@ -37,6 +37,8 @@
 VERBOSE=""
 DRYRUN=""
 
+CMMLIN=""
+
 video_codec="theora"
 audio_codec="vorbis"
 skip_anx=""
@@ -74,6 +76,7 @@
   echo >&2 "  -x, --xy                    Scale video width"
   echo >&2
   echo >&2 "Annodex options"
+  echo >&2 "  -C, --cmml filename         Use given CMML input file"
   echo >&2 "  -S, --skip-annodexing       Skip annodexing step, output to Ogg"
   echo >&2
   echo >&2 "Miscellaneous options"
@@ -187,11 +190,11 @@
 ############################################################
 
 GETOPTEST=`getopt --version`
-SHORTOPTS="no:hvA:r:c:V:dx:S"
+SHORTOPTS="no:hvA:r:c:V:dx:C:S"
 
 case $GETOPTEST in
 getopt*) # GNU getopt
-  TEMP=`getopt -l dry-run -l output:: -l verbose -l version -l help -l audio-codec:: -l resample:: -l channels:: -l video-codec:: -l decimate -l xy:: -l skip-annodexing -- +$SHORTOPTS $@`
+  TEMP=`getopt -l dry-run -l output:: -l verbose -l version -l help -l audio-codec:: -l resample:: -l channels:: -l video-codec:: -l decimate -l xy:: -l cmml:: -l skip-annodexing -- +$SHORTOPTS $@`
   ;;
 *) # POSIX getopt ?
   TEMP=`getopt $SHORTOPTS $@`
@@ -246,6 +249,10 @@
     -S|--skip-annodexing)
       skip_anx="yes"
       ;;
+    -C|--cmml)
+      shift
+      CMMLIN=$1
+      ;;
   esac
   shift
 done
@@ -269,8 +276,11 @@
 BASE=`basename $1|sed -e "s/\\.[^.]*$//"`
 INPUT=$PWD/$1
 OUTDIR=`dirname $1|sed -e "s#\(^[^/]\)#$PWD\/\1#"`
-CMMLIN=`dirname $1`/$BASE.cmml
 
+if test "x$CMMLIN" = "x" ; then
+  CMMLIN=`dirname $1`/$BASE.cmml
+fi
+
 WORKDIR="${TMPDIR-/tmp}/$BASE.$$"
 AUDIO="$WORKDIR/audiodump.wav"
 VIDEO="$WORKDIR/stream.yuv"


-- 
conrad



More information about the cvs-annodex mailing list