pax_global_header00006660000000000000000000000064110213324240014502gustar00rootroot0000000000000052 comment=53fd349760a3fb4b65d3b097dd385f9d82eb91e5 vstream-client-1.2/000077500000000000000000000000001102133242400143015ustar00rootroot00000000000000vstream-client-1.2/Makefile000066400000000000000000000013321102133242400157400ustar00rootroot00000000000000include config.mak LIBNAME = libvstream-client.a SRCS = mfs.c object.c schema.c query.c util.c io.c partition.c crc.c vstream.c INSTALL = install OBJS = $(SRCS:.c=.o) INCLUDE = -I.. LDFLAGS += $(SOCKLIB) CFLAGS += $(INCLUDE) all: $(LIBNAME) vstream-client install: $(LIBNAME) vstream-client $(INSTALL) -m 755 vstream-client $(BINDIR)/vstream-client $(INSTALL) -m 644 $(LIBNAME) $(LIBDIR)/$(LIBNAME) $(INSTALL) -m 644 vstream-client.h $(INCDIR)/vstream-client.h .c.o: $(CC) -c $(CFLAGS) -o $@ $< $(LIBNAME): $(OBJS) $(AR) r $(LIBNAME) $(OBJS) vstream-client: $(LIBNAME) test-client.c $(CC) $(CFLAGS) test-client.c $(LIBNAME) -o vstream-client $(LDFLAGS) clean: rm -f *.o *.a *~ vstream-client vstream-client.exe vstream-client-1.2/configure000077500000000000000000000053331102133242400162140ustar00rootroot00000000000000#! /bin/sh # if any of it looks familiar, I stole it from MPlayer. for parm in "$@" ; do if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then cat << EOF Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit Compile System: --no-cygwin compile on cygwin with mingw runtime --enable-debug compile with debugging symbols --with-socklib=LIB specify the socket library to link against (if any) Installation directories: --prefix=DIR use this prefix for installation [/usr/local] --bindir=DIR use this prefix for installing binaries [PREFIX/bin] --incdir=DIR use this prefix for installing headers [PREFIX/include] --docdir=DIR use this prefix for installing docs [PREFIX/share/doc] --libdir=DIR use this prefix for object code libraries [PREFIX/lib] EOF exit 0 fi done # for parm in ... _prefix="/usr/local" _no_cygwin=no _debug=no for ac_option do case "$ac_option" in --enable-debug) _debug=yes ;; --no-cygwin) _no_cygwin=yes ;; --prefix=*) _prefix=`echo $ac_option | cut -d '=' -f 2` ;; --bindir=*) _bindir=`echo $ac_option | cut -d '=' -f 2` ;; --incdir=*) _incdir=`echo $ac_option | cut -d '=' -f 2` ;; --docdir=*) _docdir=`echo $ac_option | cut -d '=' -f 2` ;; --libdir=*) _libdir=`echo $ac_option | cut -d '=' -f 2` ;; --with-socklib=*) _socklib=`echo $ac_option | cut -d '=' -f 2` ;; *) echo "Unknown parameter: $ac_option" exit 1 ;; esac done test -z "$_bindir" && _bindir="$_prefix/bin" test -z "$_incdir" && _incdir="$_prefix/include" test -z "$_docdir" && _docdir="$_prefix/share/doc" test -z "$_libdir" && _libdir="$_prefix/lib" if test -z "$CFLAGS" ; then CFLAGS="-O2" fi if test "$_debug" = "yes"; then CFLAGS="$CFLAGS -g -Wall" fi _cygwin=`uname -s | grep -i cygwin`; _mingw=`uname -s | grep -i mingw`; if test "$_cygwin" != "" && test "$_no_cygwin" = "yes"; then _mingw=yes CFLAGS="$CFLAGS -mno-cygwin" LDFLAGS="$LDFLAGS -mno-cygwin -enable-stdcall-fixup" fi if test "$_mingw" != "" && test -z "$_socklib"; then _socklib="-lws2_32" fi ############################################################################# echo "Creating config.mak" cat > config.mak << EOF # -------- Generated by configure ----------- BINDIR = $_bindir LIBDIR = $_libdir INCDIR = $_incdir DOCDIR = $_docdir D_BINDIR = \$(DESTDIR)\$(BINDIR) D_LIBDIR = \$(DESTDIR)\$(LIBDIR) D_INCDIR = \$(DESTDIR)\$(INCDIR) D_DOCDIR = \$(DESTDIR)\$(DOCDIR) CFLAGS = $CFLAGS LDFLAGS = $LDFLAGS CYGWIN = $_cygwin MINGW = $_mingw SOCKLIB = $_socklib EOF echo "Config files successfully generated by ./configure !" vstream-client-1.2/crc.c000066400000000000000000000165261102133242400152260ustar00rootroot00000000000000#include "mfs.h" /* * Crc - 32 BIT ANSI X3.66 CRC checksum files */ /* * Copyright (C) 1986 Gary S. Brown. You may use this program, or * code or tables extracted from it, as desired without restriction. */ /* First, the polynomial itself and its table of feedback terms. The */ /* polynomial is */ /* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */ /* Note that we take it "backwards" and put the highest-order term in */ /* the lowest-order bit. The X^32 term is "implied"; the LSB is the */ /* X^31 term, etc. The X^0 term (usually shown as "+1") results in */ /* the MSB being 1. */ /* Note that the usual hardware shift register implementation, which */ /* is what we're using (we're merely optimizing it by doing eight-bit */ /* chunks at a time) shifts bits into the lowest-order term. In our */ /* implementation, that means shifting towards the right. Why do we */ /* do it this way? Because the calculated CRC must be transmitted in */ /* order from highest-order term to lowest-order term. UARTs transmit */ /* characters in order from LSB to MSB. By storing the CRC this way, */ /* we hand it to the UART in the order low-byte to high-byte; the UART */ /* sends each low-bit to hight-bit; and the result is transmission bit */ /* by bit from highest- to lowest-order term without requiring any bit */ /* shuffling on our part. Reception works similarly. */ /* The feedback terms table consists of 256, 32-bit entries. Notes: */ /* */ /* 1. The table can be generated at runtime if desired; code to do so */ /* is shown later. It might not be obvious, but the feedback */ /* terms simply represent the results of eight shift/xor opera- */ /* tions for all combinations of data and CRC register values. */ /* */ /* 2. The CRC accumulation logic is the same for all CRC polynomials, */ /* be they sixteen or thirty-two bits wide. You simply choose the */ /* appropriate table. Alternatively, because the table can be */ /* generated at runtime, you can start by generating the table for */ /* the polynomial in question and use exactly the same "updcrc", */ /* if your application needn't simultaneously handle two CRC */ /* polynomials. (Note, however, that XMODEM is strange.) */ /* */ /* 3. For 16-bit CRCs, the table entries need be only 16 bits wide; */ /* of course, 32-bit entries work OK if the high 16 bits are zero. */ /* */ /* 4. The values must be right-shifted by eight bits by the "updcrc" */ /* logic; the shift must be unsigned (bring in zeroes). On some */ /* hardware you could probably optimize the shift in assembler by */ /* using byte-swap instructions. */ static long crc32tab[] = { /* CRC polynomial 0xedb88320 */ 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 }; /* * updcrc macro derived from article Copyright (C) 1986 Stephen Satchell. * NOTE: First argument must be in range 0 to 255. * Second argument is referenced twice. * * Programmers may incorporate any or all code into their programs, * giving proper credit within the source. Publication of the * source routines is permitted so long as proper credit is given * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg, * Omen Technology. */ /* #define UPDC32(octet, crc) (crc32tab[((int)(crc) ^ octet) & 0xff] ^ (((crc) >> 8) & 0x00FFFFFF)) */ #define UPDC32(octet, crc) (crc32tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8)) static u32 crc32(const unsigned char *bytes,int length) { int i; unsigned ret; for (ret=0,i=0;i #endif int vstream_check_crc(void *buf, int length, u32 *crc) { u32 crc_saved = ntohl(*crc); u32 new; *crc = htonl(MFS_CRC_BASE); new = crc32(buf, length); if (new != crc_saved) { vstream_error("crc mismatch len=%d 0x%08x 0x%08x\n", length, crc_saved, new); } *crc = htonl(crc_saved); return new == crc_saved ? 1 : 0; } vstream-client-1.2/io.c000066400000000000000000000051361102133242400150610ustar00rootroot00000000000000/* media-filesystem library, io routines tridge@samba.org, January 2001 released under the Gnu GPL v2 */ #include "mfs.h" static int readahead_enabled = 0; static int vserver = -1; static int need_bswap = 0; void vstream_mfs_readahead(int set) { readahead_enabled = set; } static void vserver_read_req(u32 sec, u32 count) { struct vserver_cmd cmd; cmd.command = htonl(MFS_CMD_READ); cmd.param1 = htonl(sec); cmd.param2 = htonl(count); vstream_write_all(vserver, &cmd, sizeof(cmd)); } static void vserver_receive(void *buf, u32 count) { count <<= SECTOR_SHIFT; vstream_read_all(vserver, buf, count); } #define RA_BLOCKS 256 #define RA_MIN 256 void vserver_vstream_read_sectors(void *buf, u32 sec, u32 count) { static struct mfs_run readahead; u32 discard, coming; if (count == 0) return; discard = coming = 0; if (sec >= readahead.start && sec < readahead.start + readahead.len) { discard = sec - readahead.start; coming = readahead.len - discard; if (coming <= count) { readahead.len = 0; } else { readahead.start = sec + count; readahead.len -= discard + count; } } else { discard = readahead.len; coming = 0; readahead.len = 0; } if (coming < count) { u32 nreq = count - coming; if (readahead_enabled && nreq < RA_BLOCKS) { readahead.start = sec + count; readahead.len = RA_BLOCKS - nreq; nreq = RA_BLOCKS; } vserver_read_req(sec + coming, nreq); } if (readahead.len <= RA_MIN && readahead_enabled) { if (readahead.len == 0) readahead.start = sec + count; vserver_read_req(readahead.start + readahead.len, RA_BLOCKS); readahead.len += RA_BLOCKS; } if (discard) { void *buf2 = malloc(discard << SECTOR_SHIFT); vserver_receive(buf2, discard); free(buf2); } vserver_receive(buf, count); if (need_bswap) { u16 *v = (u16 *)buf; int i; for (i=0;i= SECTOR_SIZE) { u32 n = size / SECTOR_SIZE; vserver_vstream_read_sectors(buf, sec, n); buf += n*SECTOR_SIZE; size -= n*SECTOR_SIZE; sec += n; } if (size == 0) return; vserver_vstream_read_sectors(tmp, sec, 1); memcpy(buf, tmp, size); } void vstream_set_socket_fd(int fd) { vserver = fd; } int vstream_open_socket(char *addy) { if (vserver < 0) vserver = vstream_vstream_open_socket_out(addy, VSERVER_PORT); if (vserver < 0) { vstream_error("Failed to connect to %s\n", addy); return 1; } return 0; } vstream-client-1.2/mfs.c000066400000000000000000000207661102133242400152450ustar00rootroot00000000000000/* media-filesystem library tridge@samba.org, January 2001 released under the Gnu GPL v2 */ #include "mfs.h" static struct mfs_super super; static struct mfs_zone_map *zones[MAX_ZONES]; static int num_zones = 0; static int total_inodes = 0; unsigned vstream_fsid_hash(unsigned fsid, unsigned size) { return fsid*67289 % size; } // returns 1 on failure int load_super(void) { char buffer[100*SECTOR_SIZE]; vstream_mfs_read_partial(&super, 0, sizeof(super)); if ((super.state & 0xffff) == 0x1492 || (super.state & 0xffff) == 0x9214) { if ((super.state & 0xffff) == 0x1492) vstream_io_need_bswap(1); if (vstream_partition_parse()) return 1; vstream_mfs_read_partial(&super, 0, sizeof(super)); } switch (super.magic) { case 0xabbafeed: /* normal tivo access */ break; case 0xbaabedfe: vstream_io_need_bswap(1); break; case 0xedfebaab: break; case 0xfeedabba: vstream_io_need_bswap(1); break; default: vstream_error("Not a TiVo super block! (magic=0x%08x)\n", super.magic); return 1; } vstream_mfs_read_partial(buffer, 0, sizeof(super)); memcpy(&super, buffer, sizeof(super)); vstream_check_crc((void *)&super, sizeof(super) - 512, &super.crc); vstream_byte_swap(&super, "i9 b128 i87"); if (super.magic != 0xabbafeed) { vstream_error("Failed to byte swap correctly\n"); return 1; } if (vstream_partition_total_size() && vstream_partition_total_size() != super.total_sectors) { vstream_error("WARNING: total sectors doesn't match (total=%d sb=%d)\n", vstream_partition_total_size(), super.total_sectors); } return 0; } /* load the mfs zones - currently we only use the inode zone but might as well load the lot */ int load_zones(void) { u32 next = super.zonemap_ptr; u32 map_size = super.zonemap_size; total_inodes = 0; while (next) { zones[num_zones] = (struct mfs_zone_map *)malloc(SECTOR_SIZE*map_size); vserver_vstream_read_sectors(zones[num_zones], next, map_size); vstream_check_crc(zones[num_zones], map_size*SECTOR_SIZE, &zones[num_zones]->crc); vstream_byte_swap(zones[num_zones], "i18"); if (next != zones[num_zones]->sector) { vstream_error("sector wrong in zone (%d %d)\n", next, zones[num_zones]->sector); return 1; } if (zones[num_zones]->type == ZONE_INODE) { total_inodes += zones[num_zones]->zone_size/2; } next = zones[num_zones]->next_zonemap_ptr; map_size = zones[num_zones]->next_zonemap_size; num_zones++; if (num_zones == MAX_ZONES) { vstream_error("Too many zones\n"); return 1; } } return 0; } /* turn a hash into a zone sector */ static u32 zone_sector(u32 hash) { int i; u32 start = 0; for (i=0;itype != ZONE_INODE) continue; len = zones[i]->zone_size/2; if (hash < start + len) { return zones[i]->zone_start + (hash-start)*2; } start += len; } vstream_error("Didn't find hash %x in zones!\n", hash); return 0xffffffff; } /* load one inode by fsid - optimised to avoid repeats */ static int vstream_mfs_load_inode(int fsid, struct mfs_inode *inode) { static struct mfs_inode in; static u32 last_fsid; unsigned hash, hash1; if (fsid && fsid == last_fsid) { *inode = in; return 0; } hash1 = hash = vstream_fsid_hash(fsid, total_inodes); do { u32 zs = zone_sector(hash); if (zs == 0xffffffff) return 1; vstream_mfs_read_partial(&in, zs, sizeof(in)); vstream_byte_swap(&in, "i10 b2 s1 i4"); if (in.num_runs) { // cwingert There is more than 24 runs, so just use the // maximum space available // vstream_byte_swap(&in.u.runs[0], "i48"); vstream_byte_swap(&in.u.runs[0], "i112"); } hash = (hash+1) % total_inodes; } while ((in.flags & MFS_FLAGS_CHAIN) && in.id != fsid && hash != hash1); if (in.id != fsid) { vstream_error("ERROR: Didn't find fsid=%d!\n", fsid); return 1; } *inode = in; last_fsid = fsid; return 0; } /* read count bytes from a mfs file at offset ofs, returning the number of bytes read ofs must be on a sector boundary */ u32 vstream_mfs_fsid_pread(int fsid, void *buf, u64 ofs, u32 count) { struct mfs_inode inode; int i, n; u32 start; u32 ret=0; u32 sec = ofs >> SECTOR_SHIFT; u64 size; if (vstream_mfs_load_inode(fsid, &inode)) return 0; if (inode.num_runs == 0) { if (ofs >= inode.size) return 0; ret = count; if (ret > inode.size-ofs) { ret = inode.size-ofs; } memcpy(buf, inode.u.data, ret); return ret; } size = inode.size; if (inode.units == 0x20000) { size <<= 17; } if (ofs > size) return 0; if (ofs + count > size) { count = size-ofs; } while (count > 0) { void *buf2; u32 n2; start = 0; for (i=0; i>SECTOR_SHIFT; if (n > inode.u.runs[i].len-(sec-start)) { n = inode.u.runs[i].len-(sec-start); } buf2 = malloc(n< count) n2 = count; memcpy(buf, buf2, n2); free(buf2); buf += n2; sec += n; count -= n2; ret += n2; } return ret; } /* return the type of a fsid */ int vstream_mfs_fsid_type(int fsid) { struct mfs_inode inode; if (fsid == 0) return 0; memset(&inode, 0, sizeof(inode)); if (vstream_mfs_load_inode(fsid, &inode)) return 0; return inode.type; } /* return the number of bytes used by a fsid */ u64 vstream_mfs_fsid_size(int fsid) { struct mfs_inode inode; if (fsid == 0) return 0; if (vstream_mfs_load_inode(fsid, &inode)) return 0; switch (inode.units) { case 0: return inode.size; case 0x20000: return ((u64)inode.size) << 17; } vstream_error("ERROR: fsid=%d Unknown units %d\n", fsid, inode.units); return inode.size; } /* list a mfs directory - make sure you free with vstream_mfs_dir_free() */ struct mfs_dirent *mfs_dir(int fsid, u32 *count) { u32 *buf, *p; int n=0, i; int size = vstream_mfs_fsid_size(fsid); int dsize, dflags; struct mfs_dirent *ret; *count = 0; if (size < 4) return NULL; if (vstream_mfs_fsid_type(fsid) != MFS_TYPE_DIR) { vstream_error("fsid %d is not a directory\n", fsid); return NULL; } buf = (u32 *)malloc(size); vstream_mfs_fsid_pread(fsid, buf, 0, size); dsize = ntohl(buf[0]) >> 16; dflags = ntohl(buf[0]) & 0xFFFF; p = buf + 1; while ((int)(p-buf) < dsize/4) { u8 *s = ((char *)p)+4; p += s[0]/4; n++; } ret = malloc((n+1)*sizeof(*ret)); p = buf + 1; for (i=0;i #include #include #include #include #include #include #include #include #include #include #include #define MAX_ZONES 32 #define SECTOR_SIZE 512 #define SECTOR_SHIFT 9 #define ZONE_INODE 0 #define MFS_TYPE_DIR 4 #define MFS_TYPE_OBJ 8 #define MFS_TYPE_STREAM 2 #define MFS_TYPE_FILE 1 #define TYPE_INT 0 #define TYPE_STRING 1 #define TYPE_OBJECT 2 #define TYPE_FILE 3 #define MFS_FLAGS_CHAIN 0x80000000 #define MFS_FLAGS_PRIMARY 0x2000 #ifndef BLKGETSIZE #ifdef __i386__ #define BLKGETSIZE 0x1260 #else #define BLKGETSIZE 0x20001260 #endif #endif #ifndef O_LARGEFILE #define O_LARGEFILE 0x8000 #endif /* this sets what rounding of the number of blocks in a partition is done. I'm not totally sure, this is right - it oculd be 1024 */ #define MFS_BLOCK_ROUND 1024 #define VSERVER_PORT 8074 #include typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; #define MFS_CRC_BASE 0xdeadf00d #define MFS_ROOT_FSID 1 /* length = 232 */ struct mfs_super { u32 state; u32 magic; /* 0xabbafeed */ u32 crc; u32 fill1; u32 geom1; /* 16 */ u32 geom2; /* 1 */ u32 geom3; /* 64 */ u32 fill2[2]; /* unknown */ /* 0x24 */ char devlist[128]; /* 0xa4 */ u32 total_sectors; u32 fill3[7]; /* 0xc4 */ u32 zonemap_ptr; /* pointer to first zone map */ u32 backup_zonemap_ptr; /* backup pointer to first zone map */ u32 zonemap_size; /* size of first zone map (sectors) */ u32 fill4[3]; /* 0xd8 */ u32 next_fsid; /* the next available fsid to be allocated */ u32 fill5[2]; char junk[512]; /* ppchacker: hack, pad to avoid over-read */ }; struct mfs_zone_map { u32 sector; /* this sector */ u32 backup_sector; /* where our backup is */ u32 zonemap_size; /* how many sectors in this zone map */ u32 next_zonemap_ptr; u32 backup_next_zonemap_ptr; u32 next_zonemap_size; u32 fill2[2]; u32 type; u32 fill3; u32 crc; u32 zone_start; u32 next_zone_ptr1; u32 zone_size; u32 per_chunk; u32 fill4[2]; u32 buddy_size; /* how many orders in buddy maps */ u32 mapdata[0]; /* variable size */ }; struct mfs_run { u32 start; u32 len; }; struct mfs_inode { u32 id; u32 typexx; u32 fill1[3]; u32 units; u32 size; u32 fill2[3]; u8 type; u8 fill3; u16 fill4; u32 fill5[2]; u32 flags; u32 num_runs; union { // cwingert - There are possible more than 24 runs, just fill up // the data space // struct mfs_run runs[24]; struct mfs_run runs[56]; char data[452]; } u; }; struct mfs_dirent { u32 fsid; u8 type; char *name; }; struct mfs_obj_header { u32 fill1; u32 size; }; struct mfs_subobj_header { u16 len; u16 len1; /* hmmm, why the dup length? perhaps for padding? */ u16 obj_type; u16 flags; u16 fill[2]; u32 id; }; struct mfs_attr_header { u8 eltype; u8 attr; u16 len; }; struct mfs_obj_attr { u32 fsid; int subobj; }; struct vserver_cmd { u32 command; u32 param1; u32 param2; }; #define MFS_CMD_QUIT 0 #define MFS_CMD_READ 1 #define MFS_CMD_WRITE 2 #define MFS_CMD_ZERO 3 typedef void (*object_fn)(int fsid, struct mfs_subobj_header *obj, struct mfs_attr_header *attr, void *data); #ifdef __MINGW32__ #define strtok_r(a, b, c) strtok(a, b) #endif #include "proto.h" vstream-client-1.2/mkproto.awk000066400000000000000000000022411102133242400164770ustar00rootroot00000000000000# generate prototypes for Samba C code # tridge, June 1996 BEGIN { inheader=0; print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" } { if (inheader) { if (match($0,"[)][ \t]*$")) { inheader = 0; printf "%s;\n",$0; } else { printf "%s\n",$0; } next; } } /^FN_LOCAL_BOOL/ { split($0,a,"[,()]") printf "BOOL %s(int );\n", a[2] } /^FN_LOCAL_STRING/ { split($0,a,"[,()]") printf "char *%s(int );\n", a[2] } /^FN_LOCAL_INT/ { split($0,a,"[,()]") printf "int %s(int );\n", a[2] } /^FN_LOCAL_CHAR/ { split($0,a,"[,()]") printf "char %s(int );\n", a[2] } /^FN_GLOBAL_BOOL/ { split($0,a,"[,()]") printf "BOOL %s(void);\n", a[2] } /^FN_GLOBAL_STRING/ { split($0,a,"[,()]") printf "char *%s(void);\n", a[2] } /^FN_GLOBAL_INT/ { split($0,a,"[,()]") printf "int %s(void);\n", a[2] } /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ { next; } !/^u32|^u64|^OFF_T|^size_t|^off_t|^pid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time/ { next; } /[(].*[)][ \t]*$/ { printf "%s;\n",$0; next; } /[(]/ { inheader=1; printf "%s\n",$0; next; } vstream-client-1.2/object.c000066400000000000000000000025401102133242400157140ustar00rootroot00000000000000/* media-filesystem object parse code tridge@samba.org, January 2001 released under the Gnu GPL v2 */ #include "mfs.h" static int parse_attr(char *p, int obj_type, int fsid, struct mfs_subobj_header *obj, object_fn fn) { struct mfs_attr_header *attr; int ret; attr = (struct mfs_attr_header *)p; attr->len = ntohs(attr->len); p += sizeof(*attr); fn(fsid, obj, attr, p); ret = (attr->len+3)&~3; attr->len = htons(attr->len); return ret; } static void parse_subobj(void *p, u16 type, int len, int fsid, struct mfs_subobj_header *obj, object_fn fn) { int ofs=0; while (ofs < len) { ofs += parse_attr(p+ofs, type, fsid, obj, fn); } } /* this is the low-level interface to parsing an object. It will call fn() on all elements in all subobjects */ void vstream_parse_object(int fsid, void *buf, object_fn fn) { char *p; u32 ofs; struct mfs_obj_header *obj = buf; int i=0; vstream_byte_swap(obj, "i2"); p = buf; ofs = sizeof(*obj); /* now the subobjects */ while (ofs < obj->size) { struct mfs_subobj_header *subobj = buf+ofs; vstream_byte_swap(subobj, "s6 i1"); fn(fsid, subobj, NULL, NULL); parse_subobj(buf+ofs+sizeof(*subobj), subobj->obj_type, subobj->len-sizeof(*subobj), fsid, subobj, fn); ofs += subobj->len; i++; vstream_byte_swap(subobj, "s6 i1"); } vstream_byte_swap(obj, "i2"); } vstream-client-1.2/partition.c000066400000000000000000000035751102133242400164700ustar00rootroot00000000000000/* media-filesystem library, partition routines tridge@samba.org, January 2001 released under the Gnu GPL v2 */ #include "mfs.h" #define MAX_PARTITIONS 20 #define PARTITION_MAGIC 0x504d struct tivo_partition { u16 signature; /* expected to be PARTITION_MAGIC */ u16 res1; u32 map_count; /* # blocks in partition map */ u32 start_block; /* absolute starting block # of partition */ u32 block_count; /* number of blocks in partition */ char name[32]; /* partition name */ char type[32]; /* string type description */ u32 data_start; /* rel block # of first data block */ u32 data_count; /* number of data blocks */ u32 status; /* partition status bits */ u32 boot_start; u32 boot_size; u32 boot_load; u32 boot_load2; u32 boot_entry; u32 boot_entry2; u32 boot_cksum; char processor[16]; /* identifies ISA of boot */ /* there is more stuff after this that we don't need */ }; struct pmap { u32 start; u32 length; } pmaps[MAX_PARTITIONS]; static int num_partitions = 0; static int use_ptable = 0; /* parse the tivo partition table */ int vstream_partition_parse(void) { char buf[SECTOR_SIZE]; struct tivo_partition *tp; int i, count; tp = (struct tivo_partition *)buf; vserver_vstream_read_sectors(tp, 1, 1); count = ntohl(tp->map_count); for (i=0;isignature) != PARTITION_MAGIC) { vstream_error("wrong magic %x in partition %d\n", ntohs(tp->signature), i); return 1; } if (strcmp(tp->type, "MFS") == 0) { pmaps[num_partitions].start = ntohl(tp->start_block); pmaps[num_partitions].length = ntohl(tp->block_count); num_partitions++; } } use_ptable = 1; return 0; } u32 vstream_partition_total_size(void) { u32 total=0; int i; if (!use_ptable) return 0; for (i=0; iflags && subobj_g == -1) && !(obj->id == subobj_g)) return; if (strcmp(vstream_schema_attrib(obj->obj_type, attr->attr), name_g)) return; *len_g = attr->len; ret_g = data; } /* return the data portion of a part of an object */ void *vstream_query_part(int fsid, int subobj, char *name, int *len) { if (vstream_mfs_fsid_type(fsid) != MFS_TYPE_OBJ) { vstream_error("%d is not an object\n", fsid); return NULL; } load_object(fsid); subobj_g = subobj; name_g = name; len_g = len; vstream_parse_object(fsid, loaded.buf, callback); return ret_g; } /* query a subobject path starting at fsid returning the data in the tail of the path */ static int vstream_myisdigit( char p ) { if ( ( p >= '0' ) && ( p <= '9' ) ) return( 1 ); return( 0 ); } void *vstream_query_path(int fsid, char *path, int *len) { char *tok, *p; void *ret=NULL; int subobj = -1; path = strdup(path); tok = strtok_r(path,"/", &p); while (tok) { ret = vstream_query_part(fsid, subobj, tok, len); if (!ret) return NULL; tok = strtok_r(NULL,"/", &p); if (tok && vstream_myisdigit(tok[0])) { subobj = atoi(tok); tok = strtok_r(NULL,"/", &p); } else if (tok) { struct mfs_obj_attr *objattr = ret; fsid = ntohl(objattr->fsid); subobj = ntohl(objattr->subobj); } } free(path); return ret; } char *vstream_query_string(int fsid, char *path) { int len; char *p = vstream_query_path(fsid, path, &len); return p; } int vstream_query_int(int fsid, char *path) { int len; int *p = vstream_query_path(fsid, path, &len); if (!p) return -1; return ntohl(*p); } struct mfs_obj_attr *query_object(int fsid, char *path, int *count) { int len, i; struct mfs_obj_attr *ret = NULL; struct mfs_obj_attr *p = vstream_query_path(fsid, path, &len); if (!p) return ret; *count = (len-4)/8; ret = calloc(*count, sizeof(*ret)); for (i=0;i<*count;i++) { ret[i] = p[i]; ret[i].fsid = ntohl(ret[i].fsid); ret[i].subobj = ntohl(ret[i].subobj); } return ret; } vstream-client-1.2/schema.c000066400000000000000000000106371102133242400157140ustar00rootroot00000000000000/* media-filesystem object schema code tridge@samba.org, January 2001 released under the Gnu GPL v2 */ #include "mfs.h" #include "preload_schema.h" #include #define MAX_TYPES 200 #define MAX_ATTRS 100 static int current_type; static char *types[MAX_TYPES]; static struct { char *name; int objtype; } attrs[MAX_TYPES][MAX_ATTRS]; static void schema_add(int type, int attr, char *name, int objtype) { int i; assert(type < MAX_TYPES); assert(attr < MAX_ATTRS); name = strdup(name); if (type != -1) { attrs[type][attr].name = name; attrs[type][attr].objtype = objtype; return; } for (i=0;iflags || !attr) return; if (attr->attr == 16) { name = (char *)data; } else if (attr->attr == 17) { iattr = ntohl(*(u32 *)data); } else if (attr->attr == 18) { u32 objtype = ntohl(*(u32 *)data); schema_add(current_type, iattr, name, objtype); } } void load_callback1(int fsid, struct mfs_subobj_header *obj, struct mfs_attr_header *attr, void *data) { static char *name; if (!obj->flags || !attr) return; if (attr->attr == 16) { name = strdup((char *)data); } else if (attr->attr == 17) { current_type = ntohl(*(u32 *)data); types[current_type] = name; } } static void load_schema(int type) { u32 size, fsid; char path[100]; void *buf; if (!attrs[0][1].name) { schema_add(-1, 1, "Version", TYPE_INT); schema_add(-1, 2, "Expiration", TYPE_INT); schema_add(-1, 3, "Path", TYPE_STRING); schema_add(-1, 4, "IndexPath", TYPE_STRING); schema_add(-1, 5, "IndexUsed", TYPE_OBJECT); schema_add(-1, 6, "IndexUsedBy", TYPE_OBJECT); schema_add(-1, 7, "IndexAttr", TYPE_OBJECT); schema_add(-1, 8, "ServerId", TYPE_STRING); schema_add(-1, 9, "ServerVersion", TYPE_INT); schema_add(-1, 10, "Uuid", TYPE_STRING); schema_add(-1, 11, "Unsatisfied", TYPE_STRING); schema_add(-1, 12, "Bits", TYPE_INT); schema_add(-1, 13, "Unused1", TYPE_INT); schema_add(-1, 14, "Unused2", TYPE_INT); schema_add(-1, 15, "Unused3", TYPE_INT); } sprintf(path, "/ObjectType/%s", vstream_schema_type(type)); fsid = vstream_mfs_resolve(path); if (fsid != 0) { size = vstream_mfs_fsid_size(fsid); if (size > 0) { buf = malloc(size); vstream_mfs_fsid_pread(fsid, buf, 0, size); vstream_parse_object(fsid, buf, load_callback1); vstream_parse_object(fsid, buf, load_callback2); free(buf); } } } /* lookup a string for a schema type */ char *vstream_schema_type(int type) { if (!types[type]) preload_schema(); return types[type]; } /* lookup an attribute for a given type and attr value, auto-loading the schema if necessary */ char *vstream_schema_attrib(int type, int attr) { (void) vstream_schema_type(type); if (type >= MAX_TYPES) { vstream_error("Invalid type %d in vstream_schema_attrib\n", type); return "UNKNOWN"; } if (attr >= MAX_ATTRS) { vstream_error("Invalid attr %d in vstream_schema_attrib\n", attr); return "UNKNOWN"; } if (!attrs[type][attr].name) { load_schema(type); } if (!attrs[type][attr].name) { attrs[type][attr].name = malloc(18); snprintf(attrs[type][attr].name, 18, "UNKNOWN(%d,%d)", type, attr); } return attrs[type][attr].name; } vstream-client-1.2/test-client.c000066400000000000000000000070731102133242400167070ustar00rootroot00000000000000#include #include #include "mfs.h" #include "vstream-client.h" #define CHUNK ( 1024 * 1024 ) // on cygwin, we have large file support already, and no fopen64. #ifdef __CYGWIN__ #define fopen64 fopen #endif void vstream_error( const char *format, ... ) { va_list va; va_start( va, format ); vfprintf( stdout, format, va ); va_end( va ); } int usage(char *name) { printf("Simple Usage:\n"); printf("list available streams: %s hostname\n", name); printf("list available streams (long format): %s hostname -l\n", name); printf("download a stream: %s hostname fsid [-o filename] [-a offset]\n", name); printf("\n"); printf("URL Usage:\n"); printf("list available streams: %s tivo://hostname/list\n", name); printf("list available streams (long format): %s tivo://hostname/llist\n", name); printf("download a stream: %s tivo://hostname/fsid [-o filename] [-a offset]\n", name); printf("\n"); printf("offsets are specified in megabytes.\n"); printf("filename, if unspecified, defaults to .ty\n"); printf("\n"); return 1; } int main( int argc, char *argv[] ) { int64_t offset = 0, size, count; unsigned char buffer[ CHUNK ]; FILE *output; char *filename = NULL, *hostname = NULL, *fsid = NULL; int megs, seconds, start_time; char *me; int dashes = 0, ll = 0; me = strrchr(argv[0], '/'); if (!me) me = strrchr(argv[0], '\\'); else me++; if (!me) me = argv[0]; else me++; argc--; argv++; while (argc) { if (!strcmp(argv[0], "--")) { dashes = 1; } else if (!dashes && !strcmp(argv[0], "-l")) { ll = 1; } else if (!dashes && !strcmp(argv[0], "-o")) { argv++; argc--; if (!argc) return usage(me); filename = strdup(argv[0]); } else if (!dashes && !strcmp(argv[0], "-a")) { argv++; argc--; if (!argc) return usage(me); offset = ((int64_t)atol(argv[0])) << 20; } else if (!strncmp(argv[0], "tivo://", 7)) { if (hostname) return usage(me); hostname = argv[0] + 7; if (!hostname[0]) return usage(me); fsid = strchr(hostname, '/'); if (!fsid) return usage(me); *fsid = '\0'; fsid++; if (strchr(fsid, '/')) return usage(me); } else { if (!hostname) hostname = argv[0]; else if (hostname && !fsid) fsid = argv[0]; else return usage(me); } argc--; argv++; } if (!hostname) return usage(me); if (vstream_open_socket(hostname)) { printf("%s: connection error.\n", me); return 1; } if (!fsid || !strcmp(fsid, "list")) { vstream_list_streams(0); return 0; } else if (!strcmp(fsid, "llist") || ll) { vstream_list_streams(1); return 0; } if (!filename) { int len = strlen(fsid) + 4; filename = malloc(len); snprintf(filename, len, "%s.ty", fsid); } { if (vstream_start()) { printf("%s: Cryptic internal error 1.\n", me); return 1; } if (vstream_startstream(fsid)) { printf("%s: Cryptic internal error 2.\n", me); return 1; } size = vstream_streamsize(); megs = 0; printf("(%s) size %lld MB, getting %lld MB\n", fsid, size >> 20, (size - offset) >> 20); output = fopen64(filename, "w" ); if (!output) { printf("%s: File creation failed.\n", me); return 1; } start_time = time(NULL); while (offset < size) { count = CHUNK; if (offset + CHUNK > size) count = size - offset; count = vstream_load_chunk(fsid, buffer, count, offset); offset += count; fwrite(buffer, 1, count, output); megs++; seconds = time(NULL) - start_time; if (seconds) printf("\r%5d MB %5d kb/s", megs, (megs << 10) / seconds); fflush(stdout); } fclose(output); printf("\nDone.\n"); } free(filename); return 0; } vstream-client-1.2/util.c000066400000000000000000000140131102133242400154210ustar00rootroot00000000000000/* media-filesystem library tridge@samba.org, January 2001 released under the Gnu GPL v2 */ #include "mfs.h" #ifdef __MINGW32__ # define HAVE_WINSOCK2 # include #else # include # include # include # include # define closesocket(f) close(f) #endif void vstream_read_all(int fd, void *buf, int size) { while (size) { int n = read(fd, buf, size); if (n <= 0) return; // FIXME buf += n; size -= n; } } void vstream_write_all(int fd, void *buf, int size) { while (size) { int n = write(fd, buf, size); if (n <= 0) return; // FIXME buf += n; size -= n; } } // stolen from MPlayer: // Connect to a server using a TCP connection, with specified address family // return -2 for fatal error, like unable to resolve name, connection timeout... // return -1 is unable to connect to a particular port #define mp_msg(a, ...) #define mp_input_check_interrupt(a) 0 #define USE_ATON 1 static int connect2Server_with_af(char *host, int port, int af, int verb) { int socket_server_fd; int err, err_len; int ret,count = 0; fd_set set; struct timeval tv; union { struct sockaddr_in four; #ifdef HAVE_AF_INET6 struct sockaddr_in6 six; #endif } server_address; size_t server_address_size; void *our_s_addr; // Pointer to sin_addr or sin6_addr struct hostent *hp=NULL; char buf[255]; #ifdef HAVE_WINSOCK2 u_long val; #endif socket_server_fd = socket(af, SOCK_STREAM, 0); if( socket_server_fd==-1 ) { // mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to create %s socket:\n", af2String(af)); return -2; } switch (af) { case AF_INET: our_s_addr = (void *) &server_address.four.sin_addr; break; #ifdef HAVE_AF_INET6 case AF_INET6: our_s_addr = (void *) &server_address.six.sin6_addr; break; #endif default: mp_msg(MSGT_NETWORK,MSGL_ERR, "Unknown address family %d:\n", af); return -2; } memset(&server_address, 0, sizeof(server_address)); #ifndef HAVE_WINSOCK2 #ifdef USE_ATON if (inet_aton(host, our_s_addr)!=1) #else if (inet_pton(af, host, our_s_addr)!=1) #endif #else if ( inet_addr(host)==INADDR_NONE ) #endif { if(verb) mp_msg(MSGT_NETWORK,MSGL_STATUS,"Resolving %s for %s...\n", host, af2String(af)); #ifdef HAVE_GETHOSTBYNAME2 hp=(struct hostent*)gethostbyname2( host, af ); #else hp=(struct hostent*)gethostbyname( host ); #endif if( hp==NULL ) { if(verb) mp_msg(MSGT_NETWORK,MSGL_ERR,"Couldn't resolve name for %s: %s\n", af2String(af), host); return -2; } memcpy( our_s_addr, (void*)hp->h_addr, hp->h_length ); } #ifdef HAVE_WINSOCK2 else { unsigned long addr = inet_addr(host); memcpy( our_s_addr, (void*)&addr, sizeof(addr) ); } #endif switch (af) { case AF_INET: server_address.four.sin_family=af; server_address.four.sin_port=htons(port); server_address_size = sizeof(server_address.four); break; #ifdef HAVE_AF_INET6 case AF_INET6: server_address.six.sin6_family=af; server_address.six.sin6_port=htons(port); server_address_size = sizeof(server_address.six); break; #endif default: mp_msg(MSGT_NETWORK,MSGL_ERR, "Unknown address family %d:\n", af); return -2; } #if defined(USE_ATON) || defined(HAVE_WINSOCK2) strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); #else inet_ntop(af, our_s_addr, buf, 255); #endif if(verb) mp_msg(MSGT_NETWORK,MSGL_STATUS,"Connecting to server %s[%s]:%d ...\n", host, buf , port ); // Turn the socket as non blocking so we can timeout on the connection #ifndef HAVE_WINSOCK2 fcntl( socket_server_fd, F_SETFL, fcntl(socket_server_fd, F_GETFL) | O_NONBLOCK ); #else val = 1; ioctlsocket( socket_server_fd, FIONBIO, &val ); #endif if( connect( socket_server_fd, (struct sockaddr*)&server_address, server_address_size )==-1 ) { #ifndef HAVE_WINSOCK2 if( errno!=EINPROGRESS ) { #else if( (WSAGetLastError() != WSAEINPROGRESS) && (WSAGetLastError() != WSAEWOULDBLOCK) ) { #endif if(verb) mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to connect to server with %s\n", af2String(af)); closesocket(socket_server_fd); return -1; } } tv.tv_sec = 0; tv.tv_usec = 500000; FD_ZERO( &set ); FD_SET( socket_server_fd, &set ); // When the connection will be made, we will have a writable fd while((ret = select(socket_server_fd+1, NULL, &set, NULL, &tv)) == 0) { if( ret<0 ) mp_msg(MSGT_NETWORK,MSGL_ERR,"select failed\n"); else if(ret > 0) break; else if(count > 30 || mp_input_check_interrupt(500)) { if(count > 30) mp_msg(MSGT_NETWORK,MSGL_ERR,"Connection timeout\n"); else mp_msg(MSGT_NETWORK,MSGL_V,"Connection interuppted by user\n"); return -3; } count++; FD_ZERO( &set ); FD_SET( socket_server_fd, &set ); tv.tv_sec = 0; tv.tv_usec = 500000; } // Turn back the socket as blocking #ifndef HAVE_WINSOCK2 fcntl( socket_server_fd, F_SETFL, fcntl(socket_server_fd, F_GETFL) & ~O_NONBLOCK ); #else val = 0; ioctlsocket( socket_server_fd, FIONBIO, &val ); #endif // Check if there were any error err_len = sizeof(int); ret = getsockopt(socket_server_fd,SOL_SOCKET,SO_ERROR,&err,&err_len); if(ret < 0) { mp_msg(MSGT_NETWORK,MSGL_ERR,"getsockopt failed : %s\n",strerror(errno)); return -2; } if(err > 0) { mp_msg(MSGT_NETWORK,MSGL_ERR,"Connect error : %s\n",strerror(err)); return -1; } return socket_server_fd; } int vstream_vstream_open_socket_out(char *host, int port) { #ifdef __MINGW32__ static int winsock_ready = 0; if (!winsock_ready) { WSADATA data; WSAStartup(514, &data); winsock_ready = 1; } #endif return connect2Server_with_af(host, port, AF_INET, 0); } void vstream_byte_swap(void *p, char *desc) { int n, i; while (*desc) { switch (*desc) { case 'i': { u32 *v; n = strtol(desc+1, &desc, 10); v = p; for (i=0;iW@7l; >TdW__gmon_start__libc.so.6_IO_stdin_usedsocketfflushstrcpyhtonlhtonssprintfinet_atonstrrchr__strdupconnectinet_ntoastrncpyputsputcharselectrealloc__assert_failstrtolcallocstrlenmemset__errno_locationreadgetsockoptstdoutmemcpyfclosemallocgethostbynamefwritelocaltimestrchrfcntlfopen64strcmp__libc_start_mainvfprintfntohlntohssnprintffreeGLIBC_2.1GLIBC_2.0ii zii ث.      $(,048<@DHLPTX\`d h!l"p#t$x%|&'()*+,-US[p"t^I6X[5%%h%h%h%h%h %h(%h0%h8p%h@`% hHP%hP@%hX0%h` %hh% hp%$hx%(h%,h%0h%4h%8h%<h%@h%Dhp%Hh`%LhP%Ph@%Th0%Xh %\h%`h%dh%hh%lh%ph%th%xh %|h(%h0%h8p%h@`%hHP%hP@%hX0%h` 1^PTRhhQVhЍU=t ҡuÐUtt $ÐUS]$$\$Z\$$8J\$$p:$ $\$$\$$\$$$$ $l:$.$ []Í&L$qUWVSQXqD$/$t ^DžDžDžDžDžDžDž.:Au8:Au,Džto 9t9I:F3:F#Džu4$t$} X1Y[^_]aËyD$/$@D$/$ $XY[^_]aÍ&9uu:Auc:AuWQ$*f8v9:B:BD$ D$$dS1$L$c4$KXY[^_]aË$.XY[^_]aË$D$XY[^_]aD$\$o$$14$t $D$ É+D$؉T$D$T$ $T$D$ $ub$t$$GX$T$ D$\$$-$g9| 919+D$L$T$ L$$Q D$L$ D$$$+ux$;G}O4$$$19Í&!t&;룉 |$$D$aU(E ED$ED$$,ÐUE]ÍvUE]ÍvUE]ÍvUx1D$E$yE$$D$^Í&U($]Éut$Ei4$E^D$ EED$$/]u]Ðt&UD$ T$$BUWVS u} 9 1ۉM)څt ;% wMETt*t!11UB$9fu [^_]Ë 9R))9މE9]7>)к2E $U$ +M>) kt&Uuu}} ]w@t-D$|$$2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Cryptic internal error 2. (%s) size %lld MB, getting %lld MB Failed to connect to %s StartDateStartTime%d%2.2d/%2.2d/%2.2d%2.2d:%2.2d%02dShowing/Station/CallSignShowing/Program/Title %s -- Showing/Program/EpisodeTitlePart/%d/Filevstream_fsidtoparts(): Invalid Part File %d Didn't find hash %x in zones! ERROR: fsid=%d Unknown units %d ERROR: non dir %d/%s in meta-dir %d! Not a TiVo super block! (magic=0x%08x) Failed to byte swap correctly WARNING: total sectors doesn't match (total=%d sb=%d) i10 b2 s1 i4i112ERROR: Didn't find fsid=%d! fsid %d is not a directory i18sector wrong in zone (%d %d) Too many zones i9 b128 i87resolve failed for fsid=%d not a directory %s %d is not an object wrong magic %x in partition %d MFScrc mismatch len=%d 0x%08x 0x%08x 0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-i2s6 i1schema.ctype < 200attr < 100stringintfileUNKNOWNIndexPathIndexUsedIndexUsedByIndexAttrServerVersionUuidUnsatisfiedBitsUnused1Unused2Unused3/ObjectType/%sUNKNOWN(%d,%d)Test1ISIOIMSOSMFOFMOSDOSSOONOODOOSOMNOMDOMSTest2IIndexObjectIndexIntIndexStringIndexFileSeriesDescLanguageShowTypeMovieYearMpaaRatingStarRatingMovieRunTimeCountryNetworkSourceSourceTypeActorGuestStarDirectorExecProducerWriterHostChoreographerGenreColorCodeAltEpisodeNumShowingOBSOLETEIsEpisodeApgProgramTvRatingOriginalAirDateRootServerIdAolRatingShowingDerivedOBSOLETESeriesStationOBSOLETEEpisodicThumbDataCityZipCodeAffiliationDmaNameDmaNumFccChannelNumAffiliationIndexPayPerViewAolChannelAolMiniGuideAolUrlAolDescriptionAolStationTypeStationDayApgScheduleDurationPartIndexPartCountPremiereLiveDontIndexSeriesIdDolbyApgScheduleEventPlaceHolderDlWaitingOBSOLETEGenericFileLoopSetPortTransLoopSetClipEntranceExitVideoVideoClipSubRecordingSwSystemResourceGroupObjectTypeResourceChecksumInstalledOBSOLETEUserInterfaceOBSOLETESwModuleModuleVersionModuleReleaseModuleFileDependencySelectionTypeExpirationTimeBitRateScoreUnusedAOBSOLETEStopDateStopTimeBookmarkCancelReasonCancelDateCancelTimeExplicitlyDeletedOBSOLETEOutageAudioModeOBSOLETEErrorStringRelatedPrefsDeletionDateDeletionTimeRecordQualityContentTypeProgramSourceActualShowingStartPaddingEndPaddingConflictsWithRecordingNSecondsWatchedNVisitSaveToTapeStatusCreatedByServiceRecordingPriorityClipsAnchorsStreamFileSizeExpirationExtendedEnumEnumItemPrintNameAltNameShowcaseInterstitialTypeInterstitialIdTiVolutionSequenceNumberInfoBalloonAudioBackgroundAudioBackgroundPriorityMugshotBigBannerClipPlayListClipAvailableIconLoopSetNameAudioBackgroundNameNoBannerNoDescriptionBoxWienerDisplayShowcaseItemPackageSubItemExpirationDatePreviewOBSOLETEPackageItemImageHeadendTmsHeadendIdCommunityNameCountyNameTimeZoneLineupEncryptionKeysLocationCityPostalCodeServiceTierABChannelOBSOLETESignalOBSOLETESurfRecordFavoriteSourceIndexApgChannelCompressedFileResourceItemPreLoadTargetPreferencesOBSOLETEProgprefsProgprefsOBSOLETEIntMatchPrefOBSOLETEPointsStringMatchPrefOBSOLETEFontActorOBSOLETEStartTimeMsDurationMsScheduledActionOBSOLETEActionToDeleteViewerEventGroupOBSOLETEViewerIdViewerEventOBSOLETEDateOfEventTimeOfEventDateOfContentTimeOfContentStationTmsIdUnusedOBSOLETERecordingPartBeginEndScrambleKeySubobjectDerivedObsoleteObjectAttributeSubtypeArityDeprecatedDefaultIntDefaultStringSignalSourceSignalTypeProviderNameConnectorComponentComponentCodeLineupSubIdRFChannelDBSRemoteMethodEnterKeyRequiredRecieverNumDigitsCableBoxCodeNumInventoryUnattendedTunerDigitDelayLineupTypeChannelClosetCableBoxBrandVariableBitrateSetupDaylightSavingsPolicySoundVolumePhoneNumberNetConnectionCableTypeLastChannelNumAudioSourceMusicVolumeLastCallAttemptLastSuccessCallDebugModeDemoModeLastCallStatusCompleteNextCallAttemptLocalAccessDigitLongDistAccessDigitDisableCallWaitingDisableCallWaitingCodeHasPulseDialingAreaCodeOBSOLETECountryCodeInventoryFileNoPrivateBackhaulServiceStateServiceStateExpirationBackgroundHourSerialNumberDisableAutoRecServiceInfoDialPrefixDialMethodDialHookCheckDialToneCheckCallWaitingPrefixLastChannelDemoModeKeyOBSOLETEBannerTimeoutLoopingDemoModeOBSOLETEThumbsLogMagicNumberAdvancedThemeRemoteAddressVCRIrCodeNumSetupDateDolbyDigitalAudioLanguageAspectRatioRFOutputChannelScartSettingsFrontIRBlasterAlternateBitratesTunerCountHeadendDayOBSOLETESeasonPassProcessedOBSOLETEProcessedDateProcessedTimeDayOfWeekOBSOLETEStartTimeOBSOLETEDayOfWeekLocalStartTimeLocalMaxRecordingsKeepTimeProcessedStationStartTimePaddingEndTimePaddingFirstRunCaptureRequestSoundFileSoundPrefsElementViewerThumbsnessIntKeyValueStringKeyValueVectorPersonRoleChildStationIdIrFormatOptionOutcodeLogic1Logic0LeadRepeatTimedb1Timedb2Timedb3Timedw1Timedw2Word1Word2SubroutineOBSOLETEIrBlastDataDevTypeCarrierSyscodeKeyCodesNumRepeatsMessageOBSOLETEBodyMessageIdSaveResponseChoiceRepeatCounterSwSystemNameLastCleanupDateLastCleanupTimeCallInProgressDialConfigDialInNumDialInAreaCodeDialInPrefixLocalAreaCodeLastDialInUpdateTimeAuthTollFreeTollFreeNumCallStatusInfoForceBackhaulPublicLogFilterLastSuccessPGDCallBackhaulDataOnPersonalDataOnClientTokenLastPrivBackhaulAltPlanYStationIDDataGroupListSequenceCookieIrTivoFormatDeviceNameTimeSpacerDig0Dig1Dig2Dig3Dig4Dig5Dig6Dig7Dig8Dig9EnterPowerTogglePowerOnPowerOffChanUpChanDownSurfingDelayRecordingDelayPauseStopMessageBoardOBSOLETENewMessageCountNextPtcmDisplayDateNextPtcmDisplayTimeMessageItemSubjectFromFromIdDateGeneratedTimeGeneratedDateReadTimeReadMessageFlagsDeletedDestinationDisplayFrequencyPtcmCountRemainingLocalMessageTypeDataSetDBAreaCodeCityPhoneNumLoginPasswordTVRatingMPAARatingTVAdvisorysBlockedStationSpendingLimitBlockSwitchApgUserPasswordDelayAutoLockOBSOLETETvAdvisoryAutoRelockSeriesCorrelationCorrelationContributorGlobalDefaultContextTuikGlobalOBSOLETEResourceTuikContextOBSOLETEDatabaseStateVersionMajorVersionMinorGcCompletionDateGcCompletionTimeGcIndexCompletionDateGcIndexCompletionTimeZapRequestKeywordPhraseGenreFilterPathThemeTypeDirectorOpActorOpKeywordPhraseOpApgBootRootCategorySystemCaScidPipScidNetworksApgCategorySystemLabelsApgFrequencyParametersLnbApgNetworkApgSatelliteOrbitalPositionDirectionApgCategoryLabelSubcategoryFCoreSetAboutTextCategoryCwpDescriptionBitrateEstimateProgramGuideSourceMyWorldStateLockStateAutoDetectGuideStyleGuideChannelListStandbyModeActiveTest3Test3ObjectOptionalFileApgPipGuideInclusionExprPipApgObjectIdPipMessageTagCanBeViewedSourceIdShortNameCgmsHdaCgmsAApsCgmsDNetworkIdOBSOLETEDefaultProgramAdditionalNetworkIdPipFrequencyIndexPipChannelNumberPipMessageNumberChannelPipIndicatorBackupLogoIndexConditionalDescriptorExprLongNameFrameHeaderNetworkIdApgChannelDefinitionChannelExpressionServiceTypeSpiNumberOfStreamsStreamTypeLanguageCodeServiceLabelLoopAudioBackgroundItemAudioClipPlaybackFrequencyLastPlaybackTimeOffsetSecondsOffsetNanosDurationSecondsDurationNanosEventPipIndicatorSatConfigConnectionTypeDishTypeMarketIdCssCwStatSatNetworkPortInfoPolarizationAPolarizationBIsStackedPortNumberAPortNumberBApgUpdateListApgChannelObjectIdApgChannelVersionLogoGroupLogoSpacePaletteNvRamPackedDataTableStringDataApgDealerPipBlockedChannelAuxInputAutoVcrBypassTvOutputTvScartCtrlActiveTvAudioLevelUpdateHistoryWasUpgradedFrom1_3ChannelIdAolTypeAssetMimeTypeAssetHolderPathBaseAxisSpecificationClientVariantClientInvariantBillingIdProcessedCapturePrePadSecondsCapturePostPadSecondsApgStateMarkerTransponderForcedPgdChangeEnableForcedPgdChangeTimeGMTForcedPgdChangeRecheckSecondsDiskPartitionSizeInKbDiskConfigurationDiskPartitionsMinDiskSizeMaxDiskSizeNameOBSOLETEAuthorizedAuxInfoClipNameStartAnchorNumberEndAnchorNumberAnchorClipToPlayMediaStateControlByteUserAdvisoryRatingTVAdvisoryAvalancheStateLastSuccessDownloadDateLastSuccessDownloadTimeLastAttemptedDownloadDateLastAttemptedDownloadTimeLastStatusLastSuccessDirectoryDateLastSuccessDirectoryTimeLastAttemptedDirectoryDateLastAttemptedDirectoryTimeModemStateCurrentModeExpirationDaySuccessiveFailureserror parsing preloaded schema table Invalid type %d in vstream_schema_attrib Invalid attr %d in vstream_schema_attrib schema_addOOxH`Hjt]H O H H OOOOHHHSSS  OOxH`Hjt]H O H H O%OH'3O<HHS8O8O8xH8`H8j8t88]H8 O8 H8 H8 O8H8H8R8$H8YH8fO8oO8yO8O8O8H8H8O8H8O8H8 H8!H8"H8#H8$H8%H8&H8'O8(O8)O8* O8+8,8-+O8.58/O80@O81IO82YH8384fHRORORxHR`HRjRtRR]HR OR HR HR ORHRHRRpRORROROOOxH`Hjt]H O H H OHHHH~HHHHHOOOOOO O !!H"0H?O?O?xH?`H?j?t??]H? O? H? H? O??O??J?GO?VOOOxH`Hjt]H O H H O8OOVO_OiOsO|OOOO@OOOO OOxH`Hjt]H O H H O O O xH `H j t  ]H  O  H  H  O S O O xH `H j t  ]H  O  H  H  O H O ~  O O xH `H j t  ]H  O  H  H  O O O S   O O xH `H j t  ]H  O  H  H  O H O | ( 6 AH RO d zO zO zxH z`H zj zt z z]H z O z H z H z O zH zH zH zS zOOxH`Hjt]H O H H O~OOOOOOS=OGOOO OO#O .O!H"#OO$aH%m&zO'O(O)O*+,O-O./O0 O1O2!O3+O4D5J6RO7aOOOxH`Hjt]H O H H O6OtOtOtxHt`Htjtttt]Ht Ot Ht Ht OtHtyOyOyxHy`Hyjytyy]Hy Oy Hy Hy OyHyOyHyHOOxH`Hjt]H O H H OH7OOOOOOOO H $H!"#*$<H%HH&\O'eO(vOOOxH`Hjt]H O H H OH78OOH $HOOOxH`Hjt]H O H H OH7OO<HHH\OeOvOOOxH`Hjt]H O H H OH78OOH $HOOOxH`Hjt]H O H H OH OSOOxH`Hjt]H O H H OHHH~H+HHOHH'OOxH`Hjt]H O H H OHO6OBOTOcOhOoOxO(O(O(xH(`H(j(t((]H( O( H( H( O(O((SOOxH`Hjt]H O H H OOfH SOOOxH`Hjt]H O H H O;OeOfHS OOxH`Hjt]H O H H OOOxH`Hjt]H O H H OfyOOxH`Hjt]H O H H OOOOOxH`Hjt]H O H H OHO O O xH `H j t  ]H  O  H  H  O H  O S!#O!#O!#xH!#`H!#j!#t!#!#]H!# O!# H!# H!# O!#H"HO"HO"HxH"H`H"Hj"Ht"H"H]H"H O"H H"H H"H O"HO"H1O"H=O#HO#HO#HxH#H`H#Hj#Ht#H#H]H#H O#H H#H H#H O#HO#HO#H`O#H#Hg$pO$pO$pxH$p`H$pj$pt$p$p]H$p O$p H$p H$p O$pO$pO$p$pO%O%O%xH%`H%j%t%%]H% O% H% H% O%O%O%O%O%`O%H&O&O&xH&`H&j&t&&]H& O& H& H& O'O'O'xH'`H'j't'']H' O' H' H' O'O' O'S'IH'O(6O(6O(6xH(6`H(6j(6t(6(6]H(6 O(6 H(6 H(6 O(6H(6~O(6;(6O(6$O(6,O)5O)5O)5xH)5`H)5j)5t)5)5]H)5 O)5 H)5 H)5 O)5H)5~O)5O)5EH)5MO)5O)5O)5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teNow Showing Title/Recording/NowShowingByBucketTitleNow Showing TitleGCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)GCC: (GNU) 4.2.3 (Debian 4.2.3-5)$`"L;^   )#@+ Ju4p:->'*Dи$;Md!u_IO_stdin_used3!usagefmainvstream_error;#vvstream_mfs_readaheadvstream_io_need_bswapvstream_set_socket_fdvstream_open_socketvserver_vstream_read_sectorshvstream_mfs_read_partial^ *vstream_streamsizevstream_fsidtooffset>vstream_startWvstream_list_streamsvstream_startstreamvstream_load_chunkdirListlastFsidfilePartfilePartsfilePartsTotal vstream_fsid_hashEvstream_mfs_dir_freevstream_mfs_fsid_sizevstream_mfs_fsid_typevstream_mfs_fsid_pread mfs_dir load_zones< load_super vstream_mfs_resolve|)#vstream_query_partDvstream_query_pathquery_object vstream_query_int]vstream_query_strings+vstream_byte_swapvstream_vstream_open_socket_outvstream_write_allCvstream_read_allUu4hvstream_partition_total_sizevstream_partition_parsepmaps$:6vstream_check_crc'->vstream_parse_objectf*D vstream_schema_typevstream_schema_attribpload_callback1load_callback2Cn`61bint,iOK'/build/buildd/glibc-2.7/build-tree/i386-libc/csu/crti.S/build/buildd/glibc-2.7/build-tree/glibc-2.7/csuGNU AS 2.18.0]C,`06`1bint,8ayaoi1-t Z# # ## # # # S# # # #$ #(  #, "#0 r$#4 &Z#8 *Z#< ,z#@ T0>#D 1L#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NZ#h P#l+ A   # # ~Z#  'itaZɍF "f!(ZЍ,'Zo'):)` ):*+0,9,, O-Z-Z!-Z<me.bk/Zll/Z 8%8%888ZȎ:%:%Ȏ::Z =3<%<% =<7vWbiXA6PO'e$bufdPsecddtmpf{nhZ A A A  &C `06`1bint,8ayaoi-t Z# # ## # # # S# # # #$ #(  #, "#0 r$#4 &Z#8 *Z#< ,z#@ T0>#D 1L#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NZ#h P#l   # # ~Z#{  t  'Matm, Z# Z# #Z# Z# +Z# Z# Z# Z# Z# #$ ]#( 17 40u32 @u8 Be   # y #  # 6  # Z#N _ U!_# "_#P o OB0 1Z# 2# 3Z# Zm # I2gZu28ZQZZԘ K, ZX diruXobj  uphu\i ZulMuh2  p=ZP < obj> ?Z8 @Zd AZ B_:CDZEZ  FZG_~HɛS7ZZ   Z/  Zm g8Z  <:   6 !%!6_!7Zа o !C8`+!9Z C` 606intNSi`1b,8vyaS -t A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1h#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l    # # ~A#{ S7t S7'1Z2:40;}u64 ?u32 @u16 Au8 BR HN  I#  J#crc K#  L# \ M# b N# h O#  PN#  R^#$ M T#  Un#  W#  X#  Y# & Z~#  \# , ]N#  ^# ^7 Sn7 ~7 7 S7 \H a  b#  c#  d#  e#  f#  g#  hN# y i#  j#$crc k#( G l#, G m#0 n n#4  o#8 & pN#< x q#D  r#H 7 l u v#len w#  q  77 S7C zid {#  |#  }~#  ~#  #  ~# y 1#(  1#) & &#* , N#,  #4  #8u #< e   # y 1#  #0 3 E002C@ zdirBz iDAhgiiA jlenl #zA'V !yA !4y "}0 }0#h^$zsF %&'(d ( ')*in{@+|$0 !A+4{Ag!A+4{| !A,buf!,ofs}! +4{$iA[$nAy" $ret$secM"o'"¬$n2wz) !A.!  Nbuf $p n$nA$iAAAAretz-3D s #  .s ''8/#z[/$A'X.d2)z.n2*1oIA0O< "J"KBAPkj +:j | S{ 70A 1H0i 2__s1VS1 34[N 6, 5G M.p0O1.tokOQ.rOq/P.dirQz 6zv7{ 1KT & 8 xZ & & & ') # / [).i\AI9 k& & & :) ; Z& & & ') + ;` M M 7+t = `+ A@+: A << C1 `@- 06intNSi`1b,8vyaS -t A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1h#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l    # # ~A#{ S7t S7'A1Z2:40u32 @u16 Au8 B  len #  # o #  #  #id # 7 !   L !#  !#len #    # A#+  :  A#buf #  A#i~__sVS~AHx A,@})+A +A +len+ [2>ADp=S9 EeDAG D[ lenD!tokF!pF !retG_" HA#:KeYM$ %q#:@PeYM$X%q&)ͮ׮Q5:#pRJ#:SteYM$%q$'S U[ np mAG m m(lenoAup!ioAI!retp\)pq fA Xo]eAG e(lengAt)ph_`^AG ^(len`At)pa* "! A obj 3 !uq ! +а'%%'%%,h  ,A,,,-- < C ` j 06inti`1b,8kyay H- A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1]#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l   # # ~A# H 7 H 7'5 F G#  H# 7D: = H:# J 7. N#2:40u32 @`u16 AU  + W v    K :&   # n # H 7 b  X; f ۲# ;#  Q# l# ]U `  l F# O| 7 a b# v c|# # dA# eA# f|#4  p߷q ߹nAiASv__v0__x0ɱv__v:__x:kv 1A/ 1 1Aaf1A 1A 2Aerr3A 3Aret4A 4Aset5Jtv67/F 8 < =% >hp?buf@__v}:__x}:__i0  __i0  H 7J!F A/ ҹ A"####$%u|&A&a&&%~%\%/L':'E&P%Z|(Գ&'(&j'u9&"' *5CfdAabufA "n A 0jfdA,bufWALbnA)) 4 C `p 06inti`1b,8kyayH-i A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1]#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l   # # ~A#p H 7i H 7' H 72:40u32@u16A H&7  /  #  # # # r #  # y #0 #P #T [ #X #\ b #` # #d #h #l #p #t /#x H? 7~ "h ## $#> Ip- JiKA ,A(9buf-{tp.9Ti/A} /Au{:>%>%:>?>A&EO 'A3 (A  ? 7l %`; xC ` 06inti`1b,8kyayH-i A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1]#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l   # # ~A#p H 7i H 7'40u32@ l+ k+ kAimAretn01O |Abuf{ {Acrc{  }> new~Q  d   7 7  C `Ǹ06inti`1b,8kyayH-i A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1]#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l   # # ~A#p H 7i H 7'1O2:40u32@u16Au8B. C # #len# # o # # #id#  7!  L #  #len# AC zpy lenAAobjfnofsA  Ap o  A Aobj fn   ret A 'Ǹ &A buf& fn& p(ofs)uhobj*i+A߷ 4"-7dYNCul8/up- n!!z "!!#$$%%  C `и06inti`1b,8kyayH-i A# # ## # # # S# # # #$ #(  #, "#0 r$#4 &A#8 *A#< ,#@ T0:#D 1]#F 2#G I6#H ?#L H#T I#X J#\ K#` L%#d NA#h P#l   # # ~A#p H 7i H 7'1O2:40u32@u16Au8Bzlen# # o # # z#id#  7!  L #  #len#   ~ A# y # = A#  # # P  # 2A# и4!y A`! A! "2A>"iA"V q` +Ai,A~ ,A= ,A ,Ay - ---Q=%=%==A?%?%??AA%A%AAAC%C%CCAh .A Oj "y A"  "  # *# i# # #!ͺVa!ͺmx" q#y pArrG sbuft H 7c ɾ#py A $ A?$x$ $%&dо($'bA(objb$ c%'q c  e$& T0Q%a'RA(objR}% S%q S%)>2] U,= V( Hq 7 a *7  vC A0  7P @ + 7 7c `++ R/build/buildd/glibc-2.7/build-tree/i386-libc/csu/crtn.S/build/buildd/glibc-2.7/build-tree/glibc-2.7/csuGNU AS 2.18.0% $ > $ > $ > 4: ; I?  &IU%% : ; I$ > $ > $ >   I : ;  : ;I8  I : ; : ; I8 I!I/ &I.? : ; ' I@: ; I .? : ;' I : ;I: ; I4: ; I4: ; I 4: ; I4: ; I U U  1X Y 14: ; I !I/!.? : ; ' @"#4: ; I $4: ; I? < % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/ : ; I!I/ : ; I8 .? : ; ' @: ; I .? : ; ' I@: ; I.: ; ' @: ; I4: ; I 4: ; I U 4: ; I4: ; I4: ; I4: ; I   4: ; I? < % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/ &I : ; : ; I.? : ;' I : ;I.? : ; I@.? : ; ' @: ; I4: ; I .? : ;I@4: ; I 4: ; I4: ; I.? : ; ' I@4: ; I1X Y 1: ; I 4: ; I? < !4: ; I?  % : ; I$ > $ > $ >  I&I  : ;  : ;I8 : ; : ; I8 I!I/ : ; I : ;  : ; I8 !I/!I : ;  : ; I.? : ; ' I@: ; I .? : ;' @: ;I4: ;I.: ; ' I : ; I4: ; I4: ; I  .: ; ' I@!: ; I"4: ; I# U$4: ; I%1UX Y &1' U(41)41*4: ; I +4: ; I ,: ; I- .4: ;I/4: ;I0.? : ;' I 1: ;I2: ;I34: ;I4.? : ;' I@5: ;I6 : ;71X Y81UX Y91X Y: ;1UX Y<4: ; I? < % : ; I$ > $ > $ >  I&I  : ;  : ;I8 : ; : ; I8 I!I/ : ; I : ; I8  : ; .? : ;' I : ;I: ;I4: ;I.: ; ' : ; I.? : ; ' I@: ; I: ; I : ; I 1X Y 1.: ; ' I : ; I : ; I!4: ; I"4: ; I#1UX Y $ U%41&1X Y '4: ; I(4: ; I )4: ; I*.: ; ' @+ ,4: ; I -4: ; I? < % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/  : ; : ; I : ; ( .? : ; ' @: ; I: ; I4: ; I4: ; I U .: ; ' I : ; I: ; I4: ; I : ;  : ; I  !.? : ; ' I@"1UX Y #1$ U%41 &41'41( )4: ; I? < % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/ : ; I!I/.? : ; ' I@4: ; I4: ; I4: ; I 4: ; I  4: ; I&I4: ; I? < 4: ; I?  % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/ : ; I.: ; ' I : ; I4: ; I&I.? : ; ' I@: ; I : ; I: ; I4: ; I4: ; I1UX Y 1 U41414: ; I 4: ; I? < % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/ : ; I : ; I8 ' I.: ; ' : ; I: ; I4: ; I.: ; ' I 4: ; I.? : ; ' @: ; I: ; I4: ; I  1X Y 11 41!1UX Y "1# U$41%4: ; I? < % : ; I$ > $ > $ >   I : ;  : ;I8 : ; : ; I8 I !I/ : ; I : ; I8  : ; .: ; ' @: ; I4: ; I4I4  .: ; I 4: ; I4: ; I  4: ; I &I.? : ; ' I@1UX Y  U41 41! ".: ; ' #: ; I$1%41 &.? : ; ' @': ; I (: ; I) U*!I/+4: ; I? < U%# init.cN /build/buildd/glibc-2.7/build-tree/i386-libc/csucrti.S`!/!=Z!gg//L(!/!=Z! /usr/include/usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/include/systest-client.cstdlib.hstddef.htypes.hstdio.hlibio.hstdarg.htypes.ht=󻻻#f XuKtge<ZCw.]#1Of1.geY= t9X)>fq"5<~ 5'ZA?J6XJf6X..!DY-g/megeg[$0dY;ʻu ׼sJ -hgvE /usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/includeio.cstddef.htypes.hlibio.hstdio.hstdint.hmfs.h ==YJ==YJ==YMg1z /-Y/xiq1Y;=Y;=Y==hu4jkWK;=/;MR/-//,>g ˃X;/YwK!j;0 vK/x;YM+ /usr/include/usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/include/sysvstream.cstdlib.hstddef.htypes.hlibio.hstdio.htime.htypes.hstdint.hmfs.h2&z.?idL@* Jʑ-/Xg׼M %W=!K/Z"$/"k<uj<jtd <cJt~KL<~[-giI=Wg/;=w9w0x4 V>:hh1UhY4!2t6xf6Pt,b2\t h:L"e!!===,h-g/t» ;/ttkh:L:>ZGtt1 /usr/include/usr/include/bits/usr/lib/gcc/i486-linux-gnu/4.2.3/includemfs.cstdlib.hstring2.hstddef.htypes.hlibio.hstdio.hstdint.hmfs.h X>r>,x=s~.)kgLd. t `dtd<.TXYu=WgYeK;/Ymt  Xx? Je//xJ=ge/8jb2*xj."N;/quxXDA#;/=1KILe=Eyk3l,hK-/v< fe=gs!Bz.4E3t~tggYu="3u:?:=Yg7]j.pX<p<Xf׻' Wz &ifX]tv> uf XZX a3yX)AKX^yJ<;wgyt-=jv$YI/nIyJZytfI\ZyJu JJyt  /usr/include/bits/usr/include/usr/lib/gcc/i486-linux-gnu/4.2.3/includequery.cstring2.hstdlib.hstddef.htypes.hlibio.hstdio.hstdint.hmfs.h@+t=dɄegdZ=YYuf u< . XwJuu3;uuNPS.I,03֐,No֐,N /usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/includepartition.cstddef.htypes.hlibio.hstdio.hstdint.hmfs.hpTNL/s=sOa3X.hv,hy@g! tf XVd0yXus  /usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/includecrc.cstddef.htypes.hlibio.hstdio.hstdint.hmfs.htf .=;=q1p.p.Ks=JKv> /usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/includeobject.cstddef.htypes.hlibio.hstdio.hstdint.hmfs.h&&=hJpXK <w< XWxw. s /usr/lib/gcc/i486-linux-gnu/4.2.3/include/usr/include/bits/usr/includeschema.cstddef.htypes.hlibio.hstdio.hstdint.hmfs.hpreload_schema.hиU?/;//Ys|zg,=/:s$/f#hJ;=eg>9>=eg?8>>rh=sWuu .wX6"z<^qyKju<Qf؃-/$.uu[<-/-//==e_'h:>N+eYv)gi9iLNytm>UxN /build/buildd/glibc-2.7/build-tree/i386-libc/csucrtn.S !!!d!!!| AB D(ЍD  F AB D&AB | t AB t AB t AB t IAB tp[AB MEtЕ AB tAB F tAB IFF| dAM d AD EDd$AB dkAB FdPAB Id AB E| ( AD (@BAB F(AB F(0AB G(^AB IF(lAB I(AB AG(0AB F(PAB G( AB F| l@AB DlUAB FlpAB BFl 8AB l`!AB lAB FF| , AB E,AB I,:AB F,0:AB F| pAFB AEAB I| AB C| D'AB F|  xиAB ACFxAB Fx9AB IIxоXAB x0uAB short unsigned intshort int_IO_stdin_usedlong long unsigned intGNU C 4.2.3 (Debian 4.2.3-5)unsigned char/build/buildd/glibc-2.7/build-tree/glibc-2.7/csuinit.clong long int__quad_t_old_offset__s1_lenusage_IO_save_endsize_t__s2_len_IO_write_ptrmain_IO_buf_base__s1_markers_IO_read_endfilenamehostnameformat_lockmegs_cur_column/home/prh/gits/vstream-client_posargvatol_sbuf_IO_FILEargc_IO_marker_shortbuf__result_IO_write_base_unused2_IO_read_ptr_IO_buf_endseconds_next__pad1__pad2__pad3__pad4__pad5start_timetest-client.cbuffer__builtin_va_list_IO_write_end__off64_tdashes_chain__off_t_IO_backup_basestdin_flags2_mode_IO_read_base__gnuc_va_list_vtable_offsetoutput_IO_save_base_filenovstream_error__nptr_flagsstdout_IO_lock_tvstream_set_socket_fdvserver_receiveparam1nreqvserver_cmdreadahead_enabledmfs_runparam2vserver_read_reqdiscarduint32_tuint16_tvstream_mfs_readaheadvstream_mfs_read_partialio.caddyvstream_io_need_bswapcomingvserver_vstream_read_sectorsbuf2vservercommandvstream_open_socketsfilePartsrecTimedirNametm_zonemfs_direntvstream_startstreamcalcFsidlongListdirListvstream_startfileNoChunkOffsettm_wdaytm_gmtoffbuffuint8_tblankTitlefilePartsTotalvstream_list_streamsvstream.cmfs_obj_attrtm_hourtm_monrecTimetmvstream_totalSizesNowShowingvstream_load_chunkvstream_streamsizeatoifileChunkfileNotm_yearmyfsidtm_mdaypcountifsidtm_ydayfileSizetm_mintm_isdstpesFileIdlastFsidfilePart__time_tmypartfoffsettm_secchunksindexvstream_fsidtooffsetfileoffsetmfs_inodetotal_sectorsvstream_mfs_resolveload_zonesdonebackup_sectorbackup_next_zonemap_ptrdflagsnum_zoneshash1dsizemfs.cstatemapdataper_chunkvstream_mfs_fsid_sizenext_fsidnum_runsjunkmeta_dirzone_sectorvstream_mfs_load_inodetotal_inodesnext_zone_ptr1__sepgeom1geom2geom3zone_sizebuddy_sizevstream_mfs_fsid_preaduint64_tbackup_zonemap_ptrvstream_fsid_hashnext_zonemap_sizemeta_sizetypexxload_superlast_fsidmagicunitsdevlistfill1fill2fill3fill4fill5vstream_mfs_dir_freezone_startmfs_supermfs_zone_map__strtok_r_1cmfs_dirvstream_mfs_fsid_type__nextpvstream_query_partret_gmfs_subobj_headervstream_myisdigitlen_gfillsubobj_glen1name_gvstream_query_stringvstream_query_intmfs_attr_headerquery.cvstream_query_patheltypeobjattrquery_objectloadedobj_typeload_objectcallbackour_s_addrconnect2Server_with_afin_addr_tserver_addresssocket_server_fdSOCK_STREAMhostentsin_zeroSOCK_RDMh_name__suseconds_t__arrsin_addrh_addrtypefd_settimevalfds_bitsvstream_vstream_open_socket_outsin_familydesch_aliaseserr_len__socket_typesin_portsa_familytv_secserver_address_sizeh_lengthh_addr_listutil.cvstream_write_all__fd_maskvstream_read_allSOCK_PACKETverbtv_usecsockaddrhostvstream_byte_swapfoursa_family_tSOCK_DGRAMsockaddr_insa_dataSOCK_RAWSOCK_SEQPACKETin_port_tboot_startnum_partitionsmap_countdata_startboot_load2processorvstream_partition_parseboot_entry2boot_entrystart_blockpartition.cboot_loadtotaluse_ptablevstream_partition_total_sizestatusboot_sizepmapsblock_countpmapboot_cksumsignaturetivo_partitionres1data_countcrc.ccrc32tabcrc_savedcrc32bytesvstream_check_crcparse_subobjparse_attrobject_fnobject.cvstream_parse_objectmfs_obj_headeriattrcurrent_typetypes__PRETTY_FUNCTION__vstream_schema_typeitypeschema.cload_callback2vstream_schema_attribpreload_schemaatypepreload_schema_structattrspreload_schema_tablepreload_schema_tschema_addattr_typeload_callback1flagobjtypettutQttu q +S+ u &S&u q .V.StSVqESSS &V&9SB u&uSVMSV<SVeSVPRL u&uV u&u`vuvuu>u>tutuPuuuuEuEu u&9u9u W{W PP ueu u P u !P!uj u&ut u&uttutt uttu !t!#t#-u01t13t3yu0__yuttuPSRVttuPRttuuWu WVuV+:Q:upQvupvQ7oSwSS4SsSA[R!RVttuuuWu WVuVSSSttuttu>>R>>Vu V>>WuWttutt;u::u;kpP9W7S@AtACtC u@ee ueru~u~8 u~erupup8 upP`SEKSeru~ u~PRP Pttu@@u !u!$u`u$u`YYPutPulPRttu !t!#t#bu 338W8SVS\W\bupqtqstsupPuhPuhPuhpRudupWup"WupWWP(HPQQ"HQSPS"$P&SSSttu!!*S*.u.uSuwuwSuttuVuVutt\u  \uXXiu i99Mu M4u 4\u u{u\u{XXfuVfiuiVSV4u4BSVBPuP\XfV94VXiu{94u{X^P^iR?CRCKSKYRYcPcjRj{P{RSXiu{u{,4u{=Bu{Xiu{64u{2eSVASVBHSVP\SVXiu{94u{XeS9CS4S`atactc u` u` u VVBRBVV VuTuT uTuXSuXVuX uXS^SS SfWUWWu\Wu\ Wu`Wuptt/ u V V , V% W W - W0 1 t1 3 t3 u  t  t  u   ) P) + u+ 5 R5 = P= A uA R6 L R  R+ 5 uTD  uT+ 5 uX  uX+ 5 u`K h Sh u` Q  u`  S  u`+ 1 S S R SV  S  S+ 5 u\  u\+ 5 up  up+ 3 W W T WV  WttuSuSutt%u((_u_jju%Rup(R(up%RHH_u_jju%RpStS%SSqVtVS%V(rWtW%W"2P_jP%P01t13t3u0ZZu0ZZu 0uP7Vttuuu !t!#t#AuPQtQStSuPffxRxu Ru Pff~V~uVuttuSuS$P$=u =VPVu PRPu =ERrRRttuaa>u>HHu>HHYuphxup"YulexulPP<NPYhP!WWYxW>YQPQPepPGPtt uW uV u S uP PttJu&&HWHJu&&GVGJu &&FSFJu(>P@JPttAu:Q=AQ:RPQtQStSub@WBWWYWSVS?VBVVYVttu22Vu 22u$WS4mRmuRtt'u'u`'u\'uX?!W? Vttu(P(GVJVPVPVR W (R(HWJWWRW(Q-QQFSFJuJSuSkRttuuululuhuhVVV$>VJVududu`u`SS>@SYSttuV u Vu   *u *GGu W~P_WttXuPXu (R(FuFQRQXu`atactcu`vv~P~u `vvRuRu`v vQuQu`L_vv:[!y~kq"f"+"+"+NX49 U \$V= A  D = A  D   6 V y  6 V y H_tH_t%SHY'}Yx:H" `~pvXm-L0Q,.0Q,.~dsJYBEGGU|~`tX[dh.symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str.debug_loc.debug_ranges#(( 5HH\1o$; ȂCȅKoVV`Xo0g p h y`` 0t pp 3LL@@p ثܫ4     0#$l)M4w,  -0:8V,&CQ %c = (HȂȅV  `  p Lثܫ !",:G ]lsЌ   p[ Е  "1;MS j$y @`@`    &и 1`q7` P@ V bpw$0,(ܫ  P4) 1lD  Z j:  p p   P  I     g(5=U PgbLhzppA X2#4EP^  ppF7e@ ^ 2Cl ZFl9 & $ $`;Z 90u @B * >P0 f xeY԰u'  8 : оX  6k K<Pb {     @`!  7 `+' 0: 8 ԰? 0 J ;^  ~  а E T W     P   2 Ѝ 7 ` init.cinitfini.ccrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST____do_global_dtors_auxcompleted.5843p.5841frame_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_auxtest-client.cio.creadahead_enabledneed_bswapvservervserver_read_reqvserver_receivereadahead.5114vstream.cvstream_totalSizemfs.cvstream_mfs_load_inodelast_fsid.5167total_inodesnum_zoneszonesin.5166superquery.cloadedsubobj_gname_gcallbacklen_gret_gutil.cpartition.cuse_ptablenum_partitionscrc.ccrc32tabobject.cschema.cschema_addattrs__PRETTY_FUNCTION__.5119typesloaded.5139preload_schema_tablename.5354current_typename.5328iattr.5329_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_start__errno_location@@GLIBC_2.0lastFsidsprintf@@GLIBC_2.0mfs_dirconnect@@GLIBC_2.0vstream_mfs_readahead__libc_csu_finiinet_ntoa@@GLIBC_2.0vstream_byte_swapquery_object_startvstream_mfs_resolveload_supervstream_open_socket__gmon_start___Jv_RegisterClasses_fp_hwvstream_load_chunkrealloc@@GLIBC_2.0localtime@@GLIBC_2.0vstream_query_pathstrchr@@GLIBC_2.0_finicalloc@@GLIBC_2.0strncpy@@GLIBC_2.0putchar@@GLIBC_2.0write@@GLIBC_2.0vstream_partition_total_sizememset@@GLIBC_2.0fopen64@@GLIBC_2.1__libc_start_main@@GLIBC_2.0strrchr@@GLIBC_2.0ntohl@@GLIBC_2.0htons@@GLIBC_2.0__assert_fail@@GLIBC_2.0vstream_fsid_hashread@@GLIBC_2.0_IO_stdin_usedstrtol@@GLIBC_2.0free@@GLIBC_2.0__data_startfflush@@GLIBC_2.0socket@@GLIBC_2.0inet_aton@@GLIBC_2.0vstream_query_partfclose@@GLIBC_2.1vstream_mfs_fsid_typentohs@@GLIBC_2.0vstream_mfs_fsid_preadmemcpy@@GLIBC_2.0vstream_schema_attribstrlen@@GLIBC_2.0vstream_errorfilePartsTotalvstream_start__dso_handlestrcpy@@GLIBC_2.0pmaps__libc_csu_initprintf@@GLIBC_2.0load_callback2vstream_mfs_dir_freevstream_schema_typeselect@@GLIBC_2.0vstream_mfs_fsid_sizevstream_check_crcclose@@GLIBC_2.0fwrite@@GLIBC_2.0time@@GLIBC_2.0__bss_startmalloc@@GLIBC_2.0vstream_parse_objectdirListvstream_query_intvstream_write_allload_callback1vserver_vstream_read_sectorsvstream_list_streams_endstdout@@GLIBC_2.0vstream_mfs_read_partialputs@@GLIBC_2.0fcntl@@GLIBC_2.0usagevstream_fsidtooffsetvstream_set_socket_fdhtonl@@GLIBC_2.0vfprintf@@GLIBC_2.0vstream_query_stringgetsockopt@@GLIBC_2.0filePartsvstream_read_all_edataload_zonessnprintf@@GLIBC_2.0vstream_vstream_open_socket_outgethostbyname@@GLIBC_2.0filePartvstream_partition_parsestrcmp@@GLIBC_2.0__strdup@@GLIBC_2.0vstream_io_need_bswapvstream_streamsizevstream_startstream__i686.get_pc_thunk.bxmain_initvstream-client-1.2/vstream-client.h000066400000000000000000000007671102133242400174210ustar00rootroot00000000000000#ifndef _VSTREAM_H #define _VSTREAM_H #include int vstream_start( ); int vstream_startstream( char *fsid ); int64_t vstream_streamsize( ); void vstream_list_streams( int longList ); int vstream_load_chunk( char *fsid, unsigned char *buff, int size, int64_t offset ); void vstream_set_socket_fd( int fd ); int vstream_open_socket( char *addy ); // you must implement this if you link against this library: void vstream_error( const char *format, ... ); #define VSERVER_PORT 8074 #endif vstream-client-1.2/vstream.c000066400000000000000000000173331102133242400161350ustar00rootroot00000000000000/* Glue to play a stream from a remote TiVo * * tivo@wingert.org, February 2003 * * Copyright (C) 2003 Christopher R. Wingert * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "mfs.h" #include "vstream-client.h" #define CHUNKSIZE ( 128 * 1024 ) struct sNowShowing { char dirName[ 80 ]; char blankTitle[ 80 ]; }; struct sNowShowing dirList[] = { { "/Recording/LiveCache", "Live TV Buffer" }, { "/Recording/NowShowingByTitle", "Now Showing Title" }, { "/Recording/NowShowing", "Now Showing Title" }, { "/Recording/Complete", "Now Showing Title" }, { "/Recording/NowShowingByBucketTitle", "Now Showing Title" }, { "", "" } }; struct sfileParts { int fileNo; int64_t fileSize; int chunks; }; char lastFsid[ 80 ] = ""; int filePart = -1; struct sfileParts fileParts[ 255 ]; int filePartsTotal = 0; static int64_t vstream_totalSize = 0; int vstream_startstream( char *fsid ) { struct mfs_obj_attr *obj; int pcount; int index; int ifsid; char calcFsid[ 80 ]; unsigned char *buffer; int pesFileId; int size; int count; char myfsid[ 80 ]; char *mypart; if ( strcmp( fsid, lastFsid ) != 0 ) { strcpy( myfsid, fsid ); mypart = strchr( myfsid, '/' ); if ( mypart != 0 ) { *mypart = 0; mypart++; filePart = atoi( mypart ); } ifsid = vstream_mfs_resolve( myfsid ); if ( ifsid > 0 ) { vstream_totalSize = 0; obj = query_object( ifsid, "Part", &pcount ); for( index = 0 ; index < pcount ; index ++ ) { sprintf( calcFsid, "Part/%d/File", obj[ index ].subobj ); fileParts[ index ].fileNo = vstream_query_int( ifsid, calcFsid ); // HACK - Ignore last chunk of a Part File // Why? I have no idea. fileParts[ index ].fileSize = vstream_mfs_fsid_size( fileParts[ index ].fileNo ) - 0x20000; fileParts[ index ].chunks = ( fileParts[ index ].fileSize / CHUNKSIZE ); } free( obj ); filePartsTotal = pcount; if ( filePart != -1 ) { if ( filePart > filePartsTotal ) { vstream_error("vstream_fsidtoparts(): Invalid Part File %d\n", filePart); return( 1 ); } else { fileParts[ 0 ].fileNo = fileParts[ filePart ].fileNo; fileParts[ 0 ].fileSize = fileParts[ filePart ].fileSize; fileParts[ 0 ].chunks = fileParts[ filePart ].chunks; filePartsTotal = 1; } } for( index = 0 ; index < filePartsTotal ; index++ ) { vstream_totalSize += fileParts[ index ].fileSize; } // We have to go into the last chunk to figure its exact size buffer = malloc( CHUNKSIZE ); count = vstream_mfs_fsid_pread( fileParts[ filePartsTotal - 1 ].fileNo, buffer, 0, CHUNKSIZE ); if ( count == CHUNKSIZE ) { pesFileId = buffer[ 0x00 ] << 24 | buffer[ 0x01 ] << 16 | buffer[ 0x02 ] << 8 | buffer[ 0x03 ]; if ( pesFileId == 0xf5467abd ) { vstream_totalSize -= fileParts[ filePartsTotal - 1 ].fileSize; size = buffer[ 0x0c ] << 24 | buffer[ 0x0d ] << 16 | buffer[ 0x0e ] << 8 | buffer[ 0x03 ]; size /= 256; size -= 4; size *= CHUNKSIZE; fileParts[ filePartsTotal - 1 ].fileSize = size; fileParts[ filePartsTotal - 1 ].chunks = ( size / CHUNKSIZE ); vstream_totalSize += size; } } free( buffer ); strcpy( lastFsid, fsid ); } else { filePartsTotal = 0; } } return( 0 ); } int64_t vstream_streamsize( ) { return( vstream_totalSize ); } void vstream_fsidtooffset( int chunk, int *fileNo, int64_t *fileChunk ) { int index; *fileNo = 0; *fileChunk = 0; for( index = 0 ; index < filePartsTotal ; index++ ) { if ( chunk >= fileParts[ index ].chunks ) { chunk -= fileParts[ index ].chunks; } else { break; } } if ( chunk < fileParts[ index ].chunks ) { *fileNo = fileParts[ index ].fileNo; *fileChunk = chunk; } } int vstream_load_chunk( char *fsid, unsigned char *buff, int size, int64_t foffset ) { int count; int64_t chunk; int64_t fileoffset; int fileNo; int64_t fileNoChunkOffset; int64_t offset; vstream_mfs_readahead( 1 ); if ( vstream_startstream( fsid ) == 1 ) { return( 0 ); } if ( filePartsTotal <= 0 ) { return( 0 ); } if ( foffset >= vstream_streamsize() ) { return( 0 ); } chunk = foffset / CHUNKSIZE; offset = foffset - ( chunk * CHUNKSIZE ); vstream_fsidtooffset( chunk, &fileNo, &fileNoChunkOffset ); fileoffset = ( fileNoChunkOffset * CHUNKSIZE ) + offset; count = vstream_mfs_fsid_pread( fileNo, buff, fileoffset, size ); return( count ); } void vstream_list_streams( int longList ) { struct mfs_dirent *dir; struct mfs_obj_attr *obj; u32 count; u32 h; u32 i; int pcount; time_t recTime; struct tm *recTimetm; if (vstream_start()) return; h = 0; while( strlen( dirList[ h ].dirName ) > 0 ) { dir = mfs_dir( vstream_mfs_resolve( dirList[ h ].dirName ), &count ); for ( i = 0 ; i < count ; i++ ) { obj = query_object( dir[ i ].fsid, "Part", &pcount ); free( obj ); recTime = ( vstream_query_int( dir[ i ].fsid, "StartDate" ) * 86400 ); recTime += vstream_query_int( dir[ i ].fsid, "StartTime" ) + 60; recTimetm = localtime( &recTime ); recTimetm->tm_year %= 100; vstream_error( "%d", vstream_query_int( dir[ i ].fsid, "Part" ) ); vstream_error( " -- " ); vstream_error( "%2.2d/%2.2d/%2.2d", recTimetm->tm_mon + 1, recTimetm->tm_mday, recTimetm->tm_year ); vstream_error( " " ); vstream_error( "%2.2d:%2.2d", recTimetm->tm_hour, recTimetm->tm_min ); vstream_error( " -- " ); vstream_error( "%02d", pcount ); vstream_error( " -- " ); vstream_error( "%s", vstream_query_string( dir[ i ].fsid, "Showing/Station/CallSign" ) ); vstream_error( "\n" ); if (longList) { vstream_error("\t%s -- ", vstream_query_string( dir[ i ].fsid, "Showing/Program/Title" )); vstream_error("%s\n", vstream_query_string( dir[ i ].fsid, "Showing/Program/EpisodeTitle" )); } } if ( dir ) vstream_mfs_dir_free( dir ); h++; } } int vstream_start() { if (load_super()) return 1; if (load_zones()) return 1; return 0; }