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

Data Structures

struct  RestampPid
 
struct  RestampCtx
 

Macros

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

Enumerations

enum  { RESTAMP_RAWV_NO =0 , RESTAMP_RAWV_FORCE , RESTAMP_RAWV_DYN }
 

Functions

static GF_Err restamp_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static u64 restamp_get_timestamp (RestampCtx *ctx, RestampPid *pctx, u64 ots, Bool is_ref_ts, GF_FilterPacket *pck)
 
static void restamp_config_timing (GF_Filter *filter, RestampCtx *ctx)
 
static GF_Err restamp_process (GF_Filter *filter)
 
static GF_Err restamp_update_arg (GF_Filter *filter, const char *arg_name, const GF_PropertyValue *new_val)
 
static GF_Err restamp_initialize (GF_Filter *filter)
 
static void restamp_finalize (GF_Filter *filter)
 
const GF_FilterRegister * restamp_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability RestampCapsRawVid []
 
static GF_FilterArgs RestampArgs []
 
static const GF_FilterCapability RestampCaps []
 
const GF_FilterRegister RestampRegister
 

Data Structure Documentation

◆ RestampPid

struct RestampPid
Data Fields
GF_FilterPid * ipid
GF_FilterPid * opid
s64 ts_offset
s64 ts_shift_plus_one
Bool raw_vid_copy
Bool is_audio
Bool is_video
s64 last_min_dts
u32 timescale
u64 last_ts
u32 min_dur
u32 rescale
u64 nb_frames
GF_FilterPacket * pck_ref
u32 keep_prev_state
u64 last_ts_ref_plus_one
u64 last_original_ts
u32 ts_rescale
u32 min_ref_dur
s64 ref_ts_diff
GF_List * packets

◆ RestampCtx

struct RestampCtx
+ Collaboration diagram for RestampCtx:
Data Fields
GF_Fraction fps
GF_Fraction delay
GF_Fraction delay_v
GF_Fraction delay_a
GF_Fraction delay_t
GF_Fraction delay_o
GF_Fraction64 tsinit
u32 rawv
u32 align
Bool reorder
GF_List * pids
Bool reconfigure
Bool config_timing
u32 config_retry

Macro Definition Documentation

◆ OFFS

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RESTAMP_RAWV_NO 
RESTAMP_RAWV_FORCE 
RESTAMP_RAWV_DYN 

Function Documentation

◆ restamp_configure_pid()

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

◆ restamp_get_timestamp()

static u64 restamp_get_timestamp ( RestampCtx ctx,
RestampPid pctx,
u64  ots,
Bool  is_ref_ts,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ restamp_config_timing()

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

◆ restamp_process()

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

◆ restamp_update_arg()

static GF_Err restamp_update_arg ( GF_Filter *  filter,
const char *  arg_name,
const GF_PropertyValue *  new_val 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ restamp_initialize()

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

◆ restamp_finalize()

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

◆ restamp_register()

const GF_FilterRegister* restamp_register ( GF_FilterSession *  session)

Variable Documentation

◆ RestampCapsRawVid

const GF_FilterCapability RestampCapsRawVid[]
static
Initial value:
=
{
{0},
}
@ GF_CODECID_NONE
Definition: constants.h:383
@ GF_CODECID_RAW
Definition: constants.h:600
@ 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 GF_CAPS_INPUT_OUTPUT
Definition: filters.h:2242
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#define GF_CAPS_OUTPUT_EXCLUDED
Definition: filters.h:2236
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
@ 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_TRUE
Definition: setup.h:474

◆ RestampArgs

GF_FilterArgs RestampArgs[]
static
Initial value:
=
{
{ OFFS(fps), "target fps", GF_PROP_FRACTION, "0/1", NULL, 0},
{ OFFS(delay), "delay to add to all streams", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(delay_v), "delay to add to video streams", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(delay_a), "delay to add to audio streams", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(delay_t), "delay to add to text streams", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(delay_o), "delay to add to other streams", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(rawv), "copy video frames\n"
"- no: no raw frame copy/drop\n"
"- force: force decoding all video streams\n"
"- dyn: decoding video streams if not all intra"
, GF_PROP_UINT, "no", "no|force|dyn", 0},
{ OFFS(tsinit), "initial timestamp to resync to, negative values disables resync", GF_PROP_FRACTION64, "-1/1", NULL, 0},
{ OFFS(align), "timestamp alignment threshold (0 disables alignment) - see filter help", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(reorder), "reorder input packets by CTS (resulting PID may fail decoding)", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
@ GF_FS_ARG_UPDATE
Definition: filters.h:2108
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860
@ GF_PROP_FRACTION64
Definition: filters.h:862
#define OFFS(_n)
Definition: restamp.c:602

◆ RestampCaps

◆ RestampRegister

const GF_FilterRegister RestampRegister