upipe/ubuf_mem.h header reference
Upipe functions to allocate ubuf managers using umem storage More
Header inclusion [link]
Members [link]
Function [link]
- struct ubuf_mgr * ubuf_mem_mgr_alloc_from_flow_def(uint16_t ubuf_pool_depth, uint16_t shared_pool_depth, struct umem_mgr *umem_mgr, struct uref *flow_def)
Description [link]
Upipe functions to allocate ubuf managers using umem storage
Members detail [link]
#define _UPIPE_UBUF_MEM_H_ [link]
This macro is declared in upipe/ubuf_mem.h source file, line 31.
struct ubuf_mgr * ubuf_mem_mgr_alloc_from_flow_def(uint16_t ubuf_pool_depth, uint16_t shared_pool_depth, struct umem_mgr *umem_mgr, struct uref *flow_def) [link]
This function is declared in upipe/ubuf_mem.h source file, line 58.
This function allocates an ubuf manager using umem from a flow definition.
Parameter list:
- ubuf_pool_depth: maximum number of ubuf structures in the pool
- shared_pool_depth: maximum number of shared structures in the pool
- umem_mgr: memory allocator to use for buffers
- flow_def: flow definition packet
The return value is pointer to manager, or NULL in case of error
[link]
This struct is declared in upipe/ubuf_mem.h source file, line 42.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| uint32_t signature; | signature of the API (block, pic, sound, other) |
| struct ubuf *(*ubuf_alloc)(struct ubuf_mgr *, uint32_t signatureva_list ) ; | function to allocate a new ubuf, with optional arguments depending on the ubuf manager |
| int (*ubuf_control)(struct ubuf *, int va_list ) ; | control function for standard or local commands |
| void (*ubuf_free)(struct ubuf *) ; | function to free a ubuf |
| int (*ubuf_mgr_control)(struct ubuf_mgr *, int va_list ) ; | manager control function for standard or local commands |
[link]
This struct is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 43.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| bool (*umem_alloc)(struct umem_mgr *, struct umem *, size_t ) ; | function to allocate a new memory block |
| bool (*umem_realloc)(struct umem *, size_t ) ; | function to resize umem |
| void (*umem_free)(struct umem *) ; | function to free a umem |
| void (*umem_mgr_vacuum)(struct umem_mgr *) ; | function to release all buffers kept in pools |
[link]
This struct is declared in upipe/ubuf_mem.h source file, line 46.
| 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 |