xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions
demux_mpeg_pes.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include "group_video.h"
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/demux.h>

Data Structures

struct  demux_mpeg_pes_s
 

Macros

#define LOG_MODULE   "demux_mpeg_pes"
 
#define LOG_VERBOSE
 
#define NUM_PREVIEW_BUFFERS   250
 
#define DISC_TRESHOLD   90000
 
#define WRAP_THRESHOLD   270000
 
#define PTS_AUDIO   0
 
#define PTS_VIDEO   1
 
#define abs(x)   ( ((x)<0) ? -(x) : (x) )
 

Typedefs

typedef struct demux_mpeg_pes_s demux_mpeg_pes_t
 

Functions

static int32_t parse_video_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_audio_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_ancillary_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_program_stream_system_header (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_private_stream_1 (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_program_stream_map (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_padding_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_ecm_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_emm_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_dsmcc_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_iec_13522_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_h222_typeA_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_h222_typeB_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_h222_typeC_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_h222_typeD_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_h222_typeE_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_IEC14496_SL_packetized_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_IEC14496_FlexMux_stream (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_program_stream_directory (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int32_t parse_program_stream_pack_header (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int detect_pts_discontinuity (demux_mpeg_pes_t *this, int64_t pts, int video)
 
static void check_newpts (demux_mpeg_pes_t *this, int64_t pts, int video)
 
static off_t read_data (demux_mpeg_pes_t *this, uint8_t *buf, off_t nlen)
 
static void demux_mpeg_pes_parse_pack (demux_mpeg_pes_t *this, int preview_mode)
 
static void demux_mpeg_pes_vdr_seek_0 (demux_mpeg_pes_t *this, int n)
 
static int32_t parse_pes_for_pts (demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf)
 
static int demux_mpeg_pes_send_chunk (demux_plugin_t *this_gen)
 
static int demux_mpeg_pes_get_status (demux_plugin_t *this_gen)
 
static void demux_mpeg_pes_send_headers (demux_plugin_t *this_gen)
 
static int demux_mpeg_pes_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
 
static int demux_mpeg_pes_get_stream_length (demux_plugin_t *this_gen)
 
static uint32_t demux_mpeg_pes_get_capabilities (demux_plugin_t *this_gen)
 
static int demux_mpeg_pes_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type)
 
static demux_plugin_topen_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
 
void * demux_pes_init_class (xine_t *xine, const void *data)
 

Macro Definition Documentation

◆ abs

#define abs ( x)    ( ((x)<0) ? -(x) : (x) )

◆ DISC_TRESHOLD

#define DISC_TRESHOLD   90000

◆ LOG_MODULE

#define LOG_MODULE   "demux_mpeg_pes"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ NUM_PREVIEW_BUFFERS

#define NUM_PREVIEW_BUFFERS   250

◆ PTS_AUDIO

#define PTS_AUDIO   0

◆ PTS_VIDEO

#define PTS_VIDEO   1

Referenced by parse_video_stream().

◆ WRAP_THRESHOLD

#define WRAP_THRESHOLD   270000

Typedef Documentation

◆ demux_mpeg_pes_t

Function Documentation

◆ check_newpts()

static void check_newpts ( demux_mpeg_pes_t * this,
int64_t pts,
int video )
static

◆ demux_mpeg_pes_get_capabilities()

static uint32_t demux_mpeg_pes_get_capabilities ( demux_plugin_t * this_gen)
static

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

◆ demux_mpeg_pes_get_optional_data()

static int demux_mpeg_pes_get_optional_data ( demux_plugin_t * this_gen,
void * data,
int data_type )
static

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

◆ demux_mpeg_pes_get_status()

static int demux_mpeg_pes_get_status ( demux_plugin_t * this_gen)
static

Referenced by open_plugin().

◆ demux_mpeg_pes_get_stream_length()

static int demux_mpeg_pes_get_stream_length ( demux_plugin_t * this_gen)
static

References input().

Referenced by open_plugin().

◆ demux_mpeg_pes_parse_pack()

static void demux_mpeg_pes_parse_pack ( demux_mpeg_pes_t * this,
int preview_mode )
static

◆ demux_mpeg_pes_seek()

static int demux_mpeg_pes_seek ( demux_plugin_t * this_gen,
off_t start_pos,
int start_time,
int playing )
static

◆ demux_mpeg_pes_send_chunk()

static int demux_mpeg_pes_send_chunk ( demux_plugin_t * this_gen)
static

References demux_mpeg_pes_parse_pack().

Referenced by open_plugin().

◆ demux_mpeg_pes_send_headers()

static void demux_mpeg_pes_send_headers ( demux_plugin_t * this_gen)
static

◆ demux_mpeg_pes_vdr_seek_0()

static void demux_mpeg_pes_vdr_seek_0 ( demux_mpeg_pes_t * this,
int n )
static

References DEMUX_OK, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by parse_padding_stream().

◆ demux_pes_init_class()

void * demux_pes_init_class ( xine_t * xine,
const void * data )

◆ detect_pts_discontinuity()

static int detect_pts_discontinuity ( demux_mpeg_pes_t * this,
int64_t pts,
int video )
static

References abs, and WRAP_THRESHOLD.

Referenced by check_newpts().

◆ open_plugin()

static demux_plugin_t * open_plugin ( demux_class_t * class_gen,
xine_stream_t * stream,
input_plugin_t * input )
static

◆ parse_ancillary_stream()

static int32_t parse_ancillary_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_audio_stream()

static int32_t parse_audio_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_dsmcc_stream()

static int32_t parse_dsmcc_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_ecm_stream()

static int32_t parse_ecm_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_emm_stream()

static int32_t parse_emm_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_h222_typeA_stream()

static int32_t parse_h222_typeA_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_h222_typeB_stream()

static int32_t parse_h222_typeB_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_h222_typeC_stream()

static int32_t parse_h222_typeC_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_h222_typeD_stream()

static int32_t parse_h222_typeD_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_h222_typeE_stream()

static int32_t parse_h222_typeE_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_IEC14496_FlexMux_stream()

static int32_t parse_IEC14496_FlexMux_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_IEC14496_SL_packetized_stream()

static int32_t parse_IEC14496_SL_packetized_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_iec_13522_stream()

static int32_t parse_iec_13522_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_padding_stream()

static int32_t parse_padding_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_pes_for_pts()

static int32_t parse_pes_for_pts ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_private_stream_1()

static int32_t parse_private_stream_1 ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_program_stream_directory()

static int32_t parse_program_stream_directory ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_program_stream_map()

static int32_t parse_program_stream_map ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_program_stream_pack_header()

static int32_t parse_program_stream_pack_header ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_program_stream_system_header()

static int32_t parse_program_stream_system_header ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ parse_video_stream()

static int32_t parse_video_stream ( demux_mpeg_pes_t * this,
uint8_t * p,
buf_element_t * buf )
static

◆ read_data()

static off_t read_data ( demux_mpeg_pes_t * this,
uint8_t * buf,
off_t nlen )
static