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

Go to the source code of this file.

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 uint32_t scr_base_ps (const uint8_t *scr)
 
static uint16_t scr_ext_ps (const uint8_t *scr)
 
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, uint8_t *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)
 

Function Documentation

◆ printpts()

void printpts ( int64_t  pts)

◆ printptss()

void printptss ( int64_t  pts)

Definition at line 59 of file pes.c.

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 116 of file pes.c.

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 140 of file pes.c.

◆ 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 165 of file pes.c.

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

◆ scr_base_ps()

static uint32_t scr_base_ps ( const uint8_t *  scr)
static

Definition at line 398 of file pes.c.

◆ scr_ext_ps()

static uint16_t scr_ext_ps ( const uint8_t *  scr)
static

Definition at line 421 of file pes.c.

◆ init_ps()

static void init_ps ( ps_packet p)
static

Definition at line 433 of file pes.c.

Referenced by kill_ps(), and write_ps_header().

◆ kill_ps()

static void kill_ps ( ps_packet p)
static

Definition at line 443 of file pes.c.

Referenced by write_ps_header().

◆ setlength_ps()

static void setlength_ps ( ps_packet p)
static

Definition at line 450 of file pes.c.

Referenced by setl_ps().

◆ setl_ps()

static void setl_ps ( ps_packet p)
static

Definition at line 457 of file pes.c.

Referenced by write_ps_header().

◆ cwrite_ps()

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

Definition at line 464 of file pes.c.

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,
uint8_t *  pts 
)
static

Definition at line 593 of file pes.c.

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 687 of file pes.c.

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 700 of file pes.c.

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 753 of file pes.c.

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 801 of file pes.c.

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 857 of file pes.c.

Referenced by setup_multiplex(), and writeout_video().