upipe/upipe_helper_uref_mgr.h header reference
Upipe helper functions for uref manager More
Header inclusion
Members
Types
- typedef int (*upipe_helper_uref_mgr_check)(struct upipe *, struct uref *)
- typedef int (*upipe_helper_uref_mgr_register)(struct upipe *, struct urequest *)
Macro
Description
Upipe helper functions for uref manager
Members detail
This macro is declared in upipe/upipe_helper_uref_mgr.h source file, line 102.
This macro declares five functions dealing with the uref manager.
You must add two members to your private upipe structure, for instance:
struct uref_mgr *uref_mgr;
struct urequest uref_mgr_request;
You must also declare UPIPE_HELPER_UPIPE prior to using this macro, and provide three functions which will be called 1/ when the uref 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:
void upipe_foo_init_uref_mgr(struct upipe *upipe)
Typically called in your upipe_foo_alloc() function.
int upipe_foo_provide_uref_mgr(struct upipe *upipe, va_list args)
Internal function called when the request is answered.
int upipe_foo_require_uref_mgr(struct upipe *upipe)
Initializes and registers the request to get a uref manager.
bool upipe_foo_demand_uref_mgr(struct upipe *upipe)
Initializes and registers the request to get a uref manager, and send it via a probe if no answer has been received synchronously. Returns false if no uref_mgr was received.
void upipe_foo_clean_uref_mgr(struct upipe *upipe)
Typically called from your upipe_foo_free() function.
Parameter list:
- STRUCTURE: name of your private upipe structure
- UREF_MGR: name of the struct uref_mgr * 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
This macro is declared in upipe/upipe_helper_uref_mgr.h source file, line 31.
This typedef is declared in upipe/upipe_helper_uref_mgr.h source file, line 46.
This typedef defines a function that will be called after a uref_mgr has been received. The second argument is an unused uref.
This typedef is declared in upipe/upipe_helper_uref_mgr.h source file, line 50.
This typedef defines a function that will be called to register or unregister a request.