![]() |
libgpac
Documentation of the core library of GPAC
|
#include "mpeg2_ps.h"
Include dependency graph for mpeg2_ps.c:Data Structures | |
| struct | mpeg2ps_ts_t |
| struct | mpeg2ps_record_pes_t |
| struct | mpeg2ps_stream_t |
| struct | mpeg2ps_t |
Macros | |
| #define | FDNULL 0 |
| #define | file_location(__f) gf_ftell(__f) |
| #define | file_seek_to(__f, __off) gf_fseek(__f, __off, SEEK_SET) |
| #define | MPEG2PS_RECORD_TIME ((u64) (5 * 90000)) |
| #define | SEQ_ID 1 |
| #define | IS_MPEG_START(a) ((a) == 0xb3 || (a) == 0x00 || (a) == 0xb8) |
| #define | NUM_ELEMENTS_IN_ARRAY(name) ((sizeof((name))) / (sizeof(*(name)))) |
Functions | |
| static GFINLINE u16 | convert16 (u8 *p) |
| static GFINLINE u32 | convert32 (u8 *p) |
| static FILE * | file_open (const char *name) |
| static Bool | file_okay (FILE *fd) |
| static void | file_close (FILE *fd) |
| static Bool | file_read_bytes (FILE *fd, u8 *buffer, u32 len) |
| static void | file_skip_bytes (FILE *fd, s32 len) |
| static u64 | file_size (FILE *fd) |
| static mpeg2ps_record_pes_t * | create_record (s64 loc, u64 ts) |
| void | mpeg2ps_record_pts (mpeg2ps_stream_t *sptr, s64 location, mpeg2ps_ts_t *pTs) |
| int | MPEG12_ParseSeqHdr (unsigned char *pbuffer, u32 buflen, s32 *have_mpeg2, u32 *height, u32 *width, Double *frame_rate, Double *bitrate, u32 *aspect_ratio) |
| s32 | MPEG12_PictHdrType (unsigned char *pbuffer) |
| static u64 | read_pts (u8 *pak) |
| static mpeg2ps_stream_t * | mpeg2ps_stream_create (u8 stream_id, u8 substream) |
| static void | mpeg2ps_stream_destroy (mpeg2ps_stream_t *sptr) |
| static void | adv_past_pack_hdr (FILE *fd, u8 *pak, u32 read_from_start) |
| static Bool | find_pack_start (FILE *fd, u8 *saved, u32 len) |
| static void | copy_bytes_to_pes_buffer (mpeg2ps_stream_t *sptr, u16 pes_len) |
| static Bool | read_to_next_pes_header (FILE *fd, u8 *stream_id, u16 *pes_len) |
| static Bool | read_pes_header_data (FILE *fd, u16 orig_pes_len, u16 *pes_left, Bool *have_ts, mpeg2ps_ts_t *ts) |
| static Bool | search_for_next_pes_header (mpeg2ps_stream_t *sptr, u16 *pes_len, Bool *have_ts, s64 *found_loc) |
| static Bool | mpeg2ps_stream_read_next_pes_buffer (mpeg2ps_stream_t *sptr) |
| static Bool | mpeg2ps_stream_find_mpeg_video_frame (mpeg2ps_stream_t *sptr) |
| static Bool | mpeg2ps_stream_find_ac3_frame (mpeg2ps_stream_t *sptr) |
| static Bool | mpeg2ps_stream_find_mp3_frame (mpeg2ps_stream_t *sptr) |
| static Bool | mpeg2ps_stream_read_frame (mpeg2ps_stream_t *sptr, u8 **buffer, u32 *buflen, Bool advance_pointers) |
| static void | get_info_from_frame (mpeg2ps_stream_t *sptr, u8 *buffer, u32 buflen) |
| static void | clear_stream_buffer (mpeg2ps_stream_t *sptr) |
| static u64 | convert_ts (mpeg2ps_stream_t *sptr, mpeg2ps_ts_type_t ts_type, u64 ts, u64 base_ts, u32 frames_since_ts) |
| static mpeg2ps_stream_t * | find_stream_from_id (mpeg2ps_t *ps, u8 stream_id, u8 substream) |
| static Bool | add_stream (mpeg2ps_t *ps, u8 stream_id, u8 substream, s64 first_loc, mpeg2ps_ts_t *ts) |
| static void | check_fd_for_stream (mpeg2ps_t *ps, mpeg2ps_stream_t *sptr) |
| static void | advance_frame (mpeg2ps_stream_t *sptr) |
| static void | get_info_for_all_streams (mpeg2ps_t *ps) |
| static void | mpeg2ps_scan_file (mpeg2ps_t *ps) |
| u64 | mpeg2ps_get_max_time_msec (mpeg2ps_t *ps) |
| u32 | mpeg2ps_get_video_stream_count (mpeg2ps_t *ps) |
| static Bool | invalid_video_streamno (mpeg2ps_t *ps, u32 streamno) |
| 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) |
| static Bool | invalid_audio_streamno (mpeg2ps_t *ps, u32 streamno) |
| 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) |
| mpeg2ps_t * | mpeg2ps_init (const char *filename) |
| void | mpeg2ps_close (mpeg2ps_t *ps) |
| static u64 | stream_convert_frame_ts_to_msec (mpeg2ps_stream_t *sptr, mpeg2ps_ts_type_t ts_type, u64 base_dts, u32 *freq_ts) |
| 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_get_audio_frame (mpeg2ps_t *ps, u32 streamno, u8 **buffer, u32 *buflen, mpeg2ps_ts_type_t ts_type, u32 *freq_timestamp, u64 *timestamp) |
| static void | mpeg2ps_binary_seek (mpeg2ps_t *ps, mpeg2ps_stream_t *sptr, u64 search_dts, u64 start_dts, u64 start_loc, u64 end_dts, u64 end_loc) |
| static mpeg2ps_record_pes_t * | search_for_ts (mpeg2ps_stream_t *sptr, u64 dts) |
| static Bool | mpeg2ps_seek_frame (mpeg2ps_t *ps, mpeg2ps_stream_t *sptr, u64 search_msec_timestamp) |
| Bool | mpeg2ps_seek_video_frame (mpeg2ps_t *ps, u32 streamno, u64 msec_timestamp) |
| Bool | mpeg2ps_seek_audio_frame (mpeg2ps_t *ps, u32 streamno, u64 msec_timestamp) |
| u64 | mpeg2ps_get_first_cts (mpeg2ps_t *ps) |
Variables | |
| static Double | mpeg12_frame_rate_table [16] |
| struct mpeg2ps_record_pes_t |
Collaboration diagram for mpeg2ps_record_pes_t:| Data Fields | ||
|---|---|---|
| struct mpeg2ps_record_pes_t * | next_rec | |
| u64 | dts | |
| u64 | location | |
| struct mpeg2ps_stream_t |
Collaboration diagram for mpeg2ps_stream_t:| Data Fields | ||
|---|---|---|
| mpeg2ps_record_pes_t * | record_first | |
| mpeg2ps_record_pes_t * | record_last | |
| FILE * | m_fd | |
| Bool | is_video | |
| u8 | m_stream_id | |
| u8 | m_substream_id | |
| mpeg2ps_ts_t | next_pes_ts | |
| mpeg2ps_ts_t | frame_ts | |
| u32 | frames_since_last_ts | |
| u64 | last_ts | |
| Bool | have_frame_loaded | |
| u8 * | pes_buffer | |
| u32 | pes_buffer_size | |
| u32 | pes_buffer_size_max | |
| u32 | pes_buffer_on | |
| u32 | frame_len | |
| u32 | pict_header_offset | |
| s64 | first_pes_loc | |
| u64 | start_dts | |
| Bool | first_pes_has_dts | |
| s64 | end_dts_loc | |
| u64 | end_dts | |
| u32 | freq | |
| u32 | channels | |
| u32 | bitrate | |
| u32 | samples_per_frame | |
| u32 | layer | |
| u32 | h | |
| u32 | w | |
| u32 | par | |
| Double | frame_rate | |
| s32 | have_mpeg2 | |
| Double | bit_rate | |
| u64 | ticks_per_frame | |
| struct mpeg2ps_ |
Collaboration diagram for mpeg2ps_t:| Data Fields | ||
|---|---|---|
| mpeg2ps_stream_t * | video_streams[16] | |
| mpeg2ps_stream_t * | audio_streams[32] | |
| char * | filename | |
| FILE * | fd | |
| u64 | first_dts | |
| u32 | audio_cnt | |
| u32 | video_cnt | |
| s64 | end_loc | |
| u64 | max_dts | |
| u64 | max_time | |
| #define FDNULL 0 |
| #define file_location | ( | __f | ) | gf_ftell(__f) |
| #define file_seek_to | ( | __f, | |
| __off | |||
| ) | gf_fseek(__f, __off, SEEK_SET) |
| #define MPEG2PS_RECORD_TIME ((u64) (5 * 90000)) |
| #define SEQ_ID 1 |
| #define IS_MPEG_START | ( | a | ) | ((a) == 0xb3 || (a) == 0x00 || (a) == 0xb8) |
| #define NUM_ELEMENTS_IN_ARRAY | ( | name | ) | ((sizeof((name))) / (sizeof(*(name)))) |
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:| void mpeg2ps_record_pts | ( | mpeg2ps_stream_t * | sptr, |
| s64 | location, | ||
| mpeg2ps_ts_t * | pTs | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| int MPEG12_ParseSeqHdr | ( | unsigned char * | pbuffer, |
| u32 | buflen, | ||
| s32 * | have_mpeg2, | ||
| u32 * | height, | ||
| u32 * | width, | ||
| Double * | frame_rate, | ||
| Double * | bitrate, | ||
| u32 * | aspect_ratio | ||
| ) |
Here is the caller graph for this function:| s32 MPEG12_PictHdrType | ( | unsigned char * | pbuffer | ) |
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:| u64 mpeg2ps_get_max_time_msec | ( | mpeg2ps_t * | ps | ) |
Here is the caller graph for this function:| u32 mpeg2ps_get_video_stream_count | ( | mpeg2ps_t * | ps | ) |
Here is the caller graph for this function:
Here is the caller graph for this function:| 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:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:| u32 mpeg2ps_get_audio_stream_count | ( | mpeg2ps_t * | ps | ) |
Here is the caller graph for this function:| 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:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| mpeg2ps_t * mpeg2ps_init | ( | const char * | filename | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| void mpeg2ps_close | ( | mpeg2ps_t * | ps | ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:| 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:| Bool mpeg2ps_get_audio_frame | ( | mpeg2ps_t * | ps, |
| u32 | streamno, | ||
| u8 ** | buffer, | ||
| u32 * | buflen, | ||
| mpeg2ps_ts_type_t | ts_type, | ||
| u32 * | freq_timestamp, | ||
| u64 * | timestamp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| u64 mpeg2ps_get_first_cts | ( | mpeg2ps_t * | ps | ) |
Here is the caller graph for this function:
|
static |