upipe/ubuf_block_mem.h header reference
Upipe ubuf manager for block formats with umem storage More
Header inclusion [link]
Members [link]
Functions [link]
- struct ubuf * ubuf_block_mem_alloc_from_pic(struct ubuf_mgr *mgr, struct ubuf *ubuf_pic, const char *chroma)
- struct ubuf * ubuf_block_mem_alloc_from_sound(struct ubuf_mgr *mgr, struct ubuf *ubuf_sound, const char *channel)
- struct ubuf_mgr * ubuf_block_mem_mgr_alloc(uint16_t ubuf_pool_depth, uint16_t shared_pool_depth, struct umem_mgr *umem_mgr, int prepend, int append, int align, int align_offset)
Macros [link]
Description [link]
Upipe ubuf manager for block formats with umem storage
Members detail [link]
#define UBUF_BLOCK_MEM_ALLOC_FROM_PIC [link]
This macro is declared in upipe/ubuf_block_mem.h source file, line 46.
This macro is the signature to use to allocate from an ubuf_pic plane.
#define UBUF_BLOCK_MEM_ALLOC_FROM_SOUND [link]
This macro is declared in upipe/ubuf_block_mem.h source file, line 48.
This macro is the signature to use to allocate from an ubuf_sound plane.
#define _UPIPE_UBUF_BLOCK_MEM_H_ [link]
This macro is declared in upipe/ubuf_block_mem.h source file, line 31.
struct ubuf * ubuf_block_mem_alloc_from_pic(struct ubuf_mgr *mgr, struct ubuf *ubuf_pic, const char *chroma) [link]
This function is declared in upipe/ubuf_block_mem.h source file, line 61.
This function returns a new ubuf from the block mem allocator, using a chroma of a ubuf pic mem.
Parameter list:
- mgr: management structure for this ubuf type
- ubuf_pic: ubuf pic mem structure to use
- chroma: chroma type (see chroma reference)
The return value is pointer to ubuf or NULL in case of failure
struct ubuf * ubuf_block_mem_alloc_from_sound(struct ubuf_mgr *mgr, struct ubuf *ubuf_sound, const char *channel) [link]
This function is declared in upipe/ubuf_block_mem.h source file, line 75.
This function returns a new ubuf from the block mem allocator, using a plane of a ubuf sound mem.
Parameter list:
- mgr: management structure for this ubuf type
- ubuf_sound: ubuf sound mem structure to use
- channel: channel type (see channel reference)
The return value is pointer to ubuf or NULL in case of failure
struct ubuf_mgr * ubuf_block_mem_mgr_alloc(uint16_t ubuf_pool_depth, uint16_t shared_pool_depth, struct umem_mgr *umem_mgr, int prepend, int append, int align, int align_offset) [link]
This function is declared in upipe/ubuf_block_mem.h source file, line 97.
This function allocates a new instance of the ubuf manager for block formats using umem.
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
- prepend: default minimum extra space before buffer (if set to -1, a default sensible value is used)
- append: extra space after buffer
- align: default alignment in octets (if set to -1, a default sensible value is used)
- align_offset: offset of the aligned octet, in octets (may be negative)
The return value is pointer to manager, or NULL in case of error
struct umem_mgr [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 |