MythTV  master
Typedefs | Functions
pes.cpp File Reference
#include <array>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <winsock2.h>
#include "pes.h"
#include "mythlogging.h"
Include dependency graph for pes.cpp:

Go to the source code of this file.

Typedefs

using pts_arr = std::array< uint8_t, 5 >
 

Functions

void printpts (int64_t pts)
 
void printptss (int64_t pts)
 
int64_t ptsdiff (uint64_t pts1, uint64_t pts2)
 
uint64_t uptsdiff (uint64_t pts1, uint64_t pts2)
 
int ptscmp (uint64_t pts1, uint64_t pts2)
 
uint64_t ptsadd (uint64_t pts1, uint64_t pts2)
 
void init_pes_in (pes_in_t *p, int t, ringbuffer *rb, int wi)
 
void get_pes (pes_in_t *p, uint8_t *buf, int count, void(*func)(pes_in_t *p))
 
static void init_ps (ps_packet *p)
 
static void kill_ps (ps_packet *p)
 
static void setlength_ps (ps_packet *p)
 
static void setl_ps (ps_packet *p)
 
static int cwrite_ps (uint8_t *buf, ps_packet *p, uint32_t length)
 
static int write_ps_header (uint8_t *buf, uint64_t SCR, uint32_t muxr, uint8_t audio_bound, uint8_t fixed, uint8_t CSPS, uint8_t audio_lock, uint8_t video_lock, uint8_t video_bound, uint8_t navpack)
 
static void get_pespts (const uint8_t *spts, pts_arr &pts)
 
int write_pes_header (uint8_t id, int length, uint64_t PTS, uint64_t DTS, uint8_t *obuf, int stuffing, uint8_t ptsdts)
 
void write_padding_pes (int pack_size, int extcnt, uint64_t SCR, uint64_t muxr, uint8_t *buf)
 
int write_video_pes (int pack_size, int extcnt, uint64_t vpts, uint64_t vdts, uint64_t SCR, uint64_t muxr, uint8_t *buf, int *vlength, uint8_t ptsdts, ringbuffer *vrbuffer)
 
int write_audio_pes (int pack_size, int extcnt, int n, uint64_t pts, uint64_t SCR, uint32_t muxr, uint8_t *buf, int *alength, uint8_t ptsdts, ringbuffer *arbuffer)
 
int write_ac3_pes (int pack_size, int extcnt, int n, uint64_t pts, uint64_t SCR, uint32_t muxr, uint8_t *buf, int *alength, uint8_t ptsdts, int nframes, int ac3_off, ringbuffer *ac3rbuffer)
 
int write_nav_pack (int pack_size, int extcnt, uint64_t SCR, uint32_t muxr, uint8_t *buf)
 

Typedef Documentation

◆ pts_arr

using pts_arr = std::array<uint8_t,5>

Definition at line 586 of file pes.cpp.

Function Documentation

◆ printpts()

void printpts ( int64_t  pts)

◆ printptss()

void printptss ( int64_t  pts)

Definition at line 60 of file pes.cpp.

Referenced by do_analyze().

◆ ptsdiff()

int64_t ptsdiff ( uint64_t  pts1,
uint64_t  pts2 
)

◆ uptsdiff()

uint64_t uptsdiff ( uint64_t  pts1,
uint64_t  pts2 
)

◆ ptscmp()

int ptscmp ( uint64_t  pts1,
uint64_t  pts2 
)

Definition at line 114 of file pes.cpp.

Referenced by check_times(), dummy_delete(), fix_audio(), ptsdiff(), use_video(), and which_ext().

◆ ptsadd()

uint64_t ptsadd ( uint64_t  pts1,
uint64_t  pts2 
)

Definition at line 139 of file pes.cpp.

◆ init_pes_in()

void init_pes_in ( pes_in_t p,
int  t,
ringbuffer rb,
int  wi 
)

◆ get_pes()

void get_pes ( pes_in_t p,
uint8_t *  buf,
int  count,
void(*)(pes_in_t *p)  func 
)

Definition at line 164 of file pes.cpp.

Referenced by find_pes_ids(), replex_fill_buffers(), and replex_tsp().

◆ init_ps()

static void init_ps ( ps_packet p)
static

Definition at line 432 of file pes.cpp.

Referenced by kill_ps(), and write_ps_header().

◆ kill_ps()

static void kill_ps ( ps_packet p)
static

Definition at line 442 of file pes.cpp.

Referenced by write_ps_header().

◆ setlength_ps()

static void setlength_ps ( ps_packet p)
static

Definition at line 449 of file pes.cpp.

Referenced by setl_ps().

◆ setl_ps()

static void setl_ps ( ps_packet p)
static

Definition at line 455 of file pes.cpp.

Referenced by write_ps_header().

◆ cwrite_ps()

static int cwrite_ps ( uint8_t *  buf,
ps_packet p,
uint32_t  length 
)
static

Definition at line 462 of file pes.cpp.

Referenced by write_ps_header().

◆ write_ps_header()

static int write_ps_header ( uint8_t *  buf,
uint64_t  SCR,
uint32_t  muxr,
uint8_t  audio_bound,
uint8_t  fixed,
uint8_t  CSPS,
uint8_t  audio_lock,
uint8_t  video_lock,
uint8_t  video_bound,
uint8_t  navpack 
)
static

◆ get_pespts()

static void get_pespts ( const uint8_t *  spts,
pts_arr pts 
)
static

Definition at line 588 of file pes.cpp.

Referenced by write_pes_header().

◆ write_pes_header()

int write_pes_header ( uint8_t  id,
int  length,
uint64_t  PTS,
uint64_t  DTS,
uint8_t *  obuf,
int  stuffing,
uint8_t  ptsdts 
)

◆ write_padding_pes()

void write_padding_pes ( int  pack_size,
int  extcnt,
uint64_t  SCR,
uint64_t  muxr,
uint8_t *  buf 
)

Definition at line 677 of file pes.cpp.

Referenced by writeout_padding().

◆ write_video_pes()

int write_video_pes ( int  pack_size,
int  extcnt,
uint64_t  vpts,
uint64_t  vdts,
uint64_t  SCR,
uint64_t  muxr,
uint8_t *  buf,
int *  vlength,
uint8_t  ptsdts,
ringbuffer vrbuffer 
)

Definition at line 689 of file pes.cpp.

Referenced by writeout_video().

◆ write_audio_pes()

int write_audio_pes ( int  pack_size,
int  extcnt,
int  n,
uint64_t  pts,
uint64_t  SCR,
uint32_t  muxr,
uint8_t *  buf,
int *  alength,
uint8_t  ptsdts,
ringbuffer arbuffer 
)

Definition at line 739 of file pes.cpp.

Referenced by writeout_ext().

◆ write_ac3_pes()

int write_ac3_pes ( int  pack_size,
int  extcnt,
int  n,
uint64_t  pts,
uint64_t  SCR,
uint32_t  muxr,
uint8_t *  buf,
int *  alength,
uint8_t  ptsdts,
int  nframes,
int  ac3_off,
ringbuffer ac3rbuffer 
)

Definition at line 784 of file pes.cpp.

Referenced by writeout_ext().

◆ write_nav_pack()

int write_nav_pack ( int  pack_size,
int  extcnt,
uint64_t  SCR,
uint32_t  muxr,
uint8_t *  buf 
)

Definition at line 837 of file pes.cpp.

Referenced by setup_multiplex(), and writeout_video().