libgpac
Documentation of the core library of GPAC
reframe_mpgvid.c File Reference
#include <gpac/avparse.h>
#include <gpac/constants.h>
#include <gpac/filters.h>
#include <gpac/internal/media_dev.h>
+ Include dependency graph for reframe_mpgvid.c:

Data Structures

struct  MPGVidIdx
 
struct  GF_MPGVidDmxCtx
 

Macros

#define MIN_HDR_STORE   12
 
#define OFFS(_n)   #_n, offsetof(GF_MPGVidDmxCtx, _n)
 

Functions

GF_Err mpgviddmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void mpgviddmx_check_dur (GF_Filter *filter, GF_MPGVidDmxCtx *ctx)
 
static void mpgviddmx_enqueue_or_dispatch (GF_MPGVidDmxCtx *ctx, GF_FilterPacket *pck, Bool flush_ref, Bool is_eos)
 
static void mpgviddmx_check_pid (GF_Filter *filter, GF_MPGVidDmxCtx *ctx, u32 vosh_size, u8 *data)
 
static Bool mpgviddmx_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GFINLINE void mpgviddmx_update_time (GF_MPGVidDmxCtx *ctx)
 
static s32 mpgviddmx_next_start_code (u8 *data, u32 size)
 
GF_Err mpgviddmx_process (GF_Filter *filter)
 
static GF_Err mpgviddmx_initialize (GF_Filter *filter)
 
static void mpgviddmx_finalize (GF_Filter *filter)
 
u32 gf_m4v_parser_get_obj_type (GF_M4VParser *m4v)
 
static const char * mpgvdmx_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * rfmpgvid_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability MPGVidDmxCaps []
 
static const GF_FilterArgs MPGVidDmxArgs []
 
GF_FilterRegister MPGVidDmxRegister
 

Data Structure Documentation

◆ MPGVidIdx

struct MPGVidIdx
Data Fields
u64 pos
Double start_time

◆ GF_MPGVidDmxCtx

struct GF_MPGVidDmxCtx
+ Collaboration diagram for GF_MPGVidDmxCtx:
Data Fields
GF_Fraction fps
Double index
Bool vfr
Bool importer
Bool notime
GF_FilterPid * ipid
GF_FilterPid * opid
GF_BitStream * bs
u64 cts
u64 dts
u64 prev_dts
u32 width
u32 height
GF_Fraction64 duration
Double start_range
Bool in_seek
u32 timescale
u32 resume_from
GF_Fraction cur_fps
Bool is_mpg12
Bool forced_packed
GF_M4VParser * vparser
GF_M4VDecSpecInfo dsi
u32 b_frames
Bool is_packed
Bool is_vfr
GF_List * pck_queue
u64 last_ref_cts
Bool frame_started
u32 nb_i
u32 nb_p
u32 nb_b
u32 nb_frames
u32 max_b
u32 bytes_in_header
char * hdr_store
u32 hdr_store_size
u32 hdr_store_alloc
Bool is_playing
Bool is_file
Bool file_loaded
Bool initial_play_done
Bool input_is_au_start
Bool input_is_au_end
Bool recompute_cts
Bool copy_props
GF_FilterPacket * src_pck
MPGVidIdx * indexes
u32 index_alloc_size
u32 index_size
u32 bitrate
Bool trash_trailer

Macro Definition Documentation

◆ MIN_HDR_STORE

#define MIN_HDR_STORE   12

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_MPGVidDmxCtx, _n)

Function Documentation

◆ mpgviddmx_configure_pid()

GF_Err mpgviddmx_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
+ Here is the call graph for this function:

◆ mpgviddmx_check_dur()

static void mpgviddmx_check_dur ( GF_Filter *  filter,
GF_MPGVidDmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpgviddmx_enqueue_or_dispatch()

static void mpgviddmx_enqueue_or_dispatch ( GF_MPGVidDmxCtx ctx,
GF_FilterPacket *  pck,
Bool  flush_ref,
Bool  is_eos 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpgviddmx_check_pid()

static void mpgviddmx_check_pid ( GF_Filter *  filter,
GF_MPGVidDmxCtx ctx,
u32  vosh_size,
u8 data 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpgviddmx_process_event()

static Bool mpgviddmx_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)
static
+ Here is the call graph for this function:

◆ mpgviddmx_update_time()

static GFINLINE void mpgviddmx_update_time ( GF_MPGVidDmxCtx ctx)
static
+ Here is the caller graph for this function:

◆ mpgviddmx_next_start_code()

static s32 mpgviddmx_next_start_code ( u8 data,
u32  size 
)
static
+ Here is the caller graph for this function:

◆ mpgviddmx_process()

GF_Err mpgviddmx_process ( GF_Filter *  filter)
+ Here is the call graph for this function:

◆ mpgviddmx_initialize()

static GF_Err mpgviddmx_initialize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ mpgviddmx_finalize()

static void mpgviddmx_finalize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ gf_m4v_parser_get_obj_type()

u32 gf_m4v_parser_get_obj_type ( GF_M4VParser *  m4v)
+ Here is the caller graph for this function:

◆ mpgvdmx_probe_data()

static const char* mpgvdmx_probe_data ( const u8 data,
u32  size,
GF_FilterProbeScore score 
)
static
+ Here is the call graph for this function:

◆ rfmpgvid_register()

const GF_FilterRegister* rfmpgvid_register ( GF_FilterSession *  session)

Variable Documentation

◆ MPGVidDmxCaps

const GF_FilterCapability MPGVidDmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "video/mp4v-es|video/mpgv-es"),
{0},
}
@ GF_CODECID_MPEG2_SPATIAL
Definition: constants.h:432
@ GF_CODECID_MPEG2_SIMPLE
Definition: constants.h:426
@ GF_CODECID_MPEG2_MAIN
Definition: constants.h:428
@ GF_CODECID_MPEG4_PART2
Definition: constants.h:410
@ GF_CODECID_MPEG2_HIGH
Definition: constants.h:434
@ GF_CODECID_MPEG2_SNR
Definition: constants.h:430
@ GF_CODECID_MPEG2_422
Definition: constants.h:436
@ GF_CODECID_MPEG1
Definition: constants.h:446
@ GF_STREAM_FILE
Definition: constants.h:104
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
#define GF_CAPS_OUTPUT_STATIC
Definition: filters.h:2238
#define GF_CAPS_OUTPUT_STATIC_EXCLUDED
Definition: filters.h:2240
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_UNFRAMED
Definition: filters.h:1118
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189
@ GF_TRUE
Definition: setup.h:474

◆ MPGVidDmxArgs

const GF_FilterArgs MPGVidDmxArgs[]
static
Initial value:
=
{
{ OFFS(fps), "import frame rate (0 default to FPS from bitstream or 25 Hz)", GF_PROP_FRACTION, "0/1000", NULL, 0},
{ OFFS(index), "indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued", GF_PROP_DOUBLE, "-1.0", NULL, 0},
{ OFFS(vfr), "set variable frame rate import", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(importer), "compatibility with old importer, displays import results", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(notime), "ignore input timestamps, rebuild from 0", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{0}
}
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_FRACTION
Definition: filters.h:860
#define OFFS(_n)
Definition: reframe_mpgvid.c:1383

◆ MPGVidDmxRegister

GF_FilterRegister MPGVidDmxRegister
Initial value:
= {
.name = "rfmpgvid",
GF_FS_SET_HELP("This filter parses MPEG-1/2 and MPEG-4 part 2 video files/data and outputs corresponding video PID and frames.\n"
"Note: The filter uses negative CTS offsets: CTS is correct, but some frames may have DTS greater than CTS.")
.private_size = sizeof(GF_MPGVidDmxCtx),
.initialize = mpgviddmx_initialize,
.finalize = mpgviddmx_finalize,
.configure_pid = mpgviddmx_configure_pid,
.process = mpgviddmx_process,
.probe_data = mpgvdmx_probe_data,
.process_event = mpgviddmx_process_event,
.hint_class_type = GF_FS_CLASS_FRAMING
}
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
attribute Array args
Definition: jsf.idl:24
GF_Err mpgviddmx_process(GF_Filter *filter)
Definition: reframe_mpgvid.c:594
static void mpgviddmx_finalize(GF_Filter *filter)
Definition: reframe_mpgvid.c:1236
static GF_Err mpgviddmx_initialize(GF_Filter *filter)
Definition: reframe_mpgvid.c:1227
static Bool mpgviddmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_mpgvid.c:461
GF_Err mpgviddmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_mpgvid.c:94
static const GF_FilterCapability MPGVidDmxCaps[]
Definition: reframe_mpgvid.c:1354
static const GF_FilterArgs MPGVidDmxArgs[]
Definition: reframe_mpgvid.c:1384
static const char * mpgvdmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_mpgvid.c:1264
Definition: reframe_mpgvid.c:41