You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(47) |
Aug
(21) |
Sep
(5) |
Oct
(17) |
Nov
|
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
(6) |
Mar
(7) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
|
2004 |
Jan
(8) |
Feb
(46) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(27) |
Feb
(2) |
Mar
|
Apr
(64) |
May
|
Jun
|
Jul
(11) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
From: Gordon M. <go...@us...> - 2003-04-13 03:45:10
|
Update of /cvsroot/bitcollider/jbitprint/src/com/bitzi/util In directory sc8-pr-cvs1:/tmp/cvs-serv18284/src/com/bitzi/util Added Files: HashUrns.java Base32.java TigerTree.java Bitprint.java Log Message: refactoring/simplification under com.bitzi.util --- NEW FILE: HashUrns.java --- /* (PD) 2003 The Bitzi Corporation * Please see http://bitzi.com/publicdomain for more info. * * $Id: HashUrns.java,v 1.1 2003/04/13 03:45:05 gojomo Exp $ */ package com.bitzi.util; import java.io.FileInputStream; import java.io.IOException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * Display several hash-based URNs (sha1, tigertree, bitprint) for given file. * */ public class HashUrns { public static void main(String[] args) throws IOException, NoSuchAlgorithmException { if(args.length<1) { System.out.println("You must supply a filename."); return; } MessageDigest tt = new TigerTree(); MessageDigest sha1 = MessageDigest.getInstance("SHA"); FileInputStream fis; for(int i=0;i<args.length;i++) { fis = new FileInputStream(args[i]); int read; byte[] in = new byte[1024]; while((read = fis.read(in)) > -1) { tt.update(in,0,read); sha1.update(in,0,read); } fis.close(); byte[] ttdigest = tt.digest(); byte[] sha1digest = sha1.digest(); System.out.println("urn:sha1:"+Base32.encode(sha1digest)); System.out.println("urn:tree:tiger/:"+Base32.encode(ttdigest)); System.out.println("urn:bitprint:"+Base32.encode(sha1digest)+"."+Base32.encode(ttdigest)); } } } --- NEW FILE: Base32.java --- /* (PD) 2003 The Bitzi Corporation * Please see http://bitzi.com/publicdomain for more info. * * Base32.java * */ package com.bitzi.util; /** * Base32 - encodes and decodes 'Canonical' Base32 * (see * http://www.ietf.org/internet-drafts/draft-josefsson-base-encoding-04.txt * or http://josefsson.org/ to find a later copy, when the IETF breaks that link) * * @author Robert Kaye & Gordon Mohr */ public class Base32 { private static final String base32Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; private static final int[] base32Lookup = { 0xFF,0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, // '0', '1', '2', '3', '4', '5', '6', '7' 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, // '8', '9', ':', ';', '<', '=', '>', '?' 0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06, // '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G' 0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E, // 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' 0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, // 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W' 0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF, // 'X', 'Y', 'Z', '[', '\', ']', '^', '_' 0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06, // '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g' 0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E, // 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o' 0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, // 'p', 'q', 'r', 's', 't', 'u', 'v', 'w' 0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF // 'x', 'y', 'z', '{', '|', '}', '~', 'DEL' }; /** * * @param bytes * @return */ static public String encode(final byte[] bytes) { int i =0, index = 0, digit = 0; int currByte, nextByte; StringBuffer base32 = new StringBuffer((bytes.length+7)*8/5); while(i < bytes.length) { currByte = (bytes[i]>=0) ? bytes[i] : (bytes[i]+256); // unsign /* Is the current digit going to span a byte boundary? */ if (index > 3) { if ((i+1)<bytes.length) nextByte = (bytes[i+1]>=0) ? bytes[i+1] : (bytes[i+1]+256); else nextByte = 0; digit = currByte & (0xFF >> index); index = (index + 5) % 8; digit <<= index; digit |= nextByte >> (8 - index); i++; } else { digit = (currByte >> (8 - (index + 5))) & 0x1F; index = (index + 5) % 8; if (index == 0) i++; } base32.append(base32Chars.charAt(digit)); } return base32.toString(); } /** * @param base32 * @return */ static public byte[] decode(final String base32) { int i, index, lookup, offset, digit; byte[] bytes = new byte[base32.length()*5/8]; for(i = 0, index = 0, offset = 0; i < base32.length(); i++) { lookup = base32.charAt(i) - '0'; /* Skip chars outside the lookup table */ if ( lookup < 0 || lookup >= base32Lookup.length) continue; digit = base32Lookup[lookup]; /* If this digit is not in the table, ignore it */ if (digit == 0xFF) continue; if (index <= 3) { index = (index + 5) % 8; if (index == 0) { bytes[offset] |= digit; offset++; if(offset>=bytes.length) break; } else bytes[offset] |= digit << (8 - index); } else { index = (index + 5) % 8; bytes[offset] |= (digit >>> index); offset++; if(offset>=bytes.length) break; bytes[offset] |= digit << (8 - index); } } return bytes; } /** For testing, take a command-line argument in Base32, decode, print in hex, * encode, print */ static public void main(String[] args) { if (args.length==0) { System.out.println("Supply a Base32-encoded argument."); return; } System.out.println(" Original: "+args[0]); byte[] decoded = Base32.decode(args[0]); System.out.print (" Hex: "); for(int i = 0; i < decoded.length ; i++) { int b = decoded[i]; if (b<0) b+=256; System.out.print((Integer.toHexString(b+256)).substring(1)); } System.out.println(); System.out.println("Reencoded: "+Base32.encode(decoded)); } } --- NEW FILE: TigerTree.java --- /* (PD) 2003 The Bitzi Corporation * Please see http://bitzi.com/publicdomain for more info. * * $Id: TigerTree.java,v 1.1 2003/04/13 03:45:05 gojomo Exp $ */ package com.bitzi.util; import java.io.FileInputStream; import java.io.IOException; import java.math.BigInteger; import java.security.DigestException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.util.Enumeration; import java.util.Vector; /** * Implementation of THEX tree hash algorithm, with Tiger * as the internal algorithm (using the approach as revised * in December 2002, to add unique prefixes to leaf and node * operations) * * For simplicity, calculates one entire generation before * starting on the next. A more space-efficient approach * would use a stack, and calculate each node as soon as * its children ara available. */ public class TigerTree extends MessageDigest { private static final int BLOCKSIZE = 1024; private static final int HASHSIZE = 24; /** 1024 byte buffer */ private final byte[] buffer; /** Buffer offset */ private int bufferOffset; /** Number of bytes hashed until now. */ private long byteCount; /** Internal Tiger MD instance */ private MessageDigest tiger; /** Interim tree node hash values */ private Vector nodes; /** * Constructor */ public TigerTree() throws NoSuchAlgorithmException { super("TigerTree"); buffer = new byte[BLOCKSIZE]; bufferOffset = 0; byteCount = 0; try { java.security.Security.addProvider(new cryptix.jce.provider. CryptixCrypto()); tiger = MessageDigest.getInstance("Tiger", "CryptixCrypto"); } catch(NoSuchProviderException e) { System.out.println("Provider Cryptix not found"); System.exit(0); } nodes = new Vector(); } protected int engineGetDigestLength() { return HASHSIZE; } protected void engineUpdate(byte in) { byteCount += 1; buffer[bufferOffset++] = in; if( bufferOffset==BLOCKSIZE ) { blockUpdate(); bufferOffset = 0; } } protected void engineUpdate(byte[] in, int offset, int length) { byteCount += length; int remaining; while( length >= (remaining = BLOCKSIZE - bufferOffset) ) { System.arraycopy(in, offset, buffer, bufferOffset, remaining); bufferOffset += remaining; blockUpdate(); length -= remaining; offset += remaining; bufferOffset = 0; } System.arraycopy(in, offset, buffer, bufferOffset, length); bufferOffset += length; } protected byte[] engineDigest() { byte[] hash = new byte[HASHSIZE]; try { engineDigest(hash, 0, HASHSIZE); } catch (DigestException e) { return null; } return hash; } protected int engineDigest(byte[] buf, int offset, int len) throws DigestException { if(len<HASHSIZE) throw new DigestException(); // hash any remaining fragments blockUpdate(); // composite neighboring nodes together up to top value while (nodes.size() > 1) { Vector newNodes = new Vector(); Enumeration iter = nodes.elements(); while (iter.hasMoreElements()) { byte[] left = (byte[])iter.nextElement(); if(iter.hasMoreElements()) { byte[] right = (byte[])iter.nextElement(); tiger.reset(); tiger.update((byte)1); // node prefix tiger.update(left); tiger.update(right); newNodes.addElement((Object)tiger.digest()); } else { newNodes.addElement((Object)left); } } nodes = newNodes; } System.arraycopy(nodes.elementAt(0), 0, buf, offset, HASHSIZE); engineReset(); return HASHSIZE; } protected void engineReset() { bufferOffset = 0; byteCount = 0; nodes = new Vector(); tiger.reset(); } public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } /** * Update the internal state with a single block of size 1024 * (or less, in final block) from the internal buffer. */ protected void blockUpdate() { tiger.reset(); tiger.update((byte)0); // leaf prefix tiger.update(buffer,0,bufferOffset); if((bufferOffset==0)&(nodes.size()>0)) return; // don't remember a zero-size hash except at very beginning nodes.addElement((Object)tiger.digest()); } public static void main(String[] args) throws IOException, NoSuchAlgorithmException { if(args.length<1) { System.out.println("You must supply a filename."); return; } MessageDigest tt = new TigerTree(); FileInputStream fis; for(int i=0;i<args.length;i++) { fis = new FileInputStream(args[i]); int read; byte[] in = new byte[1024]; while((read = fis.read(in)) > -1) { tt.update(in,0,read); } fis.close(); byte[] digest = tt.digest(); String hash = new BigInteger(1,digest).toString(16); while(hash.length()<48) { hash = "0"+hash; } System.out.println("hex:"+hash); System.out.println("b32:"+Base32.encode(digest)); tt.reset(); } } } --- NEW FILE: Bitprint.java --- /* (PD) 2001 The Bitzi Corporation * Please see http://bitzi.com/publicdomain for more info. * * $Id: Bitprint.java,v 1.1 2003/04/13 03:45:05 gojomo Exp $ */ package com.bitzi.util; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.security.DigestException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Bitprint extends MessageDigest { private MessageDigest tigertree, sha; public Bitprint() throws NoSuchAlgorithmException { super("Bitprint"); sha = MessageDigest.getInstance("SHA"); tigertree = new TigerTree(); } public int engineGetDigestLength() { return sha.getDigestLength() + tigertree.getDigestLength(); } public void engineUpdate(byte in) { tigertree.update(in); sha.update(in); } public void engineUpdate(byte[] in, int offset, int length) { tigertree.update(in, offset, length); sha.update(in, offset, length); } public byte[] engineDigest() { byte[] digest; digest = new byte[engineGetDigestLength()]; try { sha.digest(digest); tigertree.digest( digest, sha.getDigestLength(), tigertree.getDigestLength()); } catch (DigestException e) { return null; } engineReset(); return digest; } public int engineDigest(byte[] buf, int offset, int len) throws DigestException { byte[] digest; int digestLen; digest = new byte[engineGetDigestLength()]; digestLen = engineGetDigestLength(); if (len < digestLen) throw new DigestException(); digest = engineDigest(); System.arraycopy(digest, 0, buf, offset, digestLen); return digestLen; } public void engineReset() { sha.reset(); tigertree.reset(); } public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } // private void hashCheck() // throws NoSuchAlgorithmException // { // BitprintUtils utils = new BitprintUtils(); // Base32 base32 = new Base32(); // String hash; // // hash = new BigInteger(1,tigerTree.digest()).toString(16); // tigerTree.reset(); // // if (!hash.equals(hashEmpty)) // throw new NoSuchAlgorithmException( // "TigerTree internal check failed. (empty)"); // // tigerTree.update((byte)49); // hash = new BigInteger(1,tigerTree.digest()).toString(16); // tigerTree.reset(); // // if (!hash.equals(hashOne)) // throw new NoSuchAlgorithmException( // "TigerTree internal check failed. (one byte)"); // // byte[] oneK = new byte[1026]; // java.util.Arrays.fill(oneK, 0, 1025, (byte)97); // tigerTree.update(oneK, 0, 1025); // hash = new BigInteger(1,tigerTree.digest()).toString(16); // tigerTree.reset(); // // if (!hash.equals(hashOneK)) // throw new NoSuchAlgorithmException( // "TigerTree internal check failed. (1025 bytes)"); // } public static byte[] bitprintFile(String fileName) throws FileNotFoundException { FileInputStream stream = new FileInputStream(fileName); byte[] digest; return bitprintStream(stream); } public static byte[] bitprintStream(InputStream stream) { try { MessageDigest bitprint = new Bitprint(); int read; byte[] in = new byte[4096]; while ((read = stream.read(in)) > -1) { bitprint.update(in, 0, read); } return bitprint.digest(); } catch (IOException e) { return null; } catch (NoSuchAlgorithmException e) { return null; } } public static byte[] bitprintBuffer(byte[] buffer, int offset, int len) { try { MessageDigest bitprint = new Bitprint(); bitprint.update(buffer, offset, len); return bitprint.digest(); } catch (NoSuchAlgorithmException e) { return null; } } public static byte[] bitprintBuffer(byte[] buffer) { return bitprintBuffer(buffer, 0, buffer.length); } // static void main(String[] args) // throws IOException, NoSuchAlgorithmException , NoSuchProviderException // { // if(args.length<1) { // System.out.println("You must supply a filename."); // return; // } // // BitprintUtils utils = new BitprintUtils(); // // //byte[] digest = utils.bitprintFile(args[0]); // byte[] digest = null; // byte[] buffer = new byte[1]; // buffer[0] = 97; // try // { // digest = utils.bitprintBuffer(buffer, 0, 1); // } // catch(BitprintException e) // { // System.out.println("BitprintException: " + e.getMessage()); // System.exit(0); // } // // String hash = new BigInteger(1,digest).toString(16); // while(hash.length()<48) // { // hash = "0"+hash; // } // System.out.println(hash); // } } |
Update of /cvsroot/bitcollider/jbitprint/src/com/bitzi/bitprint In directory sc8-pr-cvs1:/tmp/cvs-serv18284/src/com/bitzi/bitprint Removed Files: BitprintProvider.java BitprintException.java BitprintUtils.java Base32.java Bitprint.java TigerTree.java BitprintTest.java Log Message: refactoring/simplification under com.bitzi.util --- BitprintProvider.java DELETED --- --- BitprintException.java DELETED --- --- BitprintUtils.java DELETED --- --- Base32.java DELETED --- --- Bitprint.java DELETED --- --- TigerTree.java DELETED --- --- BitprintTest.java DELETED --- |
From: Gordon M. <go...@us...> - 2003-04-13 03:43:43
|
Update of /cvsroot/bitcollider/jbitprint/src/com/bitzi/util In directory sc8-pr-cvs1:/tmp/cvs-serv18234/src/com/bitzi/util Log Message: Directory /cvsroot/bitcollider/jbitprint/src/com/bitzi/util added to the repository |
From: Gordon M. <go...@us...> - 2003-04-13 03:43:43
|
Update of /cvsroot/bitcollider/jbitprint/lib/package-ref In directory sc8-pr-cvs1:/tmp/cvs-serv18234/lib/package-ref Log Message: Directory /cvsroot/bitcollider/jbitprint/lib/package-ref added to the repository |
From: Gordon M. <go...@us...> - 2003-04-13 03:43:43
|
Update of /cvsroot/bitcollider/jbitprint/lib In directory sc8-pr-cvs1:/tmp/cvs-serv18234/lib Log Message: Directory /cvsroot/bitcollider/jbitprint/lib added to the repository |
From: Gordon M. <go...@us...> - 2003-03-18 08:15:24
|
Update of /cvsroot/bitcollider/bitcollider/lib In directory sc8-pr-cvs1:/tmp/cvs-serv1678/lib Modified Files: ftuuhash.c Log Message: base64 fix that should remedy occasional uuhash corruption Index: ftuuhash.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/ftuuhash.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ftuuhash.c 6 Jul 2002 09:30:15 -0000 1.1 --- ftuuhash.c 18 Mar 2003 08:15:19 -0000 1.2 *************** *** 1,287 **** ! /* (PD) 2001 The Bitzi Corporation ! * Please see file COPYING or http://bitzi.com/publicdomain ! * for more info. ! * ! * $Id$ ! * ! * Support for calculating FastTrack internal hashes ! * ! * Based on the definition of the FastTrack hash used ! * by the giFT project; reworked to allow calculation ! * in one stream pass, rather than with file-seeks and ! * a filesize known in advance. ! * ! * FT identifiers are roughly: ! * 16 bytes: md5 of first 307,200 bytes of file ! * 4 bytes: result of running a more simple "smallHash" ! * over a number of ranges of the file, including: ! * ! * - the 307,200 bytes starting at each 1MiB, 2MiB, 4MiB, ! * 8MiB, 16MiB, etc offset within the file ! * ! * - the last 307,200 bytes of the file (or less ! * if the filesize < 614,400) ! * ! * The last 307,200 has precedence over the 307,200 ! * starting at any sampling point -- so for example, ! * in a file that's 1.5 MiB, the range from 1MiB to ! * 1MiB+307200 is not sampled, because it would overlap ! * into the 307,200-long endseg. ! * ! * Since this code does not know the stream's length in advance, ! * it uses a big rolling window of file contents, and can rollback ! * the smallhash if the end is discovered within 307200 of the ! * last sample range end. (Seeding the FTUU_CTX with the file's ! * length would obviate the need for that rolling window... ! * probably speeding up the process a lot.) ! * ! */ ! ! #include "ftuuhash.h" ! #include "md5.h" ! ! #include <stdio.h> ! #include <string.h> ! ! static const unsigned int FTSEG_SIZE = 307200; ! ! // table from giFT project ! static const unsigned int smalltable[256] = { ! 0x00000000,0x77073096,0xEE0E612C,0x990951BA, ! 0x076DC419,0x706AF48F,0xE963A535,0x9E6495A3, ! 0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988, ! 0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91, ! 0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE, ! 0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D385C7, ! 0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC, ! 0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5, ! 0x3B6E20C8,0x4C69105E,0xD56041E4,0xA2677172, ! 0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B, ! 0x35B5A8FA,0x42B2986C,0xDBBBC9D6,0xACBCF940, ! 0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59, ! 0x26D930AC,0x51DE003A,0xC8D75180,0xBFD06116, ! 0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F, ! 0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924, ! 0x2F6F7C87,0x58684C11,0xC1611DAB,0xB6662D3D, ! 0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A, ! 0x71B18589,0x06B6B51F,0x9FBFE4A5,0xE8B8D433, ! 0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818, ! 0x7F6A0DBB,0x086D3D2D,0x91646C97,0xE6635C01, ! 0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E, ! 0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457, ! 0x65B0D9C6,0x12B7E950,0x8BBEB8EA,0xFCB9887C, ! 0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65, ! 0x4DB26158,0x3AB551CE,0xA3BC0074,0xD4BB30E2, ! 0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB, ! 0x4369E96A,0x346ED9FC,0xAD678846,0xDA60B8D0, ! 0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9, ! 0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086, ! 0x5768B525,0x206F85B3,0xB966D409,0xCE61E49F, ! 0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4, ! 0x59B33D17,0x2EB40D81,0xB7BD5C3B,0xC0BA6CAD, ! 0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A, ! 0xEAD54739,0x9DD277AF,0x04DB2615,0x73DC1683, ! 0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8, ! 0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1, ! 0xF00F9344,0x8708A3D2,0x1E01F268,0x6906C2FE, ! 0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7, ! 0xFED41B76,0x89D32BE0,0x10DA7A5A,0x67DD4ACC, ! 0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5, ! 0xD6D6A3E8,0xA1D1937E,0x38D8C2C4,0x4FDFF252, ! 0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B, ! 0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60, ! 0xDF60EFC3,0xA867DF55,0x316E8EEF,0x4669BE79, ! 0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236, ! 0xCC0C7795,0xBB0B4703,0x220216B9,0x5505262F, ! 0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04, ! 0xC2D7FFA7,0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D, ! 0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A, ! 0x9C0906A9,0xEB0E363F,0x72076785,0x05005713, ! 0x95BF4A82,0xE2B87A14,0x7BB12BAE,0x0CB61B38, ! 0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21, ! 0x86D3D2D4,0xF1D4E242,0x68DDB3F8,0x1FDA836E, ! 0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777, ! 0x88085AE6,0xFF0F6A70,0x66063BCA,0x11010B5C, ! 0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45, ! 0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2, ! 0xA7672661,0xD06016F7,0x4969474D,0x3E6E77DB, ! 0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0, ! 0xA9BCAE53,0xDEBB9EC5,0x47B2CF7F,0x30B5FFE9, ! 0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6, ! 0xBAD03605,0xCDD70693,0x54DE5729,0x23D967BF, ! 0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94, ! 0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D ! }; ! ! /** ! * Update the 4-byte running small hash; also from giFT project ! */ ! unsigned int hashSmallHash(byte *data, size_t len, unsigned int hash) ! { ! unsigned int i; ! ! for(i=0;i<len;++i) { ! hash = smalltable[data[i] ^ (hash & 0xff)] ^ (hash >> 8); ! } ! ! return hash; ! } ! ! // dirt simple base64 encoding. caller should ensure out has enough space. ! // no '=' padding provided, but string is zero-terminated. ! void bitziEncodeBase64(byte *raw, int len, char *out) { ! char *base64digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ! int bitsNeeded = 6; ! int bitPosition = 7; ! int rawIndex = 0; ! int strIndex = 0; ! int bit = 0; ! int digit = 0; ! ! while (rawIndex < len) { ! while (bitsNeeded > 0) { ! if (bitPosition >= 0) { ! bit = (raw[rawIndex]>>bitPosition) & 1; ! digit = digit << 1; ! digit += bit; ! bitsNeeded--; ! bitPosition--; ! } else { ! rawIndex++; ! bitPosition=7; ! if (rawIndex>len) { ! digit = digit << bitsNeeded; ! bitsNeeded = 0; ! } ! } ! } ! out[strIndex]=base64digits[digit]; ! digit=0; ! bitsNeeded=6; ! strIndex++; ! } ! out[strIndex]=0; ! } ! ! ! // ! // stream-based FT hash calculation ! // ! ! /* FTUUHash initialization. ! */ ! void FTUUInit(FTUU_CTX *context) /* context */ ! { ! context->nextPos = 0; ! context->smallHash = 0xffffffff; ! context->backupSmallHash = 0xffffffff; ! MD5Init(&(context->md5context)); ! context->nextSampleStart = 0x100000; ! } ! ! /* FTUUHash block update operation. ! */ ! void FTUUUpdate(FTUU_CTX *context, /* context */ ! const unsigned char *input, /* input block */ ! unsigned int inputLen) /* length of input block */ ! { ! unsigned int firstPart = inputLen; ! ! // first, handle the MD5'd portion of the file ! if(context->nextPos < FTSEG_SIZE) { ! if((context->nextPos+inputLen)>FTSEG_SIZE) { ! // don't overshoot the segsize ! firstPart = FTSEG_SIZE - context->nextPos; ! } ! MD5Update(&(context->md5context),input,firstPart); ! context->nextPos += firstPart; ! if(firstPart<inputLen) { ! // continue with the rest of the input ! FTUUUpdate(context,input+firstPart,inputLen-firstPart); ! } ! return; ! } ! ! // OK, we're past the MD5 portion of the file ! ! // check for at sampling-range end ! if(context->nextPos == (context->nextSampleStart+FTSEG_SIZE) ) { ! // the rollingBuffer is loaded with exactly enough data ! // to add a sample to the smallHash ! context->backupSmallHash = context->smallHash; // save current smallhash state ! // through to end... ! context->smallHash = ! hashSmallHash(context->rollingBuffer + (context->nextPos % FTSEG_SIZE), ! FTSEG_SIZE - (context->nextPos % FTSEG_SIZE), ! // 0, ! context->smallHash); ! // ... and wraparound ! context->smallHash = ! hashSmallHash(context->rollingBuffer, ! context->nextPos % FTSEG_SIZE, ! // FTSEG_SIZE - (context->nextPos % FTSEG_SIZE), ! context->smallHash); ! // set new sampling startpoint ! context->nextSampleStart = context->nextSampleStart << 1; ! } ! ! // OK, just move bytes of data from input to the rollingBuffer ! // (use smallest of: inputLen, bytes-to-wraparound, bytes-to-sample-end ! if((context->nextPos + inputLen) > (context->nextSampleStart + FTSEG_SIZE)) ! firstPart = (context->nextSampleStart + FTSEG_SIZE) - context->nextPos; ! if(((context->nextPos % FTSEG_SIZE) + firstPart) > FTSEG_SIZE) { ! firstPart = FTSEG_SIZE - (context->nextPos % FTSEG_SIZE); ! } ! ! memcpy(context->rollingBuffer + (context->nextPos % FTSEG_SIZE), ! input, ! firstPart); ! context->nextPos += firstPart; ! ! if (firstPart<inputLen) { ! // continue with the rest of the input ! FTUUUpdate(context,input+firstPart,inputLen-firstPart); ! } ! } ! ! /* FTUUHash finalization. ! *//* message digest *//* context */ ! void FTUUFinal(unsigned char digest[20],FTUU_CTX *context) ! { ! int continueIndex = 0; ! // finalize MD5 ! MD5Final(digest,&(context->md5context)); ! ! // decide whether or not to rollback smallhash ! if(context->nextPos < ((context->nextSampleStart >> 1) + 2*FTSEG_SIZE)) { ! // the last FTSEG_SIZE bytes overlap the last internal sample ! // pretend like the last smallHash processing never happened ! context->smallHash = context->backupSmallHash; ! } ! ! // do the smallHash of the end segment ! if(context->nextPos >= 2*FTSEG_SIZE) { ! // end segment is a full FTSEG_SIZE ! context->smallHash = ! hashSmallHash(context->rollingBuffer + (context->nextPos % FTSEG_SIZE), ! FTSEG_SIZE - (context->nextPos % FTSEG_SIZE), ! // 0, ! context->smallHash); ! continueIndex = FTSEG_SIZE - (context->nextPos % FTSEG_SIZE); ! } ! if(context->nextPos > FTSEG_SIZE) { ! // wraparound or do an endseg < FTSEG_SIZE ! context->smallHash = ! hashSmallHash(context->rollingBuffer, ! context->nextPos % FTSEG_SIZE, ! // continueIndex, ! context->smallHash); ! } // else filesize was <= FTSEG_SIZE, no smallHashing of endseg necessary ! context->smallHash ^= context->nextPos; ! digest[16] = context->smallHash & 0xff; ! digest[17] = (context->smallHash >> 8) & 0xff; ! digest[18] = (context->smallHash >> 16) & 0xff; ! digest[19] = (context->smallHash >> 24) & 0xff; ! ! } ! --- 1,288 ---- ! /* (PD) 2001 The Bitzi Corporation ! * Please see file COPYING or http://bitzi.com/publicdomain ! * for more info. ! * ! * $Id$ ! * ! * Support for calculating FastTrack internal hashes ! * ! * Based on the definition of the FastTrack hash used ! * by the giFT project; reworked to allow calculation ! * in one stream pass, rather than with file-seeks and ! * a filesize known in advance. ! * ! * FT identifiers are roughly: ! * 16 bytes: md5 of first 307,200 bytes of file ! * 4 bytes: result of running a more simple "smallHash" ! * over a number of ranges of the file, including: ! * ! * - the 307,200 bytes starting at each 1MiB, 2MiB, 4MiB, ! * 8MiB, 16MiB, etc offset within the file ! * ! * - the last 307,200 bytes of the file (or less ! * if the filesize < 614,400) ! * ! * The last 307,200 has precedence over the 307,200 ! * starting at any sampling point -- so for example, ! * in a file that's 1.5 MiB, the range from 1MiB to ! * 1MiB+307200 is not sampled, because it would overlap ! * into the 307,200-long endseg. ! * ! * Since this code does not know the stream's length in advance, ! * it uses a big rolling window of file contents, and can rollback ! * the smallhash if the end is discovered within 307200 of the ! * last sample range end. (Seeding the FTUU_CTX with the file's ! * length would obviate the need for that rolling window... ! * probably speeding up the process a lot.) ! * ! */ ! ! ! #include <stdio.h> ! #include <string.h> ! ! #include "ftuuhash.h" ! #include "md5.h" ! ! static const unsigned int FTSEG_SIZE = 307200; ! ! // table from giFT project ! static const unsigned int smalltable[256] = { ! 0x00000000,0x77073096,0xEE0E612C,0x990951BA, ! 0x076DC419,0x706AF48F,0xE963A535,0x9E6495A3, ! 0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988, ! 0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91, ! 0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE, ! 0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D385C7, ! 0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC, ! 0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5, ! 0x3B6E20C8,0x4C69105E,0xD56041E4,0xA2677172, ! 0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B, ! 0x35B5A8FA,0x42B2986C,0xDBBBC9D6,0xACBCF940, ! 0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59, ! 0x26D930AC,0x51DE003A,0xC8D75180,0xBFD06116, ! 0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F, ! 0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924, ! 0x2F6F7C87,0x58684C11,0xC1611DAB,0xB6662D3D, ! 0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A, ! 0x71B18589,0x06B6B51F,0x9FBFE4A5,0xE8B8D433, ! 0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818, ! 0x7F6A0DBB,0x086D3D2D,0x91646C97,0xE6635C01, ! 0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E, ! 0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457, ! 0x65B0D9C6,0x12B7E950,0x8BBEB8EA,0xFCB9887C, ! 0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65, ! 0x4DB26158,0x3AB551CE,0xA3BC0074,0xD4BB30E2, ! 0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB, ! 0x4369E96A,0x346ED9FC,0xAD678846,0xDA60B8D0, ! 0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9, ! 0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086, ! 0x5768B525,0x206F85B3,0xB966D409,0xCE61E49F, ! 0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4, ! 0x59B33D17,0x2EB40D81,0xB7BD5C3B,0xC0BA6CAD, ! 0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A, ! 0xEAD54739,0x9DD277AF,0x04DB2615,0x73DC1683, ! 0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8, ! 0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1, ! 0xF00F9344,0x8708A3D2,0x1E01F268,0x6906C2FE, ! 0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7, ! 0xFED41B76,0x89D32BE0,0x10DA7A5A,0x67DD4ACC, ! 0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5, ! 0xD6D6A3E8,0xA1D1937E,0x38D8C2C4,0x4FDFF252, ! 0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B, ! 0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60, ! 0xDF60EFC3,0xA867DF55,0x316E8EEF,0x4669BE79, ! 0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236, ! 0xCC0C7795,0xBB0B4703,0x220216B9,0x5505262F, ! 0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04, ! 0xC2D7FFA7,0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D, ! 0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A, ! 0x9C0906A9,0xEB0E363F,0x72076785,0x05005713, ! 0x95BF4A82,0xE2B87A14,0x7BB12BAE,0x0CB61B38, ! 0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21, ! 0x86D3D2D4,0xF1D4E242,0x68DDB3F8,0x1FDA836E, ! 0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777, ! 0x88085AE6,0xFF0F6A70,0x66063BCA,0x11010B5C, ! 0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45, ! 0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2, ! 0xA7672661,0xD06016F7,0x4969474D,0x3E6E77DB, ! 0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0, ! 0xA9BCAE53,0xDEBB9EC5,0x47B2CF7F,0x30B5FFE9, ! 0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6, ! 0xBAD03605,0xCDD70693,0x54DE5729,0x23D967BF, ! 0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94, ! 0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D ! }; ! ! /** ! * Update the 4-byte running small hash; also from giFT project ! */ ! unsigned int hashSmallHash(byte *data, size_t len, unsigned int hash) ! { ! unsigned int i; ! ! for(i=0;i<len;++i) { ! hash = smalltable[data[i] ^ (hash & 0xff)] ^ (hash >> 8); ! } ! ! return hash; ! } ! ! // dirt simple base64 encoding. caller should ensure out has enough space. ! // no '=' padding provided, but string is zero-terminated. ! void bitziEncodeBase64(byte *raw, int len, char *out) { ! char *base64digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ! int bitsNeeded = 6; ! int bitPosition = 7; ! int rawIndex = 0; ! int strIndex = 0; ! int bit = 0; ! int digit = 0; ! ! while (rawIndex < len) { ! while (bitsNeeded > 0) { ! if (bitPosition >= 0) { ! bit = (raw[rawIndex]>>bitPosition) & 1; ! digit = digit << 1; ! digit += bit; ! bitsNeeded--; ! bitPosition--; ! } else { ! rawIndex++; ! bitPosition=7; ! if (rawIndex==len) { // we're past the end; zero-pad ! digit = digit << bitsNeeded; ! bitsNeeded = 0; ! } ! } ! } ! out[strIndex]=base64digits[digit]; ! digit=0; ! bitsNeeded=6; ! strIndex++; ! } ! out[strIndex]=0; ! } ! ! ! // ! // stream-based FT hash calculation ! // ! ! /* FTUUHash initialization. ! */ ! void FTUUInit(FTUU_CTX *context) /* context */ ! { ! context->nextPos = 0; ! context->smallHash = 0xffffffff; ! context->backupSmallHash = 0xffffffff; ! MD5Init(&(context->md5context)); ! context->nextSampleStart = 0x100000; ! } ! ! /* FTUUHash block update operation. ! */ ! void FTUUUpdate(FTUU_CTX *context, /* context */ ! const unsigned char *input, /* input block */ ! unsigned int inputLen) /* length of input block */ ! { ! unsigned int firstPart = inputLen; ! ! // first, handle the MD5'd portion of the file ! if(context->nextPos < FTSEG_SIZE) { ! if((context->nextPos+inputLen)>FTSEG_SIZE) { ! // don't overshoot the segsize ! firstPart = FTSEG_SIZE - context->nextPos; ! } ! MD5Update(&(context->md5context),input,firstPart); ! context->nextPos += firstPart; ! if(firstPart<inputLen) { ! // continue with the rest of the input ! FTUUUpdate(context,input+firstPart,inputLen-firstPart); ! } ! return; ! } ! ! // OK, we're past the MD5 portion of the file ! ! // check for at sampling-range end ! if(context->nextPos == (context->nextSampleStart+FTSEG_SIZE) ) { ! // the rollingBuffer is loaded with exactly enough data ! // to add a sample to the smallHash ! context->backupSmallHash = context->smallHash; // save current smallhash state ! // through to end... ! context->smallHash = ! hashSmallHash(context->rollingBuffer + (context->nextPos % FTSEG_SIZE), ! FTSEG_SIZE - (context->nextPos % FTSEG_SIZE), ! // 0, ! context->smallHash); ! // ... and wraparound ! context->smallHash = ! hashSmallHash(context->rollingBuffer, ! context->nextPos % FTSEG_SIZE, ! // FTSEG_SIZE - (context->nextPos % FTSEG_SIZE), ! context->smallHash); ! // set new sampling startpoint ! context->nextSampleStart = context->nextSampleStart << 1; ! } ! ! // OK, just move bytes of data from input to the rollingBuffer ! // (use smallest of: inputLen, bytes-to-wraparound, bytes-to-sample-end ! if((context->nextPos + inputLen) > (context->nextSampleStart + FTSEG_SIZE)) ! firstPart = (context->nextSampleStart + FTSEG_SIZE) - context->nextPos; ! if(((context->nextPos % FTSEG_SIZE) + firstPart) > FTSEG_SIZE) { ! firstPart = FTSEG_SIZE - (context->nextPos % FTSEG_SIZE); ! } ! ! memcpy(context->rollingBuffer + (context->nextPos % FTSEG_SIZE), ! input, ! firstPart); ! context->nextPos += firstPart; ! ! if (firstPart<inputLen) { ! // continue with the rest of the input ! FTUUUpdate(context,input+firstPart,inputLen-firstPart); ! } ! } ! ! /* FTUUHash finalization. ! *//* message digest *//* context */ ! void FTUUFinal(unsigned char digest[20],FTUU_CTX *context) ! { ! int continueIndex = 0; ! // finalize MD5 ! MD5Final(digest,&(context->md5context)); ! ! // decide whether or not to rollback smallhash ! if(context->nextPos < ((context->nextSampleStart >> 1) + 2*FTSEG_SIZE)) { ! // the last FTSEG_SIZE bytes overlap the last internal sample ! // pretend like the last smallHash processing never happened ! context->smallHash = context->backupSmallHash; ! } ! ! // do the smallHash of the end segment ! if(context->nextPos >= 2*FTSEG_SIZE) { ! // end segment is a full FTSEG_SIZE ! context->smallHash = ! hashSmallHash(context->rollingBuffer + (context->nextPos % FTSEG_SIZE), ! FTSEG_SIZE - (context->nextPos % FTSEG_SIZE), ! // 0, ! context->smallHash); ! continueIndex = FTSEG_SIZE - (context->nextPos % FTSEG_SIZE); ! } ! if(context->nextPos > FTSEG_SIZE) { ! // wraparound or do an endseg < FTSEG_SIZE ! context->smallHash = ! hashSmallHash(context->rollingBuffer, ! context->nextPos % FTSEG_SIZE, ! // continueIndex, ! context->smallHash); ! } // else filesize was <= FTSEG_SIZE, no smallHashing of endseg necessary ! context->smallHash ^= context->nextPos; ! digest[16] = context->smallHash & 0xff; ! digest[17] = (context->smallHash >> 8) & 0xff; ! digest[18] = (context->smallHash >> 16) & 0xff; ! digest[19] = (context->smallHash >> 24) & 0xff; ! ! } ! |
From: Gordon M. <go...@us...> - 2003-03-18 08:13:12
|
Update of /cvsroot/bitcollider/bitcollider/lib In directory sc8-pr-cvs1:/tmp/cvs-serv997/lib Modified Files: gui_win32.rc Log Message: 2003 Index: gui_win32.rc =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/gui_win32.rc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** gui_win32.rc 24 Feb 2003 10:58:36 -0000 1.5 --- gui_win32.rc 18 Mar 2003 08:13:09 -0000 1.6 *************** *** 56,60 **** LTEXT "Bitcollider/Windows Version ",IDC_VERSIONSTRING,57,10, 153,8,SS_NOPREFIX ! LTEXT "(PD) 2001 The Bitzi Corporation",IDC_STATIC,57,22,116,8 DEFPUSHBUTTON "OK",IDOK,174,20,36,13,WS_GROUP LTEXT "For more information about the Bitcollider and Bitzi's Free Universal Media Catalog, please visit http://bitzi.com", --- 56,60 ---- LTEXT "Bitcollider/Windows Version ",IDC_VERSIONSTRING,57,10, 153,8,SS_NOPREFIX ! LTEXT "(PD) 2003 The Bitzi Corporation",IDC_STATIC,57,22,116,8 DEFPUSHBUTTON "OK",IDOK,174,20,36,13,WS_GROUP LTEXT "For more information about the Bitcollider and Bitzi's Free Universal Media Catalog, please visit http://bitzi.com", |
From: Gordon M. <go...@us...> - 2003-03-18 08:11:52
|
Update of /cvsroot/bitcollider/bitcollider/lib In directory sc8-pr-cvs1:/tmp/cvs-serv474/lib Modified Files: bitzi.bmp Log Message: remove black border Index: bitzi.bmp =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/bitzi.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvsLAijgK and /tmp/cvsubeWhk differ |
From: Mike L. <mli...@us...> - 2003-03-15 23:55:08
|
Update of /cvsroot/bitcollider/bitcollider/image In directory sc8-pr-cvs1:/tmp/cvs-serv21324/image Modified Files: image.c Log Message: skip jpeg metadata extraction when jpeg truncated, avoids hang, see http://sourceforge.net/tracker/index.php?func=detail&aid=703420&group_id=21211&atid=121211 Index: image.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/image/image.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** image.c 14 Jan 2002 20:32:59 -0000 1.5 --- image.c 15 Mar 2003 23:55:04 -0000 1.6 *************** *** 311,314 **** --- 311,318 ---- { type = read_8(file); + + /* skip JPEG metadata extraction when file truncated here */ + if(feof(file)) + return 1; } while (type == 0xFF); |
From: Mike L. <mli...@us...> - 2003-03-14 05:33:58
|
Update of /cvsroot/bitcollider/bitcollider In directory sc8-pr-cvs1:/tmp/cvs-serv15110 Modified Files: AUTHORS ChangeLog Log Message: updated for 0.6 (and 0.4!) Index: AUTHORS =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/AUTHORS,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** AUTHORS 14 Jan 2002 20:32:59 -0000 1.4 --- AUTHORS 14 Mar 2003 05:33:55 -0000 1.5 *************** *** 8,11 **** --- 8,12 ---- Image plugin (BMP, GIF, JPG, PNG) + Video plugin (AVI/QT/MPEG-1/MPEG-2) - Mark Nelson [delirium] <del...@th...> *************** *** 13,15 **** - Nathan Lutchansky <lut...@li...> ! (please send changes/patches to ro...@bi...) --- 14,16 ---- - Nathan Lutchansky <lut...@li...> ! (please send changes/patches to in...@bi...) Index: ChangeLog =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/ChangeLog,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** ChangeLog 5 Dec 2001 18:43:52 -0000 1.8 --- ChangeLog 14 Mar 2003 05:33:55 -0000 1.9 *************** *** 1,5 **** ! Changes to version 0.3.4: ------------------------- - Changed the character set used for Base32 encoding and added a . between the sha1 and tigertree hash --- 1,16 ---- ! Changes to version 0.6.0: ! ------------------------- ! - Tiger tree definition changed, incompatible with previous releases. ! - Added video plugin. (delirium) ! ! Changes to version 0.4.0: ------------------------- + - Added support for calculating eDonkey "ed2k" and FastTrack "sig2dat" + identifiers. + - Added support for PNG images to the image plugin. (delirium) + - Turned off calculating/reporting MD5 hashes by default. + Changes to version 0.3.4: + ------------------------- - Changed the character set used for Base32 encoding and added a . between the sha1 and tigertree hash *************** *** 7,16 **** Changes to version 0.3.3: ------------------------- - - Added support for calculating MD5 hashes. Changes to version 0.3.2: ------------------------- - - A new image plugin as been added. This image plugin was written by Bitizen delirium and supports GIF, BMP and JPG files) --- 18,25 ---- |
From: Mike L. <mli...@us...> - 2003-03-14 05:26:45
|
Update of /cvsroot/bitcollider/bitcollider/lib In directory sc8-pr-cvs1:/tmp/cvs-serv11186/lib Modified Files: main.c Log Message: Fix -f option http://sourceforge.net/tracker/index.php?func=detail&aid=615434&group_id=21211&atid=121211 Index: main.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/main.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** main.c 24 Feb 2003 10:58:36 -0000 1.42 --- main.c 14 Mar 2003 05:26:42 -0000 1.43 *************** *** 1038,1042 **** FILE *infile; ! if (strcmp(fileName, "-")) infile = stdin; else --- 1038,1042 ---- FILE *infile; ! if (!strcmp(fileName, "-")) infile = stdin; else |
From: Gordon M. <go...@us...> - 2003-03-01 09:03:13
|
Update of /cvsroot/bitcollider/bitcollider/video In directory sc8-pr-cvs1:/tmp/cvs-serv15302/video Modified Files: video.c Log Message: added '.qt' as file extension (archaic equivalent of .mov); added ';' compiler demanded Index: video.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/video/video.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** video.c 16 Sep 2002 20:45:33 -0000 1.1 --- video.c 1 Mar 2003 09:03:09 -0000 1.2 *************** *** 33,36 **** --- 33,37 ---- { ".AVI", "Microsoft AVI" }, { ".MOV", "Apple QuickTime" }, + { ".QT", "Apple QuickTime" }, { ".MPG", "MPEG-1" }, { ".MPEG", "MPEG-1" }, *************** *** 126,129 **** --- 127,131 ---- case UNKNOWN: /* this is only here to quiet compiler warnings */ + ; } |
From: Gordon M. <go...@us...> - 2003-02-24 16:21:32
|
Update of /cvsroot/bitcollider/bitcollider/misc In directory sc8-pr-cvs1:/tmp/cvs-serv28427/misc Modified Files: bitcollider.spec Log Message: version to 0.5.0 Index: bitcollider.spec =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/misc/bitcollider.spec,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** bitcollider.spec 8 Jul 2002 19:39:57 -0000 1.8 --- bitcollider.spec 24 Feb 2003 16:21:27 -0000 1.9 *************** *** 6,10 **** # %define name bitcollider ! %define version 0.4.0 %define release 1 %define prefix /usr --- 6,10 ---- # %define name bitcollider ! %define version 0.5.0 %define release 1 %define prefix /usr |
From: Gordon M. <go...@us...> - 2003-02-24 11:00:39
|
Update of /cvsroot/bitcollider/bitcollider/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv24409/win32 Modified Files: bitcollider.dsw Log Message: include video plugin subproject Index: bitcollider.dsw =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/win32/bitcollider.dsw,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** bitcollider.dsw 31 May 2001 22:09:32 -0000 1.5 --- bitcollider.dsw 24 Feb 2003 11:00:35 -0000 1.6 *************** *** 4,8 **** ############################################################################### ! Project: "bc_dll"=.\bc_dll.dsp - Package Owner=<4> Package=<5> --- 4,8 ---- ############################################################################### ! Project: "bc_dll"=".\bc_dll.dsp" - Package Owner=<4> Package=<5> *************** *** 16,20 **** ############################################################################### ! Project: "bitcollider"=.\bitcollider.dsp - Package Owner=<4> Package=<5> --- 16,20 ---- ############################################################################### ! Project: "bitcollider"=".\bitcollider.dsp" - Package Owner=<4> Package=<5> *************** *** 43,47 **** ############################################################################### ! Project: "gui"=..\gui\gui.dsp - Package Owner=<4> Package=<5> --- 43,47 ---- ############################################################################### ! Project: "gui"="..\gui\gui.dsp" - Package Owner=<4> Package=<5> *************** *** 58,62 **** ############################################################################### ! Project: "image"=..\image\win32\image.dsp - Package Owner=<4> Package=<5> --- 58,62 ---- ############################################################################### ! Project: "image"="..\image\win32\image.dsp" - Package Owner=<4> Package=<5> *************** *** 70,74 **** ############################################################################### ! Project: "vorbis"=..\vorbis\win32\vorbis.dsp - Package Owner=<4> Package=<5> --- 70,86 ---- ############################################################################### ! Project: "video"="..\video\win32\video.dsp" - Package Owner=<4> ! ! Package=<5> ! {{{ ! }}} ! ! Package=<4> ! {{{ ! }}} ! ! ############################################################################### ! ! Project: "vorbis"="..\vorbis\win32\vorbis.dsp" - Package Owner=<4> Package=<5> *************** *** 85,89 **** ############################################################################### ! Project: "wav"=..\WAV\WIN32\wav.dsp - Package Owner=<4> Package=<5> --- 97,101 ---- ############################################################################### ! Project: "wav"="..\WAV\WIN32\wav.dsp" - Package Owner=<4> Package=<5> |
From: Gordon M. <go...@us...> - 2003-02-24 10:59:32
|
Update of /cvsroot/bitcollider/bitcollider/include In directory sc8-pr-cvs1:/tmp/cvs-serv23953/include Modified Files: bc_version.h tigertree.h Log Message: tigertree fix and related version revs Index: bc_version.h =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/include/bc_version.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** bc_version.h 8 Jul 2002 19:39:57 -0000 1.7 --- bc_version.h 24 Feb 2003 10:59:29 -0000 1.8 *************** *** 19,26 **** /* This indicates the version of the official submission spec */ ! #define BC_SUBMITSPECVER "0.3" /* Your agent-version string; should be #[.#[.#[etc]]] format */ ! #define BC_VERSION "0.4.0" #endif --- 19,26 ---- /* This indicates the version of the official submission spec */ ! #define BC_SUBMITSPECVER "0.4" /* Your agent-version string; should be #[.#[.#[etc]]] format */ ! #define BC_VERSION "0.5.0" #endif Index: tigertree.h =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/include/tigertree.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** tigertree.h 3 Apr 2001 23:53:49 -0000 1.2 --- tigertree.h 24 Feb 2003 10:59:29 -0000 1.3 *************** *** 10,18 **** #define TIGERSIZE 24 ! /* size of each block independently tiger-hashed */ #define BLOCKSIZE 1024 ! /* size of input to each non-leaf hash-tree node */ ! #define NODESIZE TIGERSIZE*2 /* default size of interim values stack, in TIGERSIZE --- 10,18 ---- #define TIGERSIZE 24 ! /* size of each block independently tiger-hashed, not counting leaf 0x00 prefix */ #define BLOCKSIZE 1024 ! /* size of input to each non-leaf hash-tree node, not counting node 0x01 prefix */ ! #define NODESIZE (TIGERSIZE*2) /* default size of interim values stack, in TIGERSIZE *************** *** 23,27 **** typedef struct tt_context { word64 count; /* total blocks processed */ ! unsigned char block[BLOCKSIZE]; /* block in progress */ int index; /* index into block */ unsigned char *top; /* top (next empty) stack slot */ --- 23,29 ---- typedef struct tt_context { word64 count; /* total blocks processed */ ! unsigned char leaf[1+BLOCKSIZE]; /* leaf in progress */ ! unsigned char *block; /* leaf data */ ! unsigned char node[1+NODESIZE]; /* node scratch space */ int index; /* index into block */ unsigned char *top; /* top (next empty) stack slot */ |
From: Gordon M. <go...@us...> - 2003-02-24 10:58:40
|
Update of /cvsroot/bitcollider/bitcollider/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23606/lib Modified Files: bitprint.c gui_win32.rc main.c tigertree.c Log Message: tigertree fix & related changes to sanity check, version number, about box Index: bitprint.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/bitprint.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** bitprint.c 5 Dec 2001 18:43:52 -0000 1.3 --- bitprint.c 24 Feb 2003 10:58:36 -0000 1.4 *************** *** 72,78 **** #define ONE_SHA "GVVBSK3ZCOYEYVCXJUMMFDKG4Y4VIKFL" #define ONEK_SHA "CAE54LXWDA55NWGAR4PNRX2II7TR66WL" ! #define EMPTY_TIGER "GKJ2YYYMCPYCIX4SXOYXM3QWCZ5E4WCJFXPHH4Y" ! #define ONE_TIGER "DVLTDFFAK3VTEAHZ2MBJADEEHQ6UDK2O2BWAHXY" ! #define ONEK_TIGER "2FMTCKHTA3ORYKBRIWJAL4KMZOCD4Z27AIPS5IQ" static int check_sha1_hash(const char *result, unsigned char *data, int len); --- 72,78 ---- #define ONE_SHA "GVVBSK3ZCOYEYVCXJUMMFDKG4Y4VIKFL" #define ONEK_SHA "CAE54LXWDA55NWGAR4PNRX2II7TR66WL" ! #define EMPTY_TIGER "LWPNACQDBZRYXW3VHJVCJ64QBZNGHOHHHZWCLNQ" ! #define ONE_TIGER "QMLU34VTTAIWJQM5RVN4RIQKRM2JWIFZQFDYY3Y" ! #define ONEK_TIGER "CDYY2OW6F6DTGCH3Q6NMSDLSRV7PNMAL3CED3DA" static int check_sha1_hash(const char *result, unsigned char *data, int len); Index: gui_win32.rc =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/gui_win32.rc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** gui_win32.rc 6 Apr 2001 04:39:05 -0000 1.4 --- gui_win32.rc 24 Feb 2003 10:58:36 -0000 1.5 *************** *** 48,52 **** // ! IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 217, 65 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About" --- 48,52 ---- // ! IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 215, 66 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About" *************** *** 55,62 **** CONTROL 133,IDC_BITZI,"Static",SS_BITMAP,6,11,46,18 LTEXT "Bitcollider/Windows Version ",IDC_VERSIONSTRING,57,10, ! 119,8,SS_NOPREFIX ! LTEXT "(PD) 2001 The Bitzi Corporation",IDC_STATIC,57,22,119,8 ! DEFPUSHBUTTON "OK",IDOK,180,11,30,11,WS_GROUP ! LTEXT "For more information about the Bitcollider and the Bitzi community metadatabase, please visit http://bitzi.com", IDC_STATIC,6,38,204,19 END --- 55,62 ---- CONTROL 133,IDC_BITZI,"Static",SS_BITMAP,6,11,46,18 LTEXT "Bitcollider/Windows Version ",IDC_VERSIONSTRING,57,10, ! 153,8,SS_NOPREFIX ! LTEXT "(PD) 2001 The Bitzi Corporation",IDC_STATIC,57,22,116,8 ! DEFPUSHBUTTON "OK",IDOK,174,20,36,13,WS_GROUP ! LTEXT "For more information about the Bitcollider and Bitzi's Free Universal Media Catalog, please visit http://bitzi.com", IDC_STATIC,6,38,204,19 END *************** *** 138,142 **** BEGIN RIGHTMARGIN, 210 ! BOTTOMMARGIN, 62 END --- 138,142 ---- BEGIN RIGHTMARGIN, 210 ! BOTTOMMARGIN, 63 END Index: main.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/main.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** main.c 6 Jul 2002 09:30:15 -0000 1.41 --- main.c 24 Feb 2003 10:58:36 -0000 1.42 *************** *** 1,1211 **** ! /* (PD) 2001 The Bitzi Corporation ! * Please see file COPYING or http://bitzi.com/publicdomain ! * for more info. ! * ! * $Id$ ! */ ! /*------------------------------------------------------------------------- */ ! #include <stdio.h> ! #include <stdlib.h> ! #include <string.h> [...2393 lines suppressed...] ! char md5Hash[33]; ! ! MD5Init(&md5context); ! MD5Final(md5Digest, &md5context); ! bitziEncodeBase32(md5Digest, 16, md5Hash); ! ! if (strcmp(MD5_SANITY_CHECK_EMPTY, md5Hash)) ! return false; ! ! MD5Init(&md5context); ! MD5Update(&md5context, "01234", 5); ! MD5Final(md5Digest, &md5context); ! bitziEncodeBase32(md5Digest, 16, md5Hash); ! ! if (strcmp(MD5_SANITY_CHECK_01234, md5Hash)) ! return false; ! ! return true; ! } ! Index: tigertree.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/lib/tigertree.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** tigertree.c 10 Sep 2001 21:13:18 -0000 1.6 --- tigertree.c 24 Feb 2003 10:58:36 -0000 1.7 *************** *** 42,46 **** { ctx->count = 0; ! ctx->index = 0; ctx->top = ctx->nodes; } --- 42,49 ---- { ctx->count = 0; ! ctx->leaf[0] = 0; // flag for leaf calculation -- never changed ! ctx->node[0] = 1; // flag for inner node calculation -- never changed ! ctx->block = ctx->leaf + 1 ; // working area for blocks ! ctx->index = 0; // partial block pointer/block length ctx->top = ctx->nodes; } *************** *** 48,52 **** static void tt_compose(TT_CONTEXT *ctx) { byte *node = ctx->top - NODESIZE; ! tiger((word64*)node,(word64)NODESIZE,(word64*)ctx->top); // combine two nodes #if USE_BIG_ENDIAN tt_endian((byte *)ctx->top); --- 51,56 ---- static void tt_compose(TT_CONTEXT *ctx) { byte *node = ctx->top - NODESIZE; ! memmove((ctx->node)+1,node,NODESIZE); // copy to scratch area ! tiger((word64*)(ctx->node),(word64)(NODESIZE+1),(word64*)(ctx->top)); // combine two nodes #if USE_BIG_ENDIAN tt_endian((byte *)ctx->top); *************** *** 56,64 **** } ! static void tt_block(TT_CONTEXT *ctx, byte *block) { word64 b; ! tiger((word64*)block,(word64)ctx->index,(word64*)ctx->top); #if USE_BIG_ENDIAN tt_endian((byte *)ctx->top); --- 60,68 ---- } ! static void tt_block(TT_CONTEXT *ctx) { word64 b; ! tiger((word64*)ctx->leaf,(word64)ctx->index+1,(word64*)ctx->top); #if USE_BIG_ENDIAN tt_endian((byte *)ctx->top); *************** *** 75,106 **** void tt_update(TT_CONTEXT *ctx, byte *buffer, word32 len) { if (ctx->index) ! { /* Try to fill partial block */ ! unsigned left = BLOCKSIZE - ctx->index; ! if (len < left) { ! memmove(ctx->block + ctx->index, buffer, len); ! ctx->index += len; ! return; /* Finished */ } ! else { ! memmove(ctx->block + ctx->index, buffer, left); ! ctx->index = BLOCKSIZE; ! tt_block(ctx, ctx->block); ! buffer += left; ! len -= left; } - } - while (len >= BLOCKSIZE) - { - ctx->index = BLOCKSIZE; - tt_block(ctx, buffer); - buffer += BLOCKSIZE; - len -= BLOCKSIZE; - } - if ((ctx->index = len)) /* This assignment is intended */ - /* Buffer leftovers */ - memmove(ctx->block, buffer, len); } --- 79,115 ---- void tt_update(TT_CONTEXT *ctx, byte *buffer, word32 len) { + if (ctx->index) ! { /* Try to fill partial block */ ! unsigned left = BLOCKSIZE - ctx->index; ! if (len < left) ! { ! memmove(ctx->block + ctx->index, buffer, len); ! ctx->index += len; ! return; /* Finished */ ! } ! else ! { ! memmove(ctx->block + ctx->index, buffer, left); ! ctx->index = BLOCKSIZE; ! tt_block(ctx); ! buffer += left; ! len -= left; ! } ! } ! ! while (len >= BLOCKSIZE) { ! memmove(ctx->block, buffer, BLOCKSIZE); ! ctx->index = BLOCKSIZE; ! tt_block(ctx); ! buffer += BLOCKSIZE; ! len -= BLOCKSIZE; } ! if ((ctx->index = len)) /* This assignment is intended */ { ! /* Buffer leftovers */ ! memmove(ctx->block, buffer, len); } } *************** *** 108,115 **** static void tt_final(TT_CONTEXT *ctx) { ! // do last partial block, unless index is zero // AND we're past the first block if((ctx->index>0)||(ctx->top==ctx->nodes)) ! tt_block(ctx,ctx->block); } --- 117,124 ---- static void tt_final(TT_CONTEXT *ctx) { ! // do last partial block, unless index is 1 (empty leaf) // AND we're past the first block if((ctx->index>0)||(ctx->top==ctx->nodes)) ! tt_block(ctx); } |
From: Gordon M. <go...@us...> - 2003-02-24 10:46:07
|
Update of /cvsroot/bitcollider/bitcollider/video/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv19472/video/win32 Added Files: video.def video.dsp Log Message: initial setup of video plugin as msvc project --- NEW FILE: video.def --- ; video.def : Declares the module parameters for the DLL. LIBRARY "video" DESCRIPTION 'Video metadata plugin for Bitcollider' EXPORTS init_plugin --- NEW FILE: video.dsp --- # Microsoft Developer Studio Project File - Name="video" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=video - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "video.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "video.mak" CFG="video - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "video - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "video - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "video - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VIDEO_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VIDEO_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "video - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VIDEO_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VIDEO_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "video - Win32 Release" # Name "video - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project |
From: Gordon M. <go...@us...> - 2003-02-24 10:43:49
|
Update of /cvsroot/bitcollider/bitcollider/video/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv18585/win32 Log Message: Directory /cvsroot/bitcollider/bitcollider/video/win32 added to the repository |
From: Mike L. <mli...@us...> - 2002-09-16 20:45:36
|
Update of /cvsroot/bitcollider/bitcollider/video In directory usw-pr-cvs1:/tmp/cvs-serv31002/video Added Files: Makefile.am avi.c mpeg.c quicktime.c video.c video.h Log Message: Delirium's video plugin --- NEW FILE: Makefile.am --- # (PD) 2001 The Bitzi Corporation # Please see file COPYING or http://bitzi.com/publicdomain # for more info. # # $Id: Makefile.am,v 1.1 2002/09/16 20:45:33 mlinksva Exp $ # AUTOMAKE_OPTIONS = foreign INCLUDES = -I$(top_srcdir)/.. -I$(top_srcdir)/ver -I$(top_srcdir)/include lib_LTLIBRARIES = libvideo.la libvideo_la_SOURCES = video.c mpeg.c quicktime.c avi.c libvideo_la_LDFLAGS = -module -avoid-version all: mkdir -p $(top_srcdir)/plugins rm -f $(top_srcdir)/plugins/video.bcp ln -s $(top_srcdir)/video/.libs/libvideo.so $(top_srcdir)/plugins/video.bcp clean distclean: rm -f $(top_srcdir)/plugins/video.bcp --- NEW FILE: avi.c --- /* AVI parsing module for the Bitzi Bitcollider video plugin * * (PD) 2002 Mark Nelson [delirium] <del...@ru...> * Please see file COPYING or http://bitzi.com/publicdomain for more * information. * * The primary reference used for the AVI file format was the file format * section of John McGowan's AVI Overview: * http://www.jmcgowan.com/avitech.html#Format * The full AVI Overview is available at: * http://www.jmcgowan.com/avi.html */ #include "video.h" /* AVI uses little-endian ordering, and block sizes count only bytes after * the block size integer. */ void parse_avi(FILE *file, Data *data) { char fourcc[5]; /* Buffer in which to store fourccs */ unsigned blockLen; /* Length of the current block */ fseek(file, 12L, SEEK_SET); /* We've already checked signature */ /* Verify existence of and read length of AVI header: * "LIST____hdrlavih____" * where the first ____ is the length of the LIST block */ fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "LIST", 4)!=0) return; fseek(file, 4L, SEEK_CUR); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "hdrl", 4)!=0) return; fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "avih", 4)!=0) return; blockLen = fread_le(file, 4); /* Now we're at the start of the AVI header */ /* 0: microseconds per frame (4 bytes) */ data->fps = (unsigned int) round_double((double) 1.0e6 / fread_le(file, 4)); fseek(file, 12L, SEEK_CUR); /* 16: total frames (4 bytes) */ data->duration = (unsigned int) round_double((double) fread_le(file, 4) * 1000 / data->fps); fseek(file, 12L, SEEK_CUR); /* 32: width (4 bytes) */ data->width = (unsigned int) fread_le(file, 4); /* 36: height (4 bytes) */ data->height = (unsigned int) fread_le(file, 4); /* Skip rest of avi header */ fseek(file, (long) blockLen - 40, SEEK_CUR); /* Verify existence of and read length of video stream header: * "LIST____strlstrh____vids" */ fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "LIST", 4)!=0) return; blockLen = fread_le(file, 4); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "strl", 4)!=0) return; fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "strh", 4)!=0) return; fseek(file, 4L, SEEK_CUR); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "vids", 4)!=0) return; /* Now we're in the video stream header */ /* 16: FOURCC of video codec (4 bytes)*/ fread(fourcc, sizeof(char), 4, file); fourcc[4] = '\0'; data->codec = strdup(fourcc); /* Skip rest of video stream header */ fseek(file, (long) blockLen - 20, SEEK_CUR); /* Verify existence of audio stream header: * "LIST____strlstrh____auds" * Note: audio stream header is optional */ /* This is commented out since we're not reading audio data anyway (yet) */ /* fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "LIST", 4)!=0) return; fseek(file, 4L, SEEK_CUR); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "strl", 4)!=0) return; fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "strh", 4)!=0) return; fseek(file, 4L, SEEK_CUR); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "auds", 4)!=0) return; */ /* Now we're in the audio stream header */ /* TODO: extract some information about audio stream encoding */ } --- NEW FILE: mpeg.c --- /* MPEG-1/MPEG-2 parsing module for the Bitzi Bitcollider video plugin * * (PD) 2002 Mark Nelson [delirium] <del...@ru...> * Please see file COPYING or http://bitzi.com/publicdomain for more * information. * * The primary references used for the MPEG-1/2 stream formats were: * http://www.andrewduncan.ws/MPEG/MPEG-1_Picts.html and * http://www.andrewduncan.ws/MPEG/MPEG-2_Picts.html */ #include "video.h" /* Returns 1 or 2 to indicate MPEG-1 or MPEG-2 * * Most MPEG data is stored in bits not necessarily aligned on byte boundaries; * bits are ordered most-significant first, so big-endian of a sort. * Block sizes only count bytes after the block size integer. */ int parse_mpeg(FILE *file, Data *data) { int version = 0; /* MPEG-1/2; our return value */ uint32 temp; /* First check if this is a Program stream (multiplexed audio/video), * and handle Pack header if so */ temp = fread_be(file, 4); if(temp == 0x000001BA) { /* Figure out if this is an MPEG-1 or MPEG-2 program */ temp = (uint32) fgetc(file); if((temp & 0xF0) == 0x20) /* binary 0010 xxxx */ version = 1; else if((temp & 0xC0) == 0x40) /* binary 01xx xxxx */ version = 2; else return 0; if(version == 1) { fseek(file, 4L, SEEK_CUR); data->bitrate = (unsigned int) round_double((double)((fread_be(file, 3) & 0x7FFFFE) >> 1) * 0.4); } else { fseek(file, 5L, SEEK_CUR); data->bitrate = (unsigned int) round_double((double)((fread_be(file, 3) & 0xFFFFFC) >> 2) * 0.4); temp = fgetc(file) & 0x07; /* stuffing bytes */ if(temp != 0) fseek(file, (long) temp, SEEK_CUR); } /* Skip any other blocks we find until we get to a video stream, which * might be within a 2nd PACK */ temp = fread_be(file, 4); while(temp != 0x000001BA && temp != 0x000001E0) { if(feof(file)) /* shouldn't happen */ return version; if(temp == 0x00000000) /* Skip past zero padding */ { while((temp & 0xFFFFFF00) != 0x00000100) { if(feof(file)) return version; /* shouldn't happen here either */ temp <<= 8; temp |= fgetc(file); } } else { temp = fread_be(file, 2); fseek(file, (long) temp, SEEK_CUR); temp = fread_be(file, 4); } } /* Now read byte by byte until we find the 0x000001B3 instead of actually * parsing (due to too many variations). Theoretically this could mean * we find 0x000001B3 as data inside another packet, but that's extremely * unlikely, especially since the sequence header should not be far */ temp = fread_be(file, 4); while(temp != 0x000001B3) { if(feof(file)) /* No seq. header; shouldn't happen */ return version; temp <<= 8; temp |= fgetc(file); } } else /* video stream only */ fseek(file, 4L, SEEK_SET); /* Now we're just past the video sequence header start code */ temp = fread_be(file, 3); data->width = (temp & 0xFFF000) >> 12; data->height = temp & 0x000FFF; switch(fgetc(file) & 0x0F) { case 1: /* 23.976 fps */ case 2: /* 24 fps */ data->fps = 24; break; case 3: /* 25 fps */ data->fps = 25; break; case 4: /* 29.97 fps */ case 5: /* 30 fps */ data->fps = 30; break; case 6: /* 50 fps */ data->fps = 50; break; case 7: /* 59.94 fps */ case 8: /* 60 fps */ data->fps = 60; break; } if(data->bitrate == 0) /* if this is a video-only stream, */ { /* get bitrate from here */ temp = (fread_be(file, 3) & 0xFFFFC0) >> 6; if(temp != 0x3FFFF) /* variable bitrate */ data->bitrate = (unsigned int) round_double((double) temp * 0.4); } else fseek(file, 3L, SEEK_CUR); /* If MPEG-2 or don't know yet, look for the sequence header extension */ if(version != 1) { /* Skip past rest of sequence header and 64-byte matrices (if any) */ temp = fgetc(file); if(temp & 0x02) { fseek(file, 63L, SEEK_CUR); temp = fgetc(file); } if(temp & 0x01) fseek(file, 64L, SEEK_CUR); temp = fread_be(file, 4); if(temp == 0x000001B5) { if(version == 0) version = 2; fseek(file, 1L, SEEK_CUR); /* extensions specify MSBs of width/height */ temp = fread_be(file, 2); data->width |= (temp & 0x0180) << 5; data->height |= (temp & 0x0060) << 7; fseek(file, 2L, SEEK_CUR); /* and a numerator/denominator multiplier for fps */ temp = fgetc(file); if((temp & 0x60) && (temp & 0x1F)) data->fps = (unsigned int) round_double((double)data->fps * (temp & 0x60)/(temp & 0x1F)); } else if(version == 0) version = 1; } return version; } --- NEW FILE: quicktime.c --- /* QuickTime parsing module for the Bitzi Bitcollider video plugin * * (PD) 2002 Mark Nelson [delirium] <del...@ru...> * Please see file COPYING or http://bitzi.com/publicdomain for more * information. * * The primary reference for the QuickTime file format is: * http://developer.apple.com/techpubs/quicktime/qtdevdocs/QTFF/qtff.html */ #include "video.h" /* QuickTime uses big-endian ordering, and block ("atom") lengths include the * entire atom, including the fourcc specifying atom type and the length * integer itself. */ void parse_quicktime(FILE *file, Data *data) { char fourcc[5]; unsigned blockLen; unsigned subBlockLen; unsigned subSubBlockLen; unsigned timescale; long blockStart; long subBlockStart; long subSubBlockStart; fseek(file, 4L, SEEK_SET); fread(fourcc, sizeof(char), 4, file); /* If data is first, header's at end of file, so skip to it */ if(memcmp(fourcc, "mdat", 4)==0) { fseek(file, 0L, SEEK_SET); blockLen = fread_be(file, 4); fseek(file, (long) (blockLen + 4), SEEK_SET); fread(fourcc, sizeof(char), 4, file); } if(memcmp(fourcc, "moov", 4)!=0) return; blockStart = ftell(file); blockLen = fread_be(file, 4); /* mvhd length */ fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "mvhd", 4)!=0) return; /* Now we're at the start of the movie header */ /* 20: time scale (time units per second) (4 bytes) */ fseek(file, blockStart + 20, SEEK_SET); timescale = fread_be(file, 4); /* 24: duration in time units (4 bytes) */ data->duration = (unsigned int) round_double((double) fread_be(file, 4) / timescale * 1000); /* Skip the rest of the mvhd */ fseek(file, blockStart + blockLen, SEEK_SET); /* Find and parse trak atoms */ while(!feof(file)) { unsigned int width, height; /* Find the next trak atom */ blockStart = ftell(file); blockLen = fread_be(file, 4); /* trak (or other atom) length */ fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "trak", 4)!=0) /* If it's not a trak atom, skip it */ { if(!feof(file)) fseek(file, blockStart + blockLen, SEEK_SET); continue; } subBlockStart = ftell(file); subBlockLen = fread_be(file, 4); /* tkhd length */ fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "tkhd", 4)!=0) return; /* Now in the track header */ /* 84: width (2 bytes) */ fseek(file, subBlockStart + 84, SEEK_SET); width = fread_be(file, 2); /* 88: height (2 bytes) */ fseek(file, subBlockStart + 88, SEEK_SET); height = fread_be(file, 2); /* Note on above: Apple's docs say that width/height are 4-byte integers, * but all files I've seen have the data stored in the high-order two * bytes, with the low-order two being 0x0000. Interpreting it the * "official" way would make width/height be thousands of pixels each. */ /* Skip rest of tkhd */ fseek(file, subBlockStart + subBlockLen, SEEK_SET); /* Find mdia atom for this trak */ subBlockStart = ftell(file); subBlockLen = fread_be(file, 4); fread(fourcc, sizeof(char), 4, file); while(memcmp(fourcc, "mdia", 4)!=0) { fseek(file, subBlockStart + subBlockLen, SEEK_SET); subBlockStart = ftell(file); subBlockLen = fread_be(file, 4); fread(fourcc, sizeof(char), 4, file); } /* Now we're in the mdia atom; first sub-atom should be mdhd */ subSubBlockStart = ftell(file); subSubBlockLen = fread_be(file, 4); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "mdhd", 4)!=0) return; /* TODO: extract language from the mdhd? For now skip to hdlr. */ fseek(file, subSubBlockStart + subSubBlockLen, SEEK_SET); subSubBlockStart = ftell(file); subSubBlockLen = fread_be(file, 4); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "hdlr", 4)!=0) return; /* 12: Component type: "mhlr" or "dhlr"; we only care about mhlr, * which should (?) appear first */ fseek(file, subSubBlockStart + 12, SEEK_SET); fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "mhlr", 4)!=0) return; fread(fourcc, sizeof(char), 4, file); if(memcmp(fourcc, "vide", 4)==0) /* This is a video trak */ { data->height = height; data->width = width; } /* Skip rest of the trak */ fseek(file, blockStart + blockLen, SEEK_SET); } } --- NEW FILE: video.c --- /* Bitzi Bitcollider video plugin * * (PD) 2002 Mark Nelson [delirium] <del...@ru...> * Please see file COPYING or http://bitzi.com/publicdomain * for more info. * * Currently supported: AVI, QuickTime, MPEG-1, MPEG-2 * (types are detected by headers, not by extension, since many files on * the internet have the wrong extension) * * Revision history: * v0.0.1 - 12 Jan 2002 - Initial version; preliminary AVI support. * v0.1.0 - 19 Aug 2002 - Complete rewrite, now supports AVI/QT/MPEG-1/MPEG-2 */ #include "video.h" /* --- Prototypes for externally-called plugin functions --- */ PluginMethods *init_plugin(void); static void video_shutdown_plugin(void); static void video_free_attributes(Attribute *attrList); static SupportedFormat *video_get_supported_formats(void); static const char *video_get_name(void); static const char *video_get_version(void); static char *video_get_error(void); static Attribute *video_file_analyze(const char *fileName); /* --- Initialize plugin information --- */ static SupportedFormat formats[] = { { ".AVI", "Microsoft AVI" }, { ".MOV", "Apple QuickTime" }, { ".MPG", "MPEG-1" }, { ".MPEG", "MPEG-1" }, { ".M2V", "MPEG-2" }, { NULL, NULL } }; static char *errorString = NULL; static PluginMethods methods = { video_shutdown_plugin, video_get_version, video_get_name, video_get_supported_formats, video_file_analyze, NULL, /* no init/update/final */ NULL, NULL, video_free_attributes, video_get_error }; /* --- Externally-called Plugin Functions --- */ PluginMethods *init_plugin(void) { return &methods; } static void video_shutdown_plugin(void) { if (errorString) free(errorString); } static const char *video_get_version(void) { return PLUGIN_VERSION; } static const char *video_get_name(void) { return PLUGIN_NAME; } static SupportedFormat *video_get_supported_formats(void) { return formats; } static Attribute *video_file_analyze(const char *fileName) { FILE *file; Attribute *attrList; int numAttrs; int attr; int version; char temp[100]; /* Used for sprintf()'ing values to */ char fmt[10] = ""; Format format; Data data; data.width = 0; data.height = 0; data.fps = 0; data.duration = 0; data.bitrate = 0; data.codec = NULL; file = fopen(fileName, "rb"); if(file == NULL) return NULL; format = find_format(file); switch(format) { case AVI: parse_avi(file, &data); strcpy(fmt, "AVI"); break; case QUICKTIME: parse_quicktime(file, &data); strcpy(fmt, "QuickTime"); break; case MPEG: version = parse_mpeg(file, &data); if(version == 1) strcpy(fmt, "MPEG-1"); else if(version == 2) strcpy(fmt, "MPEG-2"); break; case UNKNOWN: /* this is only here to quiet compiler warnings */ } /* If necessary, use filesize to estimate bitrate from duration * or vice versa */ if(data.bitrate == 0 && data.duration != 0) { fseek(file, 0L, SEEK_END); data.bitrate = (unsigned int) round_double((double) ftell(file) / data.duration * 8); } else if(data.duration == 0 && data.bitrate != 0) { fseek(file, 0L, SEEK_END); data.duration = (unsigned int) round_double((double) ftell(file) / data.bitrate * 8); } fclose(file); /* Figure out how many attributes we collected (everything not 0/NULL/"" */ numAttrs = (strcmp(fmt, "") != 0) + (data.width != 0) + (data.height != 0) + (data.fps != 0) + (data.duration != 0) + (data.bitrate != 0) + (data.codec != NULL); if(numAttrs == 0) return NULL; /* Allocate space for all the attributes plus a NULL/NULL sentinel pair */ attrList = malloc(sizeof(Attribute) * (numAttrs + 1)); /* Return the attributes we collected */ attr = 0; if(strcmp(fmt, "") != 0) { attrList[attr].key = strdup("tag.video.format"); attrList[attr].value = strdup(fmt); attr++; } if(data.width != 0) { sprintf(temp, "%u", data.width); attrList[attr].key = strdup("tag.video.width"); attrList[attr].value = strdup(temp); attr++; } if(data.height != 0) { sprintf(temp, "%u", data.height); attrList[attr].key = strdup("tag.video.height"); attrList[attr].value = strdup(temp); attr++; } if(data.fps != 0) { sprintf(temp, "%u", data.fps); attrList[attr].key = strdup("tag.video.fps"); attrList[attr].value = strdup(temp); attr++; } if(data.duration != 0) { sprintf(temp, "%u", data.duration); attrList[attr].key = strdup("tag.video.duration"); attrList[attr].value = strdup(temp); attr++; } if(data.bitrate != 0) { sprintf(temp, "%u", data.bitrate); attrList[attr].key = strdup("tag.video.bitrate"); attrList[attr].value = strdup(temp); attr++; } if(data.codec != NULL) { attrList[attr].key = strdup("tag.video.codec"); attrList[attr].value = data.codec; attr++; } attrList[attr].key = NULL; attrList[attr].value = NULL; return attrList; } static void video_free_attributes(Attribute *attrList) { int i = 0; while(attrList[i].key != NULL) { free(attrList[i].key); free(attrList[i].value); i++; } free(attrList); } static char *video_get_error(void) { return errorString; } /* --- Classify file format --- */ Format find_format(FILE *file) { unsigned char buffer[HEAD_BUFFER]; /* Read start of the file into a buffer, so we don't have to * keep re-reading for each file-format check. */ if(fread(buffer, sizeof(char), HEAD_BUFFER, file) != HEAD_BUFFER) return UNKNOWN; rewind(file); /* AVI signature: "RIFF____AVI " */ if(memcmp(buffer, "RIFF", 4)==0 && memcmp(buffer+8, "AVI ", 4)==0) return AVI; /* QuickTime signature: "____moov" or "____mdat" */ else if(memcmp(buffer+4, "moov", 4)==0 || memcmp(buffer+4, "mdat", 4)==0) return QUICKTIME; /* MPEG signature: 0x000001B3 or 0x000001BA */ else if(buffer[0]==0x00 && buffer[1]==0x00 && buffer[2]==0x01 && (buffer[3]==0xB3 || buffer[3]==0xBA)) return MPEG; return UNKNOWN; } /* --- Utility functions --- */ /* We implement our own rounding function, because the availability of * C99's round(), nearbyint(), rint(), etc. seems to be spotty, whereas * floor() is available in math.h on all C compilers. */ double round_double(double num) { return floor(num + 0.5); } /* Read the specified number of bytes as a little-endian (least * significant byte first) integer. * Note: bytes must be less than the byte width of "unsigned long int" * on your platform (e.g. 8 for 32-bit systems). */ unsigned long int fread_le(FILE *file, int bytes) { int x; unsigned long int result = 0; for(x=0; x < bytes; x++) result |= getc(file) << (x*8); return result; } /* Same as above, but big-endian (most significant byte first) ordering */ unsigned long int fread_be(FILE *file, int bytes) { int x; unsigned long int result = 0; for(x=bytes-1; x >= 0; x--) result |= getc(file) << (x*8); return result; } --- NEW FILE: video.h --- /* Header file for the Bitzi Bitcollider video plugin * * (PD) 2002 Mark Nelson [delirium] <del...@ru...> * Please see file COPYING or http://bitzi.com/publicdomain for more * information. */ #ifndef VIDEO_H #define VIDEO_H #include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <errno.h> #include <math.h> #include "plugin.h" #define PLUGIN_VERSION "0.1.0" #define PLUGIN_NAME "Video metadata (AVI, QuickTime, MPEG-1, MPEG-2)" #define HEAD_BUFFER 12 /* We must be able to determine * file format using this many bytes * from the beginning of the file */ /* 32-bit-specific definitions of portable data types */ typedef unsigned int uint32; /* The various formats we support. */ typedef enum { UNKNOWN, AVI, /* Microsoft AVI */ QUICKTIME, /* Apple QuickTime (MOV) */ MPEG /* MPEG 1 or 2 */ } Format; /* Wrap the metadata we're collecting into a struct for easy passing */ typedef struct { unsigned int width; /* width in pixels */ unsigned int height; /* height in pixels */ unsigned int fps; /* frames per second */ unsigned int duration; /* duration in milliseconds */ unsigned int bitrate; /* bitrate in kbps */ char *codec; /* video compression codec */ } Data; /* local prototypes */ Format find_format(FILE *file); void parse_avi(FILE *file, Data *data); void parse_quicktime(FILE *file, Data *data); int parse_mpeg(FILE *file, Data *data); double round_double(double num); unsigned long int fread_le(FILE *file, int bytes); unsigned long int fread_be(FILE *file, int bytes); #endif |
From: Mike L. <mli...@us...> - 2002-09-16 20:45:35
|
Update of /cvsroot/bitcollider/bitcollider In directory usw-pr-cvs1:/tmp/cvs-serv31002 Modified Files: configure.in Makefile.am Log Message: Delirium's video plugin Index: configure.in =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/configure.in,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** configure.in 5 Dec 2001 18:43:52 -0000 1.13 --- configure.in 16 Sep 2002 20:45:32 -0000 1.14 *************** *** 64,66 **** AM_CONFIG_HEADER(config.h) AC_CONFIG_SUBDIRS(libltdl) ! AC_OUTPUT(Makefile lib/Makefile src/Makefile vorbis/Makefile wav/Makefile image/Makefile, echo timestamp > stamp-h) --- 64,66 ---- AM_CONFIG_HEADER(config.h) AC_CONFIG_SUBDIRS(libltdl) ! AC_OUTPUT(Makefile lib/Makefile src/Makefile vorbis/Makefile wav/Makefile image/Makefile video/Makefile, echo timestamp > stamp-h) Index: Makefile.am =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** Makefile.am 10 Oct 2001 23:25:48 -0000 1.11 --- Makefile.am 16 Sep 2002 20:45:32 -0000 1.12 *************** *** 7,11 **** AUTOMAKE_OPTIONS = foreign ! SUBDIRS = libltdl lib src @VORBIS_SUB@ wav image cvsclean: distclean --- 7,11 ---- AUTOMAKE_OPTIONS = foreign ! SUBDIRS = libltdl lib src @VORBIS_SUB@ wav image video cvsclean: distclean |
From: Mike L. <mli...@us...> - 2002-09-16 20:42:34
|
Update of /cvsroot/bitcollider/bitcollider/video In directory usw-pr-cvs1:/tmp/cvs-serv30043/video Log Message: Directory /cvsroot/bitcollider/bitcollider/video added to the repository |
From: Robert K. <may...@us...> - 2002-07-08 20:18:09
|
Update of /cvsroot/bitcollider/bitcollider/installer In directory usw-pr-cvs1:/tmp/cvs-serv11151/installer Modified Files: bc-setup.wse Log Message: Updated for 0.4.0 Index: bc-setup.wse =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/installer/bc-setup.wse,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** bc-setup.wse 12 Oct 2001 22:01:15 -0000 1.7 --- bc-setup.wse 8 Jul 2002 20:18:06 -0000 1.8 *************** *** 1,5 **** Document Type: WSE item: Global ! Version=8.13 Title=Bitzi's Bitcollider Installation Flags=00010100 --- 1,5 ---- Document Type: WSE item: Global ! Version=8.14 Title=Bitzi's Bitcollider Installation Flags=00010100 *************** *** 35,39 **** Variable Flags2=00001000 Variable Name3=_WISE_ ! Variable Default3=D:\Program Files\Wise InstallBuilder 8.1 Variable Flags3=00001000 end --- 35,39 ---- Variable Flags2=00001000 Variable Name3=_WISE_ ! Variable Default3=C:\Program Files\Wise InstallBuilder 8.1 Variable Flags3=00001000 end *************** *** 1210,1218 **** item: Include Script Pathname=%_WISE_%\INCLUDE\uninstal.wse - end - item: Install File - Source=d:\db-3.3.11\build_win32\Release\libdb33.dll - Destination=%MAINDIR%\libdb33.dll - Flags=0000000010000011 end item: Install File --- 1210,1213 ---- |
From: Robert K. <may...@us...> - 2002-07-08 20:18:09
|
Update of /cvsroot/bitcollider/bitcollider/win32 In directory usw-pr-cvs1:/tmp/cvs-serv11151/win32 Modified Files: bc_dll.dsp Log Message: Updated for 0.4.0 Index: bc_dll.dsp =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/win32/bc_dll.dsp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** bc_dll.dsp 12 Oct 2001 23:07:42 -0000 1.15 --- bc_dll.dsp 8 Jul 2002 20:18:07 -0000 1.16 *************** *** 5,9 **** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! CFG=BC_DLL - WIN32 DEBUG WITH BDB !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run --- 5,9 ---- # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! CFG=bc_dll - Win32 Release !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run *************** *** 14,18 **** !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE ! !MESSAGE NMAKE /f "bc_dll.mak" CFG="BC_DLL - WIN32 DEBUG WITH BDB" !MESSAGE !MESSAGE Possible choices for configuration are: --- 14,18 ---- !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE ! !MESSAGE NMAKE /f "bc_dll.mak" CFG="bc_dll - Win32 Release" !MESSAGE !MESSAGE Possible choices for configuration are: *************** *** 44,48 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I "..\include" /I "..\..\db\build_win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /D "USE_BDB" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 44,48 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\include" /I "..\include" /I "..\..\db\build_win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 70,74 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\include" /I "..\..\db\build_win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /D "USE_BDB" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 70,74 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /YX /FD /GZ /c ! # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\..\\" /I "..\..\include" /I "..\include" /I "..\..\db\build_win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BC_DLL_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 *************** *** 102,105 **** --- 102,114 ---- SOURCE=..\lib\cache.c + + !IF "$(CFG)" == "bc_dll - Win32 Release" + + # PROP Exclude_From_Build 1 + + !ELSEIF "$(CFG)" == "bc_dll - Win32 Debug" + + !ENDIF + # End Source File # Begin Source File *************** *** 109,112 **** --- 118,129 ---- # Begin Source File + SOURCE=..\lib\ed2k_md4.c + # End Source File + # Begin Source File + + SOURCE=..\lib\ftuuhash.c + # End Source File + # Begin Source File + SOURCE=..\lib\gui_win32.c # End Source File *************** *** 155,158 **** --- 172,176 ---- SOURCE=..\libdb33.lib + # PROP Exclude_From_Build 1 # End Source File # End Group |
From: Robert K. <may...@us...> - 2002-07-08 20:18:09
|
Update of /cvsroot/bitcollider/bitcollider/bcshellext In directory usw-pr-cvs1:/tmp/cvs-serv11151/bcshellext Modified Files: bcshellext_p.c Log Message: Updated for 0.4.0 Index: bcshellext_p.c =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/bcshellext/bcshellext_p.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** bcshellext_p.c 1 Aug 2001 21:21:56 -0000 1.11 --- bcshellext_p.c 8 Jul 2002 20:18:06 -0000 1.12 *************** *** 3,7 **** /* File created by MIDL compiler version 5.01.0164 */ ! /* at Tue Jul 31 16:17:56 2001 */ /* Compiler settings for D:\bitzi\bitcollider\bcshellext\bcshellext.idl: --- 3,7 ---- /* File created by MIDL compiler version 5.01.0164 */ ! /* at Mon Jul 08 13:05:50 2002 */ /* Compiler settings for D:\bitzi\bitcollider\bcshellext\bcshellext.idl: |
From: Robert K. <may...@us...> - 2002-07-08 19:40:01
|
Update of /cvsroot/bitcollider/bitcollider/misc In directory usw-pr-cvs1:/tmp/cvs-serv31875a/misc Modified Files: bitcollider.spec Log Message: Updated version numbers and such... Index: bitcollider.spec =================================================================== RCS file: /cvsroot/bitcollider/bitcollider/misc/bitcollider.spec,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** bitcollider.spec 14 Jan 2002 20:32:59 -0000 1.7 --- bitcollider.spec 8 Jul 2002 19:39:57 -0000 1.8 *************** *** 6,10 **** # %define name bitcollider ! %define version 0.3.4 %define release 1 %define prefix /usr --- 6,10 ---- # %define name bitcollider ! %define version 0.4.0 %define release 1 %define prefix /usr |