MythTV  master
Macros | Functions | Variables
ts.c File Reference
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <winsock2.h>
#include "ts.h"
#include "element.h"
#include "pes.h"
#include "mythlogging.h"
Include dependency graph for ts.c:

Go to the source code of this file.

Macros

#define PMTPID   0x20
 

Functions

uint16_t get_pid (const uint8_t *pid)
 
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 find_pids (uint16_t *vpid, uint16_t *apid, uint16_t *ac3pid, uint8_t *buf, int len)
 
static unsigned int crc32_04c11db7 (const unsigned char *d, int len, unsigned int crc)
 
static int write_ts_header (int pid, int payload_start, int count, int64_t SCR, uint8_t *obuf, int stuff)
 
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 unsigned int crc_table [256]
 

Macro Definition Documentation

◆ PMTPID

#define PMTPID   0x20

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_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().

◆ 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().

◆ crc32_04c11db7()

static unsigned int crc32_04c11db7 ( const unsigned char *  d,
int  len,
unsigned int  crc 
)
static

Definition at line 178 of file ts.c.

Referenced by write_ts_patpmt().

◆ write_ts_header()

static int write_ts_header ( int  pid,
int  payload_start,
int  count,
int64_t  SCR,
uint8_t *  obuf,
int  stuff 
)
static

Definition at line 189 of file ts.c.

Referenced by write_ac3_ts(), write_audio_ts(), write_ts_patpmt(), and write_video_ts().

◆ 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().

Variable Documentation

◆ crc_table

unsigned int crc_table[256]
static

Definition at line 133 of file ts.c.

Referenced by crc32_04c11db7().