head	1.4;
access;
symbols
	file-4_20:1.4
	rpm-4_4_8-release:1.4
	rpm-4_4_7-release:1.4
	rpm-4_4_6-release:1.4
	rpm-4_4_5-release:1.4
	rpm-4_4_4-release:1.4
	rpm-4_4_3-release:1.4
	file-4_16:1.4
	jbj_before_tklcpatches:1.4
	rpm-4_4_2-release:1.4
	file-4_14:1.4
	pjones-sparse-experiment:1.4.0.4
	rpm-4_4_1-release:1.4
	file-4_12:1.4
	rpm-4_4-release:1.4
	rpm-4_4:1.4.0.2
	file-4_10:1.4
	file-4_09:1.3
	rpm-file-before:1.2
	rpm42-file-before:1.2
	rpm43-file-before:1.2
	rpm-4_3_1-start:1.2
	rpm-4_3:1.2.0.4
	rpm-4_2:1.2.0.2;
locks; strict;
comment	@# @;


1.4
date	2004.08.03.20.31.49;	author jbj;	state Exp;
branches;
next	1.3;

1.3
date	2004.08.03.20.16.18;	author jbj;	state Exp;
branches;
next	1.2;

1.2
date	2003.04.15.20.04.26;	author jbj;	state Exp;
branches
	1.2.2.1
	1.2.4.1;
next	1.1;

1.1
date	2003.04.15.16.58.36;	author jbj;	state Exp;
branches;
next	;

1.2.2.1
date	2003.12.01.21.20.02;	author jbj;	state Exp;
branches;
next	;

1.2.4.1
date	2004.12.07.00.57.38;	author jbj;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Upgrade to file-4.10.
@
text
@
#------------------------------------------------------------------------------
# vorbis:  file(1) magic for Ogg/Vorbis files
#
# From Felix von Leitner <leitner@@fefe.de>
# Extended by Beni Cherniavsky <cben@@crosswinds.net>
# Further extended by Greg Wooledge <greg@@wooledge.org>
#
# Most (everything but the number of channels and bitrate) is commented
# out with `##' as it's not interesting to the average user.  The most
# probable things advanced users would want to uncomment are probably
# the number of comments and the encoder version.
#
# --- Ogg Framing ---
0		string		OggS		Ogg data
>4		byte		!0		UNKNOWN REVISION %u
##>4		byte		0		revision 0
>4		byte		0
##>>14		lelong		x		(Serial %lX)
# non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
>>28		string		fLaC		\b, FLAC audio
# non-Vorbis content: Theora
>>28		string		\x80theora	\b, Theora video
# non-Vorbis content: Speex
>>28		string		Speex\ \ \ 	\b, Speex audio
# non-Vorbis content: OGM
>>28		string		\x01video\0\0\0	\b, OGM video
>>>37		string/c	div3		(DivX 3)
>>>37		string/c	divx		(DivX 4)
>>>37		string/c	dx50		(DivX 5)
>>>37		string/c	xvid		(XviD)
# --- First vorbis packet - general header ---
>>28		string		\x01vorbis	\b, Vorbis audio,
>>>35		lelong		!0		UNKNOWN VERSION %lu,
##>>>35		lelong		0		version 0,
>>>35		lelong		0
>>>>39		ubyte		1		mono,
>>>>39		ubyte		2		stereo,
>>>>39		ubyte		>2		%u channels,
>>>>40		lelong		x		%lu Hz
# Minimal, nominal and maximal bitrates specified when encoding
>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	\b,
# The above tests if at least one of these is specified:
>>>>>52		lelong		!-1
# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
# instead of -1.
# Vorbis 1.0 uses 0 instead of -1.
>>>>>>52	lelong		!0
>>>>>>>52	lelong		!-1000
>>>>>>>>52	lelong		x		<%lu
>>>>>48		lelong		!-1
>>>>>>48	lelong		x		~%lu
>>>>>44		lelong		!-1
>>>>>>44	lelong		!-1000
>>>>>>>44	lelong		!0
>>>>>>>>44	lelong		x		>%lu
>>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	bps
# -- Second vorbis header packet - the comments
# A kludge to read the vendor string.  It's a counted string, not a
# zero-terminated one, so file(1) can't read it in a generic way.
# libVorbis is the only one existing currently, so I detect specifically
# it.  The interesting value is the cvs date (8 digits decimal).
# Post-RC1 Ogg files have the second header packet (and thus the version)
# in a different place, so we must use an indirect offset.
>>>(84.b+85)		string		\x03vorbis
>>>>(84.b+96)		string/c	Xiphophorus\ libVorbis\ I	\b, created by: Xiphophorus libVorbis I
>>>>>(84.b+120)		string		>00000000	
# Map to beta version numbers:
>>>>>>(84.b+120)	string		<20000508	(<beta1, prepublic)
>>>>>>(84.b+120)	string		20000508	(1.0 beta 1 or beta 2)
>>>>>>(84.b+120)	string		>20000508
>>>>>>>(84.b+120)	string		<20001031	(beta2-3)
>>>>>>(84.b+120)	string		20001031	(1.0 beta 3)
>>>>>>(84.b+120)	string		>20001031
>>>>>>>(84.b+120)	string		<20010225	(beta3-4)
>>>>>>(84.b+120)	string		20010225	(1.0 beta 4)
>>>>>>(84.b+120)	string		>20010225
>>>>>>>(84.b+120)	string		<20010615	(beta4-RC1)
>>>>>>(84.b+120)	string		20010615	(1.0 RC1)
>>>>>>(84.b+120)	string		20010813	(1.0 RC2)
>>>>>>(84.b+120)	string		20010816	(RC2 - Garf tuned v1)
>>>>>>(84.b+120)	string		20011014	(RC2 - Garf tuned v2)
>>>>>>(84.b+120)	string		20011217	(1.0 RC3)
>>>>>>(84.b+120)	string		20011231	(1.0 RC3)
# Some pre-1.0 CVS snapshots still had "Xiphphorus"...
>>>>>>(84.b+120)	string		>20011231	(pre-1.0 CVS)
# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
>>>>(84.b+96)		string/c	Xiph.Org\ libVorbis\ I	\b, created by: Xiph.Org libVorbis I
>>>>>(84.b+117)		string		>00000000	
>>>>>>(84.b+117)	string		<20020717	(pre-1.0 CVS)
>>>>>>(84.b+117)	string		20020717	(1.0)
>>>>>>(84.b+117)	string		20030909	(1.0.1)
>>>>>>(84.b+117)	string		20040629	(1.1.0 RC1)
@


1.3
log
@Upgrade to file-4.09.
@
text
@d20 1
a20 2
# non-Vorbis content: FLAC (Free Loss-lessy Audio Codec,
# http://flac.sourceforge.net)
d22 10
d69 2
a70 2
>>>>>>(84.b+120)	string		<20000508	(<beta1 - prepublic)
>>>>>>(84.b+120)	string		20000508	(beta1/2)
d73 1
a73 1
>>>>>>(84.b+120)	string		20001031	(beta3)
d76 1
a76 1
>>>>>>(84.b+120)	string		20010225	(beta4)
d79 2
a80 2
>>>>>>(84.b+120)	string		20010615	(RC1)
>>>>>>(84.b+120)	string		20010813	(RC2)
d83 2
a84 2
>>>>>>(84.b+120)	string		20011217	(pre-RC3 CVS)
>>>>>>(84.b+120)	string		20011231	(RC3)
d92 2
a93 1
>>>>>>(84.b+117)	string		>20020717	(post-1.0 CVS)
@


1.2
log
@Merge file-4.02 changes.
@
text
@d20 3
d35 1
a35 1
>>>>>44		lelong		!-1
d39 6
a47 6
>>>>>48		lelong		!-1
>>>>>>48	lelong		x		~%lu
>>>>>52		lelong		!-1
>>>>>>52	lelong		!0
>>>>>>>52	lelong		!-1000
>>>>>>>>52	lelong		x		<%lu
d58 1
a58 1
>>>>>(84.b+120)		string		>00000000	%.8s
d80 1
a80 1
>>>>>(84.b+117)		string		>00000000	%.8s
d83 1
@


1.2.4.1
log
@- port to internal file-4.10 libmagic rather than libfmagic.
@
text
@a19 12
# non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
>>28		string		fLaC		\b, FLAC audio
# non-Vorbis content: Theora
>>28		string		\x80theora	\b, Theora video
# non-Vorbis content: Speex
>>28		string		Speex\ \ \ 	\b, Speex audio
# non-Vorbis content: OGM
>>28		string		\x01video\0\0\0	\b, OGM video
>>>37		string/c	div3		(DivX 3)
>>>37		string/c	divx		(DivX 4)
>>>37		string/c	dx50		(DivX 5)
>>>37		string/c	xvid		(XviD)
d32 1
a32 1
>>>>>52		lelong		!-1
d36 6
a44 6
>>>>>48		lelong		!-1
>>>>>>48	lelong		x		~%lu
>>>>>44		lelong		!-1
>>>>>>44	lelong		!-1000
>>>>>>>44	lelong		!0
>>>>>>>>44	lelong		x		>%lu
d55 1
a55 1
>>>>>(84.b+120)		string		>00000000	
d57 2
a58 2
>>>>>>(84.b+120)	string		<20000508	(<beta1, prepublic)
>>>>>>(84.b+120)	string		20000508	(1.0 beta 1 or beta 2)
d61 1
a61 1
>>>>>>(84.b+120)	string		20001031	(1.0 beta 3)
d64 1
a64 1
>>>>>>(84.b+120)	string		20010225	(1.0 beta 4)
d67 2
a68 2
>>>>>>(84.b+120)	string		20010615	(1.0 RC1)
>>>>>>(84.b+120)	string		20010813	(1.0 RC2)
d71 2
a72 2
>>>>>>(84.b+120)	string		20011217	(1.0 RC3)
>>>>>>(84.b+120)	string		20011231	(1.0 RC3)
d77 1
a77 1
>>>>>(84.b+117)		string		>00000000	
a79 2
>>>>>>(84.b+117)	string		20030909	(1.0.1)
>>>>>>(84.b+117)	string		20040629	(1.1.0 RC1)
@


1.2.2.1
log
@Merge from top-of-stack.
@
text
@@


1.1
log
@Move magic creation to sub-directory.
@
text
@d35 1
d37 2
a38 1
>>>>>>>44	lelong		x		>%lu
d42 4
a45 3
>>>>>>52	lelong		!-1000
>>>>>>>52	lelong		x		<%lu
>>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	kbps
d73 7
a79 7
# The string has not changed from beta1 to 2 - they are indistinguishable.
# Then come the comments, again length-counted (and number-counted).
# Some looping constructs and registers would allow reading them but now
# it's impossible.  However we can print the number of comments present
# (skipping by the vendor string length):
##>>>>(109.l.113)	lelong		0		\b, no comments
##>>>>(109.l+113)	lelong		>0		\b, %lu comments
@

