| 1 |
#ifndef TS_H |
|---|
| 2 |
#define TS_H 1 |
|---|
| 3 |
|
|---|
| 4 |
#include <stdio.h> |
|---|
| 5 |
#include <stdlib.h> |
|---|
| 6 |
|
|---|
| 7 |
#include "util.h" |
|---|
| 8 |
|
|---|
| 9 |
#define TSPAYLOADMAX 184 |
|---|
| 10 |
|
|---|
| 11 |
typedef struct _TSpacket { |
|---|
| 12 |
char sync; |
|---|
| 13 |
int transport_error_indicator; |
|---|
| 14 |
int payload_unit_start_indicator; |
|---|
| 15 |
int transport_priority; |
|---|
| 16 |
int pid; |
|---|
| 17 |
int transport_scrambling_control; |
|---|
| 18 |
int adaptation_field_control; |
|---|
| 19 |
int continuity_counter; |
|---|
| 20 |
int adaptation_field; |
|---|
| 21 |
unsigned char payload[TSPAYLOADMAX]; |
|---|
| 22 |
int payloadlen; |
|---|
| 23 |
int rcount; |
|---|
| 24 |
} TSpacket; |
|---|
| 25 |
|
|---|
| 26 |
typedef struct _SECcache { |
|---|
| 27 |
int pid; |
|---|
| 28 |
unsigned char buf[MAXSECLEN]; |
|---|
| 29 |
int seclen; |
|---|
| 30 |
int setlen; |
|---|
| 31 |
TSpacket cur; |
|---|
| 32 |
int curlen; |
|---|
| 33 |
int cont; |
|---|
| 34 |
} SECcache; |
|---|
| 35 |
|
|---|
| 36 |
#ifdef __cplusplus |
|---|
| 37 |
extern "C"{ |
|---|
| 38 |
#endif |
|---|
| 39 |
|
|---|
| 40 |
SECcache *readTS(FILE *in, SECcache secs[], int secscount); |
|---|
| 41 |
|
|---|
| 42 |
#ifdef __cplusplus |
|---|
| 43 |
} |
|---|
| 44 |
#endif |
|---|
| 45 |
|
|---|
| 46 |
#endif |
|---|