Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ifo_tmt.c
Package: dvd-munitions.tar.gz [view]
Upload User: aoeyumen
Upload Date: 2007-01-06
Package Size: 3329k
Code Size: 2k
Category:
DVD
Development Platform:
Unix_Linux
- /*
- * TIME MAP TABLE
- *
- * Copyright (C) 1998,1999 Thomas Mirlacher
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * The author may be reached as dent@cosy.sbg.ac.at, or
- * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
- * Austria
- *
- *------------------------------------------------------------
- *
- */
- #ifdef PARSER
- #include <stdio.h>
- #endif
- #include <sys/types.h>
- #include <unistd.h>
- #include "ifo.h"
- #include "misc.h"
- #include "decode.h"
- #define TMT_SUB_LEN 4
- typedef struct {
- u_char tu : 8; // time unit (in seconds)
- u_int : 24; // don't know
- } tmt_sub_t;
- #ifdef PARSER
- /**
- *
- */
- void ifo_print_tmt (ifo_t *ifo)
- {
- u_char *ptr = ifo->data[ID_TMT];
- ifo_hdr_t *hdr = (ifo_hdr_t *) ifo->data[ID_TMT];
- int i;
- if (!ifo->data[ID_TMT])
- return;
- printf ("nTIME MAP TABLEn");
- printf ("---n");
- printf ("number of maps: %dn", ntohs (hdr->num));
- printf ("length of table: %dn", ntohl (hdr->len));
- ptr += IFO_HDR_LEN;
- for (i=0; i<ntohs (hdr->num); i++) {
- printf ("%d start 0x%xn", i, get4bytes (ptr));
- ptr += 4;
- }
- {
- tmt_sub_t *tmt_sub = (tmt_sub_t *) ptr;
- printf ("time unit (in seconds): %dn", tmt_sub->tu);
- ptr += TMT_SUB_LEN;
- }
- while (ptr < (((u_char *) hdr) + ntohl (hdr->len))) {
- printf ("0x%06x%c ", get4bytes (ptr)&0x7FFFFFFF,
- get4bytes (ptr)&0x80000000 ? 'L' : ' ');
- ptr += 4;
- }
- }
- #endif