upipe/upump_blocker.h header reference
common declarations for event loop handlers More
Header inclusion
Members
Types
- struct upump_blocker
- typedef void (*upump_blocker_cb)(struct upump_blocker *)
Functions
- struct upump_blocker * upump_blocker_alloc(struct upump *upump, upump_blocker_cb cb, void *opaque, struct urefcount *refcount)
- struct upump_blocker * upump_blocker_find(struct uchain *ulist, struct upump *upump)
- void upump_blocker_free(struct upump_blocker *blocker)
- void upump_blocker_set_cb(struct upump_blocker *upump_blocker, upump_blocker_cb cb, void *opaque)
Macro
Description
common declarations for event loop handlers
Members detail
This macro is declared in upipe/upump_blocker.h source file, line 31.
This struct is declared in upipe/upump_blocker.h source file, line 46.
This struct stores the parameters of a blocker.
Field | Description |
---|---|
struct uchain uchain; | structure for double-linked lists |
struct upump * upump; | blocked pump |
upump_blocker_cb cb; | function to call back when the pump is released |
void * opaque; | opaque pointer for the callback |
struct urefcount * refcount; | pointer to urefcount structure to increment during callback |
struct upump_blocker * upump_blocker_alloc(struct upump *upump, upump_blocker_cb cb, void *opaque, struct urefcount *refcount)
This function is declared in upipe/upump_blocker.h source file, line 73.
This function allocates and initializes a blocker.
Parameter list:
- upump: blocked pump
- cb: function to call when the pump is released
- opaque: pointer to the module's internal structure
- refcount: pointer to urefcount structure to increment during callback, or NULL
The return value is pointer to allocated blocker, or NULL in case of failure
typedef void (*upump_blocker_cb)(struct upump_blocker *)
This typedef is declared in upipe/upump_blocker.h source file, line 42.
function called when a pump is triggered
struct upump_blocker * upump_blocker_find(struct uchain *ulist, struct upump *upump)
This function is declared in upipe/upump_blocker.h source file, line 122.
This function finds in a ulist if a blocker already exists for the given pump.
Parameter list:
- ulist: list of blockers
- upump: pump to block
The return value is a pointer to the blocker, or NULL if not found
void upump_blocker_free(struct upump_blocker *blocker)
This function is declared in upipe/upump_blocker.h source file, line 93.
This function releases a blocker, and if allowed restarts the pump.
Parameter list:
- blocker: description structure of the blocker
This macro is declared in upipe/upump_blocker.h source file, line 98.
This macro gets the opaque structure with a cast.
void upump_blocker_set_cb(struct upump_blocker *upump_blocker, upump_blocker_cb cb, void *opaque)
This function is declared in upipe/upump_blocker.h source file, line 109.
This function sets the callback parameters of an existing blocker.
Parameter list:
- upump_blocker: description structure of the blocker
- cb: function to call when the pump is released
- opaque: pointer to the module's internal structure
struct upump_blocker * upump_blocker_from_uchain(struct uchain *sub)
This function is for internal use only.
This function is declared in UBASE_FROM_TO function like macro expansion, line 19 in upipe/upump_blocker.h source file, line 60.
This function returns a pointer to uchain.
Parameter list:
- sub: pointer to struct uchain
The return value is pointer to struct upump_blocker
struct uchain * upump_blocker_to_uchain(struct upump_blocker *s)
This function is for internal use only.
This function is declared in UBASE_FROM_TO function like macro expansion, line 9 in upipe/upump_blocker.h source file, line 60.
This function returns a pointer to uchain.
Parameter list:
- upump_blocker: pointer to struct upump_blocker
The return value is pointer to struct uchain