MythTV  master
Functions | Variables
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.

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)
 

Variables

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

Function Documentation

◆ get_pid()

uint16_t get_pid ( const uint8_t *  pid)

Definition at line 48 of file ts.cpp.

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 128 of file ts.cpp.

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 58 of file ts.cpp.

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 233 of file ts.cpp.

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 288 of file ts.cpp.

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 331 of file ts.cpp.

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 381 of file ts.cpp.

Referenced by setup_multiplex(), and writeout_video().

Variable Documentation

◆ TS_SIZE

constexpr ssize_t TS_SIZE { 188 }
staticconstexpr

Definition at line 33 of file ts.h.

◆ TRANS_ERROR

constexpr uint8_t TRANS_ERROR { 0x80 }
staticconstexpr

Definition at line 34 of file ts.h.

◆ PAY_START

constexpr uint8_t PAY_START { 0x40 }
staticconstexpr

Definition at line 35 of file ts.h.

Referenced by find_pids_pos(), and replex_tsp().

◆ TRANS_PRIO

constexpr uint8_t TRANS_PRIO { 0x20 }
staticconstexpr

Definition at line 36 of file ts.h.

◆ PID_MASK_HI

constexpr uint8_t PID_MASK_HI { 0x1F }
staticconstexpr

Definition at line 37 of file ts.h.

Referenced by get_pid().

◆ TRANS_SCRMBL1

constexpr uint8_t TRANS_SCRMBL1 { 0x80 }
staticconstexpr

Definition at line 40 of file ts.h.

◆ TRANS_SCRMBL2

constexpr uint8_t TRANS_SCRMBL2 { 0x40 }
staticconstexpr

Definition at line 41 of file ts.h.

◆ ADAPT_FIELD

constexpr uint8_t ADAPT_FIELD { 0x20 }
staticconstexpr

Definition at line 42 of file ts.h.

Referenced by find_pids_pos(), and replex_tsp().

◆ PAYLOAD

constexpr uint8_t PAYLOAD { 0x10 }
staticconstexpr

Definition at line 43 of file ts.h.

◆ COUNT_MASK

constexpr uint8_t COUNT_MASK { 0x0F }
staticconstexpr

Definition at line 44 of file ts.h.

◆ DISCON_IND

constexpr uint8_t DISCON_IND { 0x80 }
staticconstexpr

Definition at line 47 of file ts.h.

◆ RAND_ACC_IND

constexpr uint8_t RAND_ACC_IND { 0x40 }
staticconstexpr

Definition at line 48 of file ts.h.

◆ ES_PRI_IND

constexpr uint8_t ES_PRI_IND { 0x20 }
staticconstexpr

Definition at line 49 of file ts.h.

◆ PCR_FLAG

constexpr uint8_t PCR_FLAG { 0x10 }
staticconstexpr

Definition at line 50 of file ts.h.

◆ OPCR_FLAG

constexpr uint8_t OPCR_FLAG { 0x08 }
staticconstexpr

Definition at line 51 of file ts.h.

◆ SPLICE_FLAG

constexpr uint8_t SPLICE_FLAG { 0x04 }
staticconstexpr

Definition at line 52 of file ts.h.

◆ TRANS_PRIV

constexpr uint8_t TRANS_PRIV { 0x02 }
staticconstexpr

Definition at line 53 of file ts.h.

◆ ADAP_EXT_FLAG

constexpr uint8_t ADAP_EXT_FLAG { 0x01 }
staticconstexpr

Definition at line 54 of file ts.h.

◆ LTW_FLAG

constexpr uint8_t LTW_FLAG { 0x80 }
staticconstexpr

Definition at line 57 of file ts.h.

◆ PIECE_RATE

constexpr uint8_t PIECE_RATE { 0x40 }
staticconstexpr

Definition at line 58 of file ts.h.

◆ SEAM_SPLICE

constexpr uint8_t SEAM_SPLICE { 0x20 }
staticconstexpr

Definition at line 59 of file ts.h.

◆ TS_VIDPID

constexpr uint16_t TS_VIDPID { 4101 }
staticconstexpr

Definition at line 61 of file ts.h.

Referenced by write_ts_patpmt(), and write_video_ts().

◆ TS_MP2PID

constexpr uint16_t TS_MP2PID { 4201 }
staticconstexpr

Definition at line 62 of file ts.h.

Referenced by write_audio_ts(), and write_ts_patpmt().

◆ TS_AC3PID

constexpr uint16_t TS_AC3PID { 4301 }
staticconstexpr

Definition at line 63 of file ts.h.

Referenced by write_ac3_ts(), and write_ts_patpmt().