From d68b7d3472ef5b0ee15810451cc1dd1e7b749d17 Mon Sep 17 00:00:00 2001 From: conrad Date: Wed, 30 Mar 2005 14:02:42 +0000 Subject: [PATCH] oggzdiff: make use of 'oggdump -c content-type' option: + hijack DIFFOPTS -c, which is equivalent to -C 3, and used only for context diffs (unified diffs use -u) ... unfortunate, but diffing particular logical bitstreams is far more elite than that ever was ;-) git-svn-id: http://svn.annodex.net/liboggz/trunk@1193 8158c8cd-e7e1-0310-9fa4-c5954c97daef --- doc/oggzdiff.1 | 29 +++++++++++++++++------------ doc/oggzdiff.1.sgml | 18 +++++++++++++++--- src/tools/oggzdiff.in | 14 ++++++++------ 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/doc/oggzdiff.1 b/doc/oggzdiff.1 index 0df00f6..36544b1 100644 --- a/doc/oggzdiff.1 +++ b/doc/oggzdiff.1 @@ -1,9 +1,9 @@ -...\" $Header: /var/lib/cvsd/annodex/liboggz/doc/oggzdiff.1,v 1.1 2004/01/04 05:28:25 zen Exp $ -...\" -...\" transcript compatibility for postscript use. -...\" -...\" synopsis: .P! -...\" +.\" $Header: /aolnet/dev/src/CVS/sgml/docbook-to-man/cmd/docbook-to-man.sh,v 1.1.1.1 1998/11/13 21:31:59 db3l Exp $ +.\" +.\" transcript compatibility for postscript use. +.\" +.\" synopsis: .P! +.\" .de P! .fl \!!1 setgray @@ -15,7 +15,7 @@ \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog -.sy sed -e 's/^/!/' \\$1\" bring in postscript file +.sy sed \-e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF @@ -61,9 +61,9 @@ oggzdiff \(em Hexdump the packets of two Ogg files and output differences .PP \fB\fBoptions:\fR\fR [--verbose ] [-v | --version ] [-h | --help ] .PP -\fB\fBOGGZDUMP_OPTIONS:\fR\fR [-b | --binary ] [-x | --hexadecimal ] [-s serialno | --serialno serialno ] [-O | --hide-offset ] [-S | --hide-serialno ] [-G | --hide-granulepos ] [-P | --hide-packetno ] +\fB\fBOGGZDUMP_OPTIONS:\fR\fR [-b | --binary ] [-x | --hexadecimal ] [-c content-type | --content-type content-type ] [-s serialno | --serialno serialno ] [-O | --hide-offset ] [-S | --hide-serialno ] [-G | --hide-granulepos ] [-P | --hide-packetno ] .PP -\fB\fBDIFF_OPTIONS:\fR\fR [-q | --brief ] [-c | -C NUM | --context[=NUM] ] [-u | -U NUM | --unified[=NUM] ] [-e | --ed ] [--normal ] [--rcs ] [-y | --side-by-side ] [-l | --paginate ] +\fB\fBDIFF_OPTIONS:\fR\fR [-q | --brief ] [-C NUM | --context[=NUM] ] [-u | -U NUM | --unified[=NUM] ] [-e | --ed ] [--normal ] [--rcs ] [-y | --side-by-side ] [-l | --paginate ] .SH "Description" .PP \fBoggzdiff\fR is a \fBsh\fR script which @@ -87,6 +87,11 @@ Generate a binary dump of each packet Generate a hexadecimal dump of each packet .SS "oggzdump filtering options" +.IP "-c \fBcontent-type\fR, --content-type \fBcontent-type\fR" 10 +Dump only the logical bitstreams for a specific +\fBcontent-type\fR. The following codec names +are currently detected: "theora", "vorbis", "speex", "cmml" + .IP "-s \fBserialno\fR, --serialno \fBserialno\fR" 10 Dump only the logical bitstream with specified \fBserialno\fR. @@ -116,8 +121,8 @@ The -w (--ignore-all-space) option to \fBdiff\fR is always implied. .IP "-q, --brief" 10 Output only whether files differ. -.IP "-c, -C \fBNUM\fR, --context[=\fBNUM\fR]" 10 -Output NUM (default 3) lines of copied context. +.IP "-C \fBNUM\fR, --context[=\fBNUM\fR]" 10 +Output NUM lines of copied context. .IP "-u, -U \fBNUM\fR, --unified[=\fBNUM\fR]" 10 Output NUM (default 3) lines of unified context. @@ -157,4 +162,4 @@ Copyright \(co 2003 CSIRO Australia \fBoggzdump\fP\fB(1)\fP, \fBdiff\fP\fB(1)\fP, \fBpatch\fP\fB(1)\fP -...\" created by instant / docbook-to-man, Wed 19 Nov 2003, 12:25 +.\" created by instant / docbook-to-man, Thu 31 Mar 2005, 00:07 diff --git a/doc/oggzdiff.1.sgml b/doc/oggzdiff.1.sgml index de3cd79..c81f5af 100644 --- a/doc/oggzdiff.1.sgml +++ b/doc/oggzdiff.1.sgml @@ -90,6 +90,11 @@ manpage.1: manpage.sgml -x--hexadecimal + + -c content-type + --content-type content-type + + -s serialno --serialno serialno @@ -117,7 +122,6 @@ manpage.1: manpage.sgml - -c -C NUM --context[=NUM] @@ -191,6 +195,14 @@ manpage.1: manpage.sgml oggzdump filtering options + + -c content-type, --content-type content-type + Dump only the logical bitstreams for a specific + content-type. The following codec names + are currently detected: "theora", "vorbis", "speex", "cmml" + + + -s serialno, --serialno serialno Dump only the logical bitstream with specified @@ -246,8 +258,8 @@ manpage.1: manpage.sgml - -c, -C NUM, --context[=NUM] - Output NUM (default 3) lines of copied context. + -C NUM, --context[=NUM] + Output NUM lines of copied context. diff --git a/src/tools/oggzdiff.in b/src/tools/oggzdiff.in index e44fdf4..9763e87 100644 --- a/src/tools/oggzdiff.in +++ b/src/tools/oggzdiff.in @@ -47,8 +47,9 @@ usage () { echo >&2 "OGGZDUMP_OPTIONS: [-b | --binary] [-x | --hexadecimal]" echo >&2 " [-O | --hide-offset] [-S | --hide-serialno] [-G | --hide-granulepos]" echo >&2 " [-P | --hide-packetno] [-s serialno | --serialno serialno]" + echo >&2 " [-c content-type | --content-type content-type]" echo >&2 - echo >&2 "DIFF_OPTIONS: [-q | --brief] [-c | -C NUM | --context[=NUM]]" + echo >&2 "DIFF_OPTIONS: [-q | --brief] [-C NUM | --context[=NUM]]" echo >&2 " [-u | -U NUM | --unified[=NUM]] [-e | -ed] [--normal] [--rcs]" echo >&2 " [-y | --side-by-side] [-l | --paginate]" echo >&2 @@ -58,10 +59,10 @@ usage () { GETOPTEST=`getopt --version` case $GETOPTEST in getopt*) # GNU getopt - TEMP=`getopt -l verbose -l version -l brief -l context:: -l unified:: -l ed -l normal -l rcs -l side-by-side -l paginate -l binary -l hexadecimal -l serialno: -l hide-offset -l hide-serialno -l hide-granulepos -l hide-packetno -l help -- +qcC:uU:eylbxs:OSGPhv "$@"` + TEMP=`getopt -l verbose -l version -l brief -l context:: -l unified:: -l ed -l normal -l rcs -l side-by-side -l paginate -l binary -l hexadecimal -l serialno: -l content-type: -l hide-offset -l hide-serialno -l hide-granulepos -l hide-packetno -l help -- +qC:uU:eylbxs:c:OSGPhv "$@"` ;; *) # POSIX getopt ? - TEMP=`getopt qcC:uU:eylbxs:OSGPhv "$@"` + TEMP=`getopt qC:uU:eylbxs:c:OSGPhv "$@"` ;; esac @@ -80,9 +81,6 @@ while test "X$1" != "X--"; do -q|--brief) DIFFOPTS=$DIFFOPTS" -q" ;; - -c) - DIFFOPTS=$DIFFOPTS" -c" - ;; -C) shift DIFFOPTS=$DIFFOPTS" -C $1" @@ -135,6 +133,10 @@ while test "X$1" != "X--"; do shift DUMPOPTS=$DUMPOPTS" -s $1" ;; + -c) + shift + DUMPOPTS=$DUMPOPTS" -c $1" + ;; -O|--hide-offset) DUMPOPTS=$DUMPOPTS" -O" ;; -- GitLab