MythTV  master
Functions
multiplex.c File Reference
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include "multiplex.h"
#include "ts.h"
#include "mythlogging.h"
Include dependency graph for multiplex.c:

Go to the source code of this file.

Functions

static int buffers_filled (multiplex_t *mx)
 
static int use_video (uint64_t vpts, extdata_t *ext, const int *aok, int n)
 
static int which_ext (extdata_t *ext, const int *aok, int n)
 
static int peek_next_video_unit (multiplex_t *mx, index_unit *viu)
 
static int get_next_video_unit (multiplex_t *mx, index_unit *viu)
 
static int peek_next_ext_unit (multiplex_t *mx, index_unit *extiu, int i)
 
static int get_next_ext_unit (multiplex_t *mx, index_unit *extiu, int i)
 
static uint8_t get_ptsdts (multiplex_t *mx, index_unit *viu)
 
static void writeout_video (multiplex_t *mx)
 
static void writeout_ext (multiplex_t *mx, int n)
 
static void writeout_padding (multiplex_t *mx)
 
void check_times (multiplex_t *mx, int *video_ok, int *ext_ok, int *start)
 
void write_out_packs (multiplex_t *mx, int video_ok, int *ext_ok)
 
void finish_mpg (multiplex_t *mx)
 
static int get_ts_video_overhead (int pktsize, sequence_t *seq)
 
static int get_ts_ext_overhead (int pktsize, audio_frame_t *extframe, extdata_t *ext, int cnt)
 
void init_multiplex (multiplex_t *mx, sequence_t *seq_head, audio_frame_t *extframe, int *exttype, const int *exttypcnt, uint64_t video_delay, uint64_t audio_delay, int fd, int(*fill_buffers)(void *p, int f), ringbuffer *vrbuffer, ringbuffer *index_vrbuffer, ringbuffer *extrbuffer, ringbuffer *index_extrbuffer, int otype)
 
void setup_multiplex (multiplex_t *mx)
 

Function Documentation

◆ buffers_filled()

static int buffers_filled ( multiplex_t mx)
static

Definition at line 9 of file multiplex.c.

Referenced by finish_mpg().

◆ use_video()

static int use_video ( uint64_t  vpts,
extdata_t ext,
const int *  aok,
int  n 
)
static

Definition at line 24 of file multiplex.c.

Referenced by write_out_packs().

◆ which_ext()

static int which_ext ( extdata_t ext,
const int *  aok,
int  n 
)
static

Definition at line 32 of file multiplex.c.

Referenced by write_out_packs().

◆ peek_next_video_unit()

static int peek_next_video_unit ( multiplex_t mx,
index_unit viu 
)
static

Definition at line 52 of file multiplex.c.

Referenced by get_next_video_unit(), and writeout_video().

◆ get_next_video_unit()

static int get_next_video_unit ( multiplex_t mx,
index_unit viu 
)
static

Definition at line 74 of file multiplex.c.

Referenced by setup_multiplex(), and writeout_video().

◆ peek_next_ext_unit()

static int peek_next_ext_unit ( multiplex_t mx,
index_unit extiu,
int  i 
)
static

Definition at line 100 of file multiplex.c.

Referenced by get_next_ext_unit().

◆ get_next_ext_unit()

static int get_next_ext_unit ( multiplex_t mx,
index_unit extiu,
int  i 
)
static

Definition at line 123 of file multiplex.c.

Referenced by setup_multiplex(), and writeout_ext().

◆ get_ptsdts()

static uint8_t get_ptsdts ( multiplex_t mx,
index_unit viu 
)
static

Definition at line 161 of file multiplex.c.

Referenced by writeout_video().

◆ writeout_video()

static void writeout_video ( multiplex_t mx)
static

Definition at line 180 of file multiplex.c.

Referenced by finish_mpg(), and write_out_packs().

◆ writeout_ext()

static void writeout_ext ( multiplex_t mx,
int  n 
)
static

Definition at line 314 of file multiplex.c.

Referenced by finish_mpg(), and write_out_packs().

◆ writeout_padding()

static void writeout_padding ( multiplex_t mx)
static

Definition at line 470 of file multiplex.c.

Referenced by write_out_packs().

◆ check_times()

void check_times ( multiplex_t mx,
int *  video_ok,
int *  ext_ok,
int *  start 
)

Definition at line 482 of file multiplex.c.

Referenced by do_replex(), finish_mpg(), and MPEG2replex::Start().

◆ write_out_packs()

void write_out_packs ( multiplex_t mx,
int  video_ok,
int *  ext_ok 
)

Definition at line 574 of file multiplex.c.

Referenced by do_replex(), finish_mpg(), and MPEG2replex::Start().

◆ finish_mpg()

void finish_mpg ( multiplex_t mx)

Definition at line 595 of file multiplex.c.

Referenced by replex_finish(), and MPEG2replex::WaitBuffers().

◆ get_ts_video_overhead()

static int get_ts_video_overhead ( int  pktsize,
sequence_t seq 
)
static

Definition at line 645 of file multiplex.c.

Referenced by init_multiplex().

◆ get_ts_ext_overhead()

static int get_ts_ext_overhead ( int  pktsize,
audio_frame_t extframe,
extdata_t ext,
int  cnt 
)
static

Definition at line 655 of file multiplex.c.

Referenced by init_multiplex().

◆ init_multiplex()

void init_multiplex ( multiplex_t mx,
sequence_t seq_head,
audio_frame_t extframe,
int *  exttype,
const int *  exttypcnt,
uint64_t  video_delay,
uint64_t  audio_delay,
int  fd,
int(*)(void *p, int f)  fill_buffers,
ringbuffer vrbuffer,
ringbuffer index_vrbuffer,
ringbuffer extrbuffer,
ringbuffer index_extrbuffer,
int  otype 
)

Definition at line 676 of file multiplex.c.

Referenced by do_replex(), and MPEG2replex::Start().

◆ setup_multiplex()

void setup_multiplex ( multiplex_t mx)

Definition at line 835 of file multiplex.c.

Referenced by do_replex(), and MPEG2replex::Start().