MythTV  master
Macros | Functions
ts.h File Reference
#include "ringbuffer.h"
#include "mpg_common.h"
Include dependency graph for ts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TS_SIZE   188
 
#define TRANS_ERROR   0x80
 
#define PAY_START   0x40
 
#define TRANS_PRIO   0x20
 
#define PID_MASK_HI   0x1F
 
#define TRANS_SCRMBL1   0x80
 
#define TRANS_SCRMBL2   0x40
 
#define ADAPT_FIELD   0x20
 
#define PAYLOAD   0x10
 
#define COUNT_MASK   0x0F
 
#define DISCON_IND   0x80
 
#define RAND_ACC_IND   0x40
 
#define ES_PRI_IND   0x20
 
#define PCR_FLAG   0x10
 
#define OPCR_FLAG   0x08
 
#define SPLICE_FLAG   0x04
 
#define TRANS_PRIV   0x02
 
#define ADAP_EXT_FLAG   0x01
 
#define LTW_FLAG   0x80
 
#define PIECE_RATE   0x40
 
#define SEAM_SPLICE   0x20
 
#define TS_VIDPID   4101
 
#define TS_MP2PID   4201
 
#define TS_AC3PID   4301
 

Functions

uint16_t get_pid (const uint8_t *pid)
 
int find_pids (uint16_t *vpid, uint16_t *apid, uint16_t *ac3pid, uint8_t *buf, int len)
 
int find_pids_pos (uint16_t *vpid, uint16_t *apid, uint16_t *ac3pid, uint8_t *buf, int len, int *vpos, int *apos, int *ac3pos)
 
int write_video_ts (uint64_t vpts, uint64_t vdts, uint64_t SCR, uint8_t *buf, int *vlength, uint8_t ptsdts, ringbuffer *vrbuffer)
 
int write_audio_ts (int n, uint64_t pts, uint8_t *buf, int *alength, uint8_t ptsdts, ringbuffer *arbuffer)
 
int write_ac3_ts (int n, uint64_t pts, uint8_t *buf, int *alength, uint8_t ptsdts, int nframes, ringbuffer *ac3rbuffer)
 
void write_ts_patpmt (extdata_t *ext, int extcnt, uint8_t prog_num, uint8_t *buf)
 

Macro Definition Documentation

◆ TS_SIZE

#define TS_SIZE   188

Definition at line 33 of file ts.h.

◆ TRANS_ERROR

#define TRANS_ERROR   0x80

Definition at line 34 of file ts.h.

◆ PAY_START

#define PAY_START   0x40

Definition at line 35 of file ts.h.

◆ TRANS_PRIO

#define TRANS_PRIO   0x20

Definition at line 36 of file ts.h.

◆ PID_MASK_HI

#define PID_MASK_HI   0x1F

Definition at line 37 of file ts.h.

◆ TRANS_SCRMBL1

#define TRANS_SCRMBL1   0x80

Definition at line 40 of file ts.h.

◆ TRANS_SCRMBL2

#define TRANS_SCRMBL2   0x40

Definition at line 41 of file ts.h.

◆ ADAPT_FIELD

#define ADAPT_FIELD   0x20

Definition at line 42 of file ts.h.

◆ PAYLOAD

#define PAYLOAD   0x10

Definition at line 43 of file ts.h.

◆ COUNT_MASK

#define COUNT_MASK   0x0F

Definition at line 44 of file ts.h.

◆ DISCON_IND

#define DISCON_IND   0x80

Definition at line 47 of file ts.h.

◆ RAND_ACC_IND

#define RAND_ACC_IND   0x40

Definition at line 48 of file ts.h.

◆ ES_PRI_IND

#define ES_PRI_IND   0x20

Definition at line 49 of file ts.h.

◆ PCR_FLAG

#define PCR_FLAG   0x10

Definition at line 50 of file ts.h.

◆ OPCR_FLAG

#define OPCR_FLAG   0x08

Definition at line 51 of file ts.h.

◆ SPLICE_FLAG

#define SPLICE_FLAG   0x04

Definition at line 52 of file ts.h.

◆ TRANS_PRIV

#define TRANS_PRIV   0x02

Definition at line 53 of file ts.h.

◆ ADAP_EXT_FLAG

#define ADAP_EXT_FLAG   0x01

Definition at line 54 of file ts.h.

◆ LTW_FLAG

#define LTW_FLAG   0x80

Definition at line 57 of file ts.h.

◆ PIECE_RATE

#define PIECE_RATE   0x40

Definition at line 58 of file ts.h.

◆ SEAM_SPLICE

#define SEAM_SPLICE   0x20

Definition at line 59 of file ts.h.

◆ TS_VIDPID

#define TS_VIDPID   4101

Definition at line 61 of file ts.h.

◆ TS_MP2PID

#define TS_MP2PID   4201

Definition at line 62 of file ts.h.

◆ TS_AC3PID

#define TS_AC3PID   4301

Definition at line 63 of file ts.h.

Function Documentation

◆ get_pid()

uint16_t get_pid ( const uint8_t *  pid)

Definition at line 46 of file ts.c.

Referenced by find_pids_pos(), and replex_tsp().

◆ find_pids()

int find_pids ( uint16_t vpid,
uint16_t apid,
uint16_t ac3pid,
uint8_t *  buf,
int  len 
)

Definition at line 126 of file ts.c.

Referenced by find_pids_file(), and find_pids_stdin().

◆ find_pids_pos()

int find_pids_pos ( uint16_t vpid,
uint16_t apid,
uint16_t ac3pid,
uint8_t *  buf,
int  len,
int *  vpos,
int *  apos,
int *  ac3pos 
)

Definition at line 56 of file ts.c.

Referenced by find_all_pids_file(), and find_pids().

◆ write_video_ts()

int write_video_ts ( uint64_t  vpts,
uint64_t  vdts,
uint64_t  SCR,
uint8_t *  buf,
int *  vlength,
uint8_t  ptsdts,
ringbuffer vrbuffer 
)

Definition at line 237 of file ts.c.

Referenced by writeout_video().

◆ write_audio_ts()

int write_audio_ts ( int  n,
uint64_t  pts,
uint8_t *  buf,
int *  alength,
uint8_t  ptsdts,
ringbuffer arbuffer 
)

Definition at line 292 of file ts.c.

Referenced by writeout_ext().

◆ write_ac3_ts()

int write_ac3_ts ( int  n,
uint64_t  pts,
uint8_t *  buf,
int *  alength,
uint8_t  ptsdts,
int  nframes,
ringbuffer ac3rbuffer 
)

Definition at line 337 of file ts.c.

Referenced by writeout_ext().

◆ write_ts_patpmt()

void write_ts_patpmt ( extdata_t ext,
int  extcnt,
uint8_t  prog_num,
uint8_t *  buf 
)

Definition at line 389 of file ts.c.

Referenced by setup_multiplex(), and writeout_video().