OSDN Git Service

add dist
[rec10/rec10-git.git] / dist / trunk / tstools / epgdump / ts.h
diff --git a/dist/trunk/tstools/epgdump/ts.h b/dist/trunk/tstools/epgdump/ts.h
new file mode 100755 (executable)
index 0000000..da39812
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef TS_H
+#define TS_H 1
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "util.h"
+
+#define TSPAYLOADMAX 184
+
+typedef struct _TSpacket { 
+       char     sync;
+       int      transport_error_indicator;
+       int      payload_unit_start_indicator;
+       int      transport_priority;
+       int      pid;
+       int      transport_scrambling_control;
+       int      adaptation_field_control;
+       int      continuity_counter;
+       int      adaptation_field;
+       unsigned char payload[TSPAYLOADMAX];
+       int      payloadlen;
+       int      rcount;
+} TSpacket;
+
+typedef struct _SECcache { 
+       int      pid;
+       unsigned char buf[MAXSECLEN];
+       int      seclen;
+       int      setlen;
+       TSpacket cur;
+       int      curlen;
+       int      cont;
+} SECcache;
+
+#ifdef __cplusplus
+extern "C"{
+#endif /* __cplusplus */
+
+       SECcache *readTS(FILE *in, SECcache secs[], int secscount);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif