⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tot.c

📁 dvbsnoop is a DVB/MPEG stream analyzer program. The program can be used to sniff, monitor, debug, d
💻 C
字号:
/*$Id: tot.c,v 1.9 2004/10/17 22:20:36 rasc Exp $ DVBSNOOP a dvb sniffer  and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2004   Rainer.Scherg@gmx.de  (rasc) -- TOT section -- Time Offset Table -- ETSI EN 300 468     5.2.6$Log: tot.c,v $Revision 1.9  2004/10/17 22:20:36  rascsection decoding functions renamed due to preparation of private structuresRevision 1.8  2004/02/12 21:21:21  rascMHP AIT descriptorssome smaller changesRevision 1.7  2004/02/07 01:28:04  rascMHP Application  Information Tablesome AIT descriptorsRevision 1.6  2004/01/02 16:40:40  rascDSM-CC  INT/UNT descriptors completeminor changes and fixesRevision 1.5  2004/01/01 20:09:31  rascDSM-CC INT/UNT descriptorsPES-sync changed, TS sync changed,descriptor scopeother changesRevision 1.4  2003/10/24 22:17:21  rasccode reorg...Revision 1.3  2002/08/17 20:36:12  obino more compiler warningsRevision 1.2  2001/10/06 18:19:18  ToerliSteuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignetRevision 1.1  2001/09/30 13:05:20  rascdvbsnoop v0.7  -- Commit to CVS*/#include "dvbsnoop.h"#include "tot.h"#include "descriptors/descriptor.h"#include "strings/dvb_str.h"#include "misc/output.h"#include "misc/pkt_time.h"void section_TOT (u_char *b, int len){ typedef struct  _TOT {    u_int      table_id;    u_int      section_syntax_indicator;		    u_int      reserved_1;    u_int      reserved_2;    u_int      section_length;    u_long     UTC_time_MJD;    u_long     UTC_time_UTC;    u_int      reserved_3;    u_int      descriptors_loop_length;    // N  descriptor    u_long     crc; } TOT; TOT        t; int        len1;  t.table_id 			 = b[0]; t.section_syntax_indicator	 = getBits (b, 0, 8, 1); t.reserved_1 			 = getBits (b, 0, 9, 1); t.reserved_2 			 = getBits (b, 0, 10, 2); t.section_length		 = getBits (b, 0, 12, 12); t.UTC_time_MJD			 = getBits (b, 0, 24, 16); t.UTC_time_UTC			 = getBits (b, 0, 40, 24); t.reserved_3 			 = getBits (b, 0, 64, 4); t.descriptors_loop_length	 = getBits (b, 0, 68, 12); out_nl (3,"TOT-decoding...."); out_S2B_NL (3,"Table_ID: ",t.table_id, dvbstrTableID (t.table_id)); if (t.table_id != 0x73) {   out_nl (3,"wrong Table ID");   return; } out_SB_NL (3,"section_syntax_indicator: ",t.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",t.reserved_1); out_SB_NL (6,"reserved_2: ",t.reserved_2); out_SW_NL (5,"Section_length: ",t.section_length); out (3,"UTC_time: "); print_time40 (3, t.UTC_time_MJD,t.UTC_time_UTC); out_NL (3); out_SB_NL (6,"reserved_3: ",t.reserved_3); out_SW_NL (5,"Descriptors_loop_length: ",t.descriptors_loop_length); len1 = t.descriptors_loop_length; b   += 10; indent (+1); while (len1 > 0) {   int x;   x = descriptor (b, DVB_SI);   len1 -= x;   b += x; } indent (-1); out_NL (3); t.crc		 		 = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",t.crc);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -