libgpac
Documentation of the core library of GPAC
mpeg2_ps.h File Reference
#include <gpac/avparse.h>
+ Include dependency graph for mpeg2_ps.h:
+ This graph shows which files directly or indirectly include this file:

Macros

#define MPEG2_PS_START   0x00000100
 
#define MPEG2_PS_START_MASK   0xffffff00
 
#define MPEG2_PS_PACKSTART   0x000001BA
 
#define MPEG2_PS_SYSSTART   0x000001BB
 
#define MPEG2_PS_END   0x000001B9
 
#define MPEG12_START_CODE_PREFIX   0x000001
 
#define MPEG12_PICTURE_START_CODE   0x00000100
 
#define MPEG12_SLICE_MIN_START   0x00000101
 
#define MPEG12_SLICE_MAX_START   0x000001af
 
#define MPEG12_USER_DATA_START_CODE   0x000001b2
 
#define MPEG12_SEQUENCE_START_CODE   0x000001b3
 
#define MPEG12_SEQUENCE_ERR_START_CODE   0x000001b4
 
#define MPEG12_EXT_START_CODE   0x000001b5
 
#define MPEG12_SEQUENCE_END_START_CODE   0x000001b7
 
#define MPEG12_GOP_START_CODE   0x000001b8
 

Typedefs

typedef void(* error_msg_func_t) (int loglevel, const char *lib, const char *fmt, va_list ap)
 

Enumerations

enum  mpeg2ps_ts_type_t { TS_MSEC , TS_90000 }
 
enum  mpeg2ps_audio_type_t { MPEG_AUDIO_MPEG = 0 , MPEG_AUDIO_AC3 = 1 , MPEG_AUDIO_LPCM = 2 , MPEG_AUDIO_UNKNOWN = 3 }
 
enum  mpeg2ps_video_type_t { MPEG_VIDEO_MPEG1 = 0 , MPEG_VIDEO_MPEG2 = 1 , MPEG_VIDEO_UNKNOWN = 2 }
 

Functions

mpeg2ps_t * mpeg2ps_init (const char *filename)
 
void mpeg2ps_close (mpeg2ps_t *ps)
 
u64 mpeg2ps_get_max_time_msec (mpeg2ps_t *ps)
 
u32 mpeg2ps_get_video_stream_count (mpeg2ps_t *ps)
 
mpeg2ps_video_type_t mpeg2ps_get_video_stream_type (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_video_stream_width (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_video_stream_height (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_video_stream_aspect_ratio (mpeg2ps_t *ps, u32 streamno)
 
double mpeg2ps_get_video_stream_bitrate (mpeg2ps_t *ps, u32 streamno)
 
double mpeg2ps_get_video_stream_framerate (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_video_stream_id (mpeg2ps_t *ps, u32 streamno)
 
Bool mpeg2ps_get_video_frame (mpeg2ps_t *ps, u32 streamno, u8 **buffer, u32 *buflen, u8 *frame_type, mpeg2ps_ts_type_t ts_type, u64 *decode_timestamp, u64 *compose_timestamp)
 
Bool mpeg2ps_seek_video_frame (mpeg2ps_t *ps, u32 streamno, u64 msec_timestamp)
 
u32 mpeg2ps_get_audio_stream_count (mpeg2ps_t *ps)
 
mpeg2ps_audio_type_t mpeg2ps_get_audio_stream_type (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_audio_stream_sample_freq (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_audio_stream_channels (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_audio_stream_bitrate (mpeg2ps_t *ps, u32 streamno)
 
u32 mpeg2ps_get_audio_stream_id (mpeg2ps_t *ps, u32 streamno)
 
Bool mpeg2ps_get_audio_frame (mpeg2ps_t *ps, u32 streamno, u8 **buffer, u32 *buflen, mpeg2ps_ts_type_t ts_type, u32 *freq_timestamp, u64 *msec_timestamp)
 
Bool mpeg2ps_seek_audio_frame (mpeg2ps_t *ps, u32 streamno, u64 msec_timestamp)
 
void mpeg2ps_set_loglevel (int loglevel)
 
void mpeg2ps_set_error_func (error_msg_func_t func)
 
u64 mpeg2ps_get_first_cts (mpeg2ps_t *ps)
 

Macro Definition Documentation

◆ MPEG2_PS_START

#define MPEG2_PS_START   0x00000100

◆ MPEG2_PS_START_MASK

#define MPEG2_PS_START_MASK   0xffffff00

◆ MPEG2_PS_PACKSTART

#define MPEG2_PS_PACKSTART   0x000001BA

◆ MPEG2_PS_SYSSTART

#define MPEG2_PS_SYSSTART   0x000001BB

◆ MPEG2_PS_END

#define MPEG2_PS_END   0x000001B9

◆ MPEG12_START_CODE_PREFIX

#define MPEG12_START_CODE_PREFIX   0x000001

◆ MPEG12_PICTURE_START_CODE

#define MPEG12_PICTURE_START_CODE   0x00000100

◆ MPEG12_SLICE_MIN_START

#define MPEG12_SLICE_MIN_START   0x00000101

◆ MPEG12_SLICE_MAX_START

#define MPEG12_SLICE_MAX_START   0x000001af

◆ MPEG12_USER_DATA_START_CODE

#define MPEG12_USER_DATA_START_CODE   0x000001b2

◆ MPEG12_SEQUENCE_START_CODE

#define MPEG12_SEQUENCE_START_CODE   0x000001b3

◆ MPEG12_SEQUENCE_ERR_START_CODE

#define MPEG12_SEQUENCE_ERR_START_CODE   0x000001b4

◆ MPEG12_EXT_START_CODE

#define MPEG12_EXT_START_CODE   0x000001b5

◆ MPEG12_SEQUENCE_END_START_CODE

#define MPEG12_SEQUENCE_END_START_CODE   0x000001b7

◆ MPEG12_GOP_START_CODE

#define MPEG12_GOP_START_CODE   0x000001b8

Typedef Documentation

◆ error_msg_func_t

typedef void(* error_msg_func_t) (int loglevel, const char *lib, const char *fmt, va_list ap)

Enumeration Type Documentation

◆ mpeg2ps_ts_type_t

Enumerator
TS_MSEC 
TS_90000 

◆ mpeg2ps_audio_type_t

Enumerator
MPEG_AUDIO_MPEG 
MPEG_AUDIO_AC3 
MPEG_AUDIO_LPCM 
MPEG_AUDIO_UNKNOWN 

◆ mpeg2ps_video_type_t

Enumerator
MPEG_VIDEO_MPEG1 
MPEG_VIDEO_MPEG2 
MPEG_VIDEO_UNKNOWN 

Function Documentation

◆ mpeg2ps_init()

mpeg2ps_t* mpeg2ps_init ( const char *  filename)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_close()

void mpeg2ps_close ( mpeg2ps_t *  ps)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_max_time_msec()

u64 mpeg2ps_get_max_time_msec ( mpeg2ps_t *  ps)
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_count()

u32 mpeg2ps_get_video_stream_count ( mpeg2ps_t *  ps)
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_type()

mpeg2ps_video_type_t mpeg2ps_get_video_stream_type ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_width()

u32 mpeg2ps_get_video_stream_width ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_height()

u32 mpeg2ps_get_video_stream_height ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_aspect_ratio()

u32 mpeg2ps_get_video_stream_aspect_ratio ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_bitrate()

double mpeg2ps_get_video_stream_bitrate ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_framerate()

double mpeg2ps_get_video_stream_framerate ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_stream_id()

u32 mpeg2ps_get_video_stream_id ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_video_frame()

Bool mpeg2ps_get_video_frame ( mpeg2ps_t *  ps,
u32  streamno,
u8 **  buffer,
u32 buflen,
u8 frame_type,
mpeg2ps_ts_type_t  ts_type,
u64 decode_timestamp,
u64 compose_timestamp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_seek_video_frame()

Bool mpeg2ps_seek_video_frame ( mpeg2ps_t *  ps,
u32  streamno,
u64  msec_timestamp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_stream_count()

u32 mpeg2ps_get_audio_stream_count ( mpeg2ps_t *  ps)
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_stream_type()

mpeg2ps_audio_type_t mpeg2ps_get_audio_stream_type ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_stream_sample_freq()

u32 mpeg2ps_get_audio_stream_sample_freq ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_stream_channels()

u32 mpeg2ps_get_audio_stream_channels ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_stream_bitrate()

u32 mpeg2ps_get_audio_stream_bitrate ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_stream_id()

u32 mpeg2ps_get_audio_stream_id ( mpeg2ps_t *  ps,
u32  streamno 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_get_audio_frame()

Bool mpeg2ps_get_audio_frame ( mpeg2ps_t *  ps,
u32  streamno,
u8 **  buffer,
u32 buflen,
mpeg2ps_ts_type_t  ts_type,
u32 freq_timestamp,
u64 msec_timestamp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_seek_audio_frame()

Bool mpeg2ps_seek_audio_frame ( mpeg2ps_t *  ps,
u32  streamno,
u64  msec_timestamp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpeg2ps_set_loglevel()

void mpeg2ps_set_loglevel ( int  loglevel)

◆ mpeg2ps_set_error_func()

void mpeg2ps_set_error_func ( error_msg_func_t  func)

◆ mpeg2ps_get_first_cts()

u64 mpeg2ps_get_first_cts ( mpeg2ps_t *  ps)
+ Here is the caller graph for this function: