upipe/uref.h header reference
Upipe uref structure handling More
Header inclusion
Members
Types
- struct uref
- enum uref_date_type
- struct uref_mgr
- enum uref_mgr_command
Functions
- struct uref * uref_alloc(struct uref_mgr *mgr)
- struct uref * uref_alloc_control(struct uref_mgr *mgr)
- void uref_attach_ubuf(struct uref *uref, struct ubuf *ubuf)
- struct ubuf * uref_detach_ubuf(struct uref *uref)
- struct uref * uref_dup(struct uref *uref)
- void uref_free(struct uref *uref)
- void uref_init(struct uref *uref)
- void uref_mgr_release(struct uref_mgr *mgr)
- struct uref_mgr * uref_mgr_use(struct uref_mgr *mgr)
- int uref_mgr_vacuum(struct uref_mgr *mgr)
- struct uref * uref_sibling_alloc(struct uref *uref)
- struct uref * uref_sibling_alloc_control(struct uref *uref)
Macros
Description
This file defines the API to manipulate references to buffers and attributes.
Members detail
This macro is declared in upipe/uref.h source file, line 66.
the block is an ending point
This macro is declared in upipe/uref.h source file, line 64.
the block is a starting point
This macro is declared in upipe/uref.h source file, line 68.
the block contains a clock reference
This macro is declared in upipe/uref.h source file, line 75.
position of the bitfield for the type of orig date
This macro is declared in upipe/uref.h source file, line 73.
position of the bitfield for the type of prog date
This macro is declared in upipe/uref.h source file, line 71.
position of the bitfield for the type of sys date
This macro is declared in upipe/uref.h source file, line 62.
there is a discontinuity in the flow
This macro is declared in upipe/uref.h source file, line 60.
the upstream pipe has disconnected
This macro is declared in upipe/uref.h source file, line 32.
This struct is declared in upipe/uref.h source file, line 86.
This struct stores references to a ubuf wth attributes.
Field | Description |
---|---|
struct uchain uchain; | structure for double-linked lists |
struct uref_mgr *mgr; | pointer to the entity responsible for the management |
struct ubuf *ubuf; | pointer to ubuf |
struct udict *udict; | pointer to udict |
uint64_t flags; | void flags |
uint64_t date_sys; | date in system time |
uint64_t date_prog; | date in program time |
uint64_t date_orig; | original date |
uint64_t dts_pts_delay; | duration between DTS and PTS |
uint64_t cr_dts_delay; | duration between CR and DTS |
uint64_t rap_cr_delay; | duration between RAP and CR |
uint64_t priv; | private for local pipe user |
This function is declared in upipe/uref.h source file, line 187.
This function allocates and initializes a new uref.
Parameters list:
- mgr: management structure for this buffer pool
The return value is allocated uref or NULL in case of allocation failure
This function is declared in upipe/uref.h source file, line 214.
This function returns a new uref with extra attributes space. This is typically useful for control messages.
Parameters list:
- mgr: management structure for this uref pool
The return value is allocated uref or NULL in case of allocation failure
This function is declared in upipe/uref.h source file, line 301.
This function attaches a ubuf to a given uref. The ubuf pointer may no longer be used by the module afterwards.
Parameters list:
- uref: pointer to uref structure
- ubuf: pointer to ubuf structure to attach to uref
This enum is declared in upipe/uref.h source file, line 49.
This enum defines the type of the date.
Identifier | Value | Description |
---|---|---|
UREF_DATE_NONE | 0 | no date is defined |
UREF_DATE_CR | 1 | clock ref is defined, DTS and PTS are derived |
UREF_DATE_DTS | 2 | DTS is defined, CR and PTS are derived |
UREF_DATE_PTS | 3 | PTS is defined, CR and DTS are derived |
This function is declared in upipe/uref.h source file, line 315.
This function detaches a ubuf from a uref. The returned ubuf must be freed or re-attached at some point, otherwise it will leak.
Parameters list:
- uref: pointer to uref structure
The return value is pointer to detached ubuf structure
This function is declared in upipe/uref.h source file, line 279.
This function duplicates a uref.
Parameters list:
- uref: source structure to duplicate
The return value is duplicated uref or NULL in case of allocation failure
void uref_free(struct uref *uref)
This function is declared in upipe/uref.h source file, line 152.
This function frees a uref and other sub-structures.
Parameters list:
- uref: structure to free
void uref_init(struct uref *uref)
This function is declared in upipe/uref.h source file, line 167.
This function initializes a new uref.
Parameters list:
- uref: allocated uref
This struct is declared in upipe/uref.h source file, line 129.
This struct stores common management parameters for a uref pool.
Field | Description |
---|---|
struct urefcount *refcount; | pointer to refcount management structure |
size_t control_attr_size; | minimum size of a control uref |
struct udict_mgr *udict_mgr; | udict manager |
struct uref *(*uref_alloc)(struct uref_mgr *) ; | function to allocate a uref |
void (*uref_free)(struct uref *) ; | function to free a uref |
int (*uref_mgr_control)(struct uref_mgr *, int , va_list ) ; | control function for standard or local manager commands - all parameters belong to the caller |
This enum is declared in upipe/uref.h source file, line 118.
This enum defines standard commands which uref managers may implement.
Identifier | Value | Description |
---|---|---|
UREF_MGR_VACUUM | 0 | release all buffers kept in pools (void) |
UREF_MGR_CONTROL_LOCAL | 0 | non-standard manager commands implemented by a module type can start from there (first arg = signature) |
void uref_mgr_release(struct uref_mgr *mgr)
This function is declared in upipe/uref.h source file, line 339.
This function decrements the reference count of a uref manager or frees it.
Parameters list:
- mgr: pointer to uref manager
This function is declared in upipe/uref.h source file, line 327.
This function increments the reference count of a uref manager.
Parameters list:
- mgr: pointer to uref manager
The return value is same pointer to uref manager
int uref_mgr_vacuum(struct uref_mgr *mgr)
This function is declared in upipe/uref.h source file, line 387.
This function instructs an existing uref manager to release all structures currently kept in pools. It is inteded as a debug tool only.
Parameters list:
- mgr: pointer to uref manager
The return value is an error code
This function is declared in upipe/uref.h source file, line 203.
This function allocates and initializes a new uref, allocated with a manager from an existing uref.
Parameters list:
- uref: existing uref
The return value is allocated uref or NULL in case of allocation failure
This function is declared in upipe/uref.h source file, line 236.
This function returns a new uref with extra attributes space, allocated with a manager from an existing uref. This is typically useful for control messages.
Parameters list:
- uref: existing uref
The return value is allocated uref or NULL in case of allocation failure
This macro is for internal use only.
This macro is declared in upipe/uref.h source file, line 82.
This macro is the number of bits to shift to get orig date type.
This macro is for internal use only.
This macro is declared in upipe/uref.h source file, line 80.
This macro is the number of bits to shift to get prog date type.
This macro is for internal use only.
This macro is declared in upipe/uref.h source file, line 78.
This macro is the number of bits to shift to get sys date type.
This function is for internal use only.
This function is declared in upipe/uref.h source file, line 246.
This function duplicates a uref without duplicating the ubuf.
Parameters list:
- uref: source structure to duplicate
The return value is duplicated uref or NULL in case of allocation failure
This function is for internal use only.
This function is declared in UBASE_FROM_TO function like macro expansion, line 19 in upipe/uref.h source file, line 115.
This function returns a pointer to uchain.
Parameters list:
- sub: pointer to struct uchain
The return value is pointer to struct uref
int uref_mgr_control(struct uref_mgr *mgr, int command, ...)
This function is for internal use only.
This function is declared in upipe/uref.h source file, line 371.
This function sends a control command to the uref manager. Note that all arguments are owned by the caller.
Parameters list:
- mgr: pointer to uref manager
- command: control manager command to send, followed by optional read or write parameters
The return value is an error code
int uref_mgr_control_va(struct uref_mgr *mgr, int command, va_list args)
This function is for internal use only.
This function is declared in upipe/uref.h source file, line 354.
This function sends a control command to the uref manager. Note that all arguments are owned by the caller.
Parameters list:
- mgr: pointer to uref manager
- command: manager control command to send
- args: optional read or write parameters
The return value is an error code
This function is for internal use only.
This function is declared in UBASE_FROM_TO function like macro expansion, line 9 in upipe/uref.h source file, line 115.
This function returns a pointer to uchain.
Parameters list:
- uref: pointer to struct uref
The return value is pointer to struct uchain