upipe/upipe_helper_ubuf_mgr.h header reference
Upipe helper functions for ubuf manager More
Header inclusion [link]
Members [link]
Types [link]
- typedef int (*upipe_helper_ubuf_mgr_check)(struct upipe *, struct uref *)
- typedef int (*upipe_helper_ubuf_mgr_register)(struct upipe *, struct urequest *)
Macro [link]
Description [link]
Upipe helper functions for ubuf manager
Members detail [link]
#define UPIPE_HELPER_UBUF_MGR(STRUCTURE, UBUF_MGR, FLOW_FORMAT, REQUEST, CHECK, REGISTER, UNREGISTER) [link]
This macro is declared in upipe/upipe_helper_ubuf_mgr.h source file, line 118.
This macro declares functions dealing with the ubuf manager used on the output of a pipe.
You must add three members to your private upipe structure, for instance:
You must also declare UPIPE_HELPER_UPIPE prior to using this macro, and provide two functions which will be called 1/ when the ubuf manager is provided, 2/ and 3/ when a request needs to be registered/unregistered.
Supposing the name of your structure is upipe_foo, it declares:
Typically called in your upipe_foo_alloc() function.
Internal function called when the request is answered.
Initializes and registers the request to get a ubuf manager. The flow format belongs to the callee and will be eventually freed.
Initializes and registers the request to get a ubuf manager, and send it via a probe if no answer has been received synchronously. Returns false if no ubuf_mgr was received.
Typically called from your upipe_foo_free() function.
Typically called from your upipe_foo_control function. Make sure to call this function before the output control helper function upipe_foo_control_output.
Parameter list:
- STRUCTURE: name of your private upipe structure
- UBUF_MGR: name of the struct ubuf_mgr * field of your private upipe structure
- FLOW_FORMAT: name of the struct uref * field of your private upipe structure
- REQUEST: name of the struct urequest field of your private upipe structure
- CHECK: function called after a uref manager has been received
- REGISTER: function called to register a request
- UNREGISTER: function called to unregister a request
#define _UPIPE_UPIPE_HELPER_UBUF_MGR_H_ [link]
This macro is declared in upipe/upipe_helper_ubuf_mgr.h source file, line 31.
This typedef is declared in upipe/upipe_helper_ubuf_mgr.h source file, line 47.
This typedef defines a function that will be called after a ubuf_mgr has been received. The second argument is the amended flow format (belongs to the callee).
This typedef is declared in upipe/upipe_helper_ubuf_mgr.h source file, line 51.
This typedef defines a function that will be called to register or unregister a request.