upipe/uprobe.h header reference
Upipe structure used to raise events from pipes More
Header inclusion [link]
Members [link]
Types [link]
- enum uprobe_event
- typedef int (*uprobe_throw_func)(struct uprobe *, struct upipe *, int , va_list )
Functions [link]
- struct uprobe * uprobe_alloc(uprobe_throw_func func, struct uprobe *next)
- bool uprobe_check_extended(int event, va_list args, int expected_event, uint32_t signature)
- void uprobe_clean(struct uprobe *uprobe)
- void uprobe_dbg(struct uprobe *uprobe, struct upipe *upipe, const char *msg)
- void uprobe_dbg_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- bool uprobe_dead(struct uprobe *uprobe)
- void uprobe_err(struct uprobe *uprobe, struct upipe *upipe, const char *msg)
- void uprobe_err_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- const char * uprobe_event_str(int event)
- void uprobe_info(struct uprobe *uprobe, struct upipe *upipe, const char *msg)
- void uprobe_info_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- void uprobe_init(struct uprobe *uprobe, uprobe_throw_func uprobe_throw, struct uprobe *next)
- void uprobe_notice(struct uprobe *uprobe, struct upipe *upipe, const char *msg)
- void uprobe_notice_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- bool uprobe_plumber(int event, va_list args, struct uref **flow_def_p, const char **def_p)
- void uprobe_release(struct uprobe *uprobe)
- bool uprobe_single(struct uprobe *uprobe)
- int uprobe_throw_next(struct uprobe *uprobe, struct upipe *upipe, int event, va_list args)
- struct uprobe * uprobe_use(struct uprobe *uprobe)
- void uprobe_verbose(struct uprobe *uprobe, struct upipe *upipe, const char *msg)
- void uprobe_verbose_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- void uprobe_warn(struct uprobe *uprobe, struct upipe *upipe, const char *msg)
- void uprobe_warn_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
Macros [link]
Description [link]
Upipe structure used to raise events from pipes
Members detail [link]
#define UPIPE_UPROBE_DEFINE_LOG(Level, Name) [link]
This macro is declared in upipe/uprobe.h source file, line 356.
#define _UPIPE_UPROBE_H_ [link]
This macro is declared in upipe/uprobe.h source file, line 31.
[link]
This struct is declared in upipe/upipe.h source file, line 170.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| struct uchain uchain; | structure for double-linked lists - for use by the application only |
| void * opaque; | opaque - for use by the application only |
| struct uprobe * uprobe; | pointer to the uprobe hierarchy passed on initialization |
| struct upipe_mgr * mgr; | pointer to the manager for this pipe type |
[link]
This struct is declared in upipe-av/upipe_av.h source file, line 38.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| uprobe_throw_func uprobe_throw; | function to throw events |
| struct uprobe * next; | pointer to next probe, to be used by the uprobe_throw function |
struct uprobe * uprobe_alloc(uprobe_throw_func func, struct uprobe *next) [link]
This function is declared in upipe/uprobe.h source file, line 254.
This function allocates and initializes a probe.
Parameter list:
- func: function called when an event is raised
- next: next probe to test if this one doesn't catch the event
The return value is an allocated probe
bool uprobe_check_extended(int event, va_list args, int expected_event, uint32_t signature) [link]
This function is declared in upipe/uprobe.h source file, line 462.
This function checks is the event is an expected extended event.
Parameter list:
- event: event triggered by the pipe
- args: arguments of the event
- expected_event: extended event to check
- signature: extended event signature to check
The return value is true if the event is the expected extended event, false otherwise
This function is declared in upipe/uprobe.h source file, line 243.
This function cleans up a uprobe structure. It is typically called by the application or a pipe creating inner pipes (on a structure already allocated by the master object).
This function releases the next probe.
Parameter list:
- uprobe: pointer to probe
This function is declared in upipe/uprobe.h source file, line 393.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 393.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in upipe/uprobe.h source file, line 208.
This function checks if the probe has no more references.
Parameter list:
- uprobe: pointer to uprobe
The return value is true if there is no reference to the probe
This function is declared in upipe/uprobe.h source file, line 389.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 389.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
enum uprobe_event [link]
This enum is declared in upipe/uprobe.h source file, line 54.
common types of events
| Identifier | Value | Description |
|---|---|---|
| UPROBE_LOG | 0 | something occurred, and the pipe send a textual message (struct ulog *) |
| UPROBE_FATAL | 1 | a fatal error occurred, data may be lost (int); from now on the behaviour of the pipe is undefined, except upipe_release |
| UPROBE_ERROR | 2 | an error occurred, data may be lost (int); the module probably needs to be reinitialized |
| UPROBE_READY | 3 | a pipe is ready to accept input and respond to control commands (void) |
| UPROBE_DEAD | 4 | a pipe is about to be destroyed and will no longer accept input and control commands (void) |
| UPROBE_STALLED | 5 | a queue stalled due to a full FIFO (void) |
| UPROBE_SOURCE_END | 6 | unable to read from a source because the end of file was reached, or the component disappeared, or because of an error (void) |
| UPROBE_SINK_END | 7 | unable to write to an output because the disk is full or another error occurred (const char *) |
| UPROBE_NEED_OUTPUT | 8 | an output is necessary to operate (struct uref *) |
| UPROBE_PROVIDE_REQUEST | 9 | a request needs a provider (struct urequest *) |
| UPROBE_NEED_UPUMP_MGR | 10 | a upump manager is necessary to operate (struct upump_mgr **) |
| UPROBE_FREEZE_UPUMP_MGR | 11 | upump manager probe is forbidden to answer (void) |
| UPROBE_THAW_UPUMP_MGR | 12 | upump manager probe is allowed to answer (void) |
| UPROBE_NEED_SOURCE_MGR | 13 | a source pipe manager is necessary to operate (struct upipe_mgr **) |
| UPROBE_NEW_FLOW_DEF | 14 | a new flow definition is available on the output (struct uref *) |
| UPROBE_NEW_RAP | 15 | a new random access point is available in the input (struct uref *) |
| UPROBE_SPLIT_UPDATE | 16 | a split pipe declares a new output flow list (void) |
| UPROBE_SYNC_ACQUIRED | 17 | a pipe got synchronized with its input (void) |
| UPROBE_SYNC_LOST | 18 | a pipe lost synchronization with its input (void) |
| UPROBE_CLOCK_REF | 19 | a pipe signals that a uref carries a new clock reference, and potentially a clock discontinuity * (struct uref *, uint64_t, int) |
| UPROBE_CLOCK_TS | 20 | a pipe signals that a uref carries a presentation and/or a decoding timestamp (struct uref *) |
| UPROBE_CLOCK_UTC | 21 | a pipe signals that a uref contains a UTC clock reference (struct uref *, uint64_t) |
| UPROBE_PREROLL_END | 22 | a pipe signal the end of the preroll (void) |
| UPROBE_LOCAL | 0x8000 | non-standard events implemented by a module type can start from there (first arg = signature) |
const char * uprobe_event_str(int event) [link]
This function is declared in upipe/uprobe.h source file, line 124.
This function return the corresponding event string.
Parameter list:
- event: the event value
The return value is the event string
This function is declared in upipe/uprobe.h source file, line 392.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 392.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
void uprobe_init(struct uprobe *uprobe, uprobe_throw_func uprobe_throw, struct uprobe *next) [link]
This function is declared in upipe/uprobe.h source file, line 227.
This function initializes a uprobe structure. It is typically called by the application or a pipe creating inner pipes (on a structure already allocated by the master object).
Please note that this function does not _use() the next probe, so if you want to reuse an existing probe, you have to use it first.
Parameter list:
- uprobe: pointer to probe
- uprobe_throw: function which will be called when an event is thrown
- next: next probe to test if this one doesn't catch the event
This function is declared in upipe/uprobe.h source file, line 391.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 391.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in upipe/uprobe.h source file, line 437.
This function implements the common parts of a plumber probe (catching the need_output event).
Parameter list:
- event: event triggered by the pipe
- args: arguments of the event
- flow_def_p: filled in with the flow definition uref passed with the event
- def_p: filled in with the flow definition
The return value is false if the event cannot be handled by a plumber
This function is declared in upipe/uprobe.h source file, line 186.
This function decrements the reference count of a uprobe or frees it.
Parameter list:
- uprobe: pointer to uprobe
This function is declared in upipe/uprobe.h source file, line 197.
This function checks if the probe has more than one reference.
Parameter list:
- uprobe: pointer to uprobe
The return value is true if there is only one reference to the probe
#define uprobe_throw_error(uprobe, upipe, errcode) [link]
This macro is declared in upipe/uprobe.h source file, line 417.
This macro throws an error event.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- errcode: error code
#define uprobe_throw_fatal(uprobe, upipe, errcode) [link]
This macro is declared in upipe/uprobe.h source file, line 404.
This macro throws a fatal error event. After this event, the behaviour of a pipe is undefined, except for calls to upipe_release.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- errcode: error code
This typedef is declared in upipe/uprobe.h source file, line 155.
This typedef is the call-back type for uprobe events.
This function is declared in upipe/uprobe.h source file, line 299.
This function propagates an unhandled event to the next probe.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- event: event to throw
- args: list of arguments
The return value is an error code
This function is declared in upipe/uprobe.h source file, line 174.
This function increments the reference count of a uprobe.
Parameter list:
- uprobe: pointer to uprobe
The return value is same pointer to uprobe
This function is declared in upipe/uprobe.h source file, line 394.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 394.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in upipe/uprobe.h source file, line 390.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 390.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
struct urequest [link]
This struct is declared in upipe/urequest.h source file, line 95.
| Field | Description |
|---|---|
| struct uchain uchain; | structure for double-linked lists - for use by the upstream pipe only |
| void * opaque; | opaque - for use by the upstream pipe only |
| bool registered; | true if the urequest was already registered |
| int type; | request type |
| struct uref * uref; | optional uref argument |
| urequest_func urequest_provide; | function to provide a structure |
| urequest_free_func urequest_free; | function to free the request |
void uprobe_log(struct uprobe *uprobe, struct upipe *upipe, enum uprobe_log_level level, const char *msg) [link]
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 353.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- level: level of importance of the message
- msg: textual message
void uprobe_log_va(struct uprobe *uprobe, struct upipe *upipe, enum uprobe_log_level level, const char *format, ...) [link]
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 336.
This function throws a log event, with printf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- level: level of importance of the message
- format: format of the textual message, followed by optional arguments
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 281.
This function throws generic events with optional arguments.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- event: event to throw, followed with optional arguments
The return value is an error code
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 266.
This function throws generic events with optional arguments.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- event: event to throw
- args: list of arguments
The return value is an error code
void uprobe_vlog(struct uprobe *uprobe, struct upipe *upipe, enum uprobe_log_level level, const char *format, va_list args) [link]
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 315.
This function throws a log event, with vprintf-style message generation.
Parameter list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- level: level of importance of the message
- format: format string of the textual message
- args: arguments for the format string