upipe/uprobe.h header reference
Upipe structure used to raise events from pipes More
Header inclusion
Members
Types
- struct uprobe
- enum uprobe_event
- enum uprobe_log_level
- typedef int (*uprobe_throw_func)(struct uprobe *, struct upipe *, int , va_list )
Functions
- void uprobe_clean(struct uprobe *uprobe)
- void uprobe_dbg_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- bool uprobe_dead(struct uprobe *uprobe)
- void uprobe_err_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_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_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
- void uprobe_warn_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)
Macros
Description
Members detail
This macro is declared in upipe/uprobe.h source file, line 31.
This struct is declared in upipe/uprobe.h source file, line 131.
This struct is a structure passed to a module upon initializing a new pipe.
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 |
void uprobe_clean(struct uprobe *uprobe)
This function is declared in upipe/uprobe.h source file, line 216.
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.
Parameters list:
- uprobe: pointer to probe
This macro is declared in upipe/uprobe.h source file, line 368.
This macro throws a debug statement event. This event is thrown whenever a pipe wants to send a textual message.
Parameters 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 380.
This function throws a debug statement event, with printf-style message generation.
Parameters list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
bool uprobe_dead(struct uprobe *uprobe)
This function is declared in upipe/uprobe.h source file, line 181.
This function checks if the probe has no more references.
Parameters list:
- uprobe: pointer to uprobe
The return value is true if there is no reference to the probe
This macro is declared in upipe/uprobe.h source file, line 302.
This macro throws an error event. This event is thrown whenever a pipe wants to send a textual message.
Parameters 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 314.
This function throws an error event, with printf-style message generation.
Parameters list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This enum is declared in upipe/uprobe.h source file, line 50.
common types of events
Identifier | Value | Description |
---|---|---|
UPROBE_LOG | 0 | something occurred, and the pipe send a textual message (enum uprobe_log_level, const char *) |
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_SOURCE_END | 5 | 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 | 6 | unable to write to an output because the disk is full or another error occurred (const char *) |
UPROBE_NEED_UREF_MGR | 7 | a uref manager is necessary to operate (struct uref_mgr **) |
UPROBE_NEED_UPUMP_MGR | 8 | a upump manager is necessary to operate (struct upump_mgr **) |
UPROBE_FREEZE_UPUMP_MGR | 9 | upump manager probe is forbidden to answer (void) |
UPROBE_THAW_UPUMP_MGR | 10 | upump manager probe is allowed to answer (void) |
UPROBE_NEED_UCLOCK | 11 | a uclock is necessary to operate (struct uclock **) |
UPROBE_NEW_FLOW_FORMAT | 12 | a new flow format is proposed, ubuf_mgr may be required (struct uref *, struct ubuf_mgr **) |
UPROBE_NEW_FLOW_DEF | 13 | a new flow definition is available on the output (struct uref *) |
UPROBE_NEW_RAP | 14 | a new random access point is available in the input (struct uref *) |
UPROBE_SINK_LATENCY | 15 | a sink pipe declares a need for a given extra latency (uint64_t) |
UPROBE_SPLIT_UPDATE | 16 | a split pipe declares a new output flow list (void) |
UPROBE_FILTER_SUGGEST_FLOW_DEF | 17 | a filter pipe asks to validate the output flow def (struct uref *) |
UPROBE_SYNC_ACQUIRED | 18 | a pipe got synchronized with its input (void) |
UPROBE_SYNC_LOST | 19 | a pipe lost synchronization with its input (void) |
UPROBE_CLOCK_REF | 20 | a pipe signals that a uref carries a new clock reference, and potentially a clock discontinuity * (struct uref *, uint64_t, int) |
UPROBE_CLOCK_TS | 21 | a pipe signals that a uref carries a presentation and/or a decoding timestamp (struct uref *) |
UPROBE_LOCAL | 0 | non-standard events implemented by a module type can start from there (first arg = signature) |
void uprobe_init(struct uprobe *uprobe, uprobe_throw_func uprobe_throw, struct uprobe *next)
This function is declared in upipe/uprobe.h source file, line 200.
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.
Parameters 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 enum is declared in upipe/uprobe.h source file, line 113.
This enum defines the levels of log messages.
Identifier | Value | Description |
---|---|---|
UPROBE_LOG_VERBOSE | 0 | verbose messages, on a uref basis |
UPROBE_LOG_DEBUG | 1 | debug messages, not necessarily meaningful |
UPROBE_LOG_NOTICE | 2 | notice messages, only informative |
UPROBE_LOG_WARNING | 3 | warning messages, the processing continues but may have unexpected results |
UPROBE_LOG_ERROR | 4 | error messages, the processing cannot continue |
This macro is declared in upipe/uprobe.h source file, line 346.
This macro throws a notice statement event. This event is thrown whenever a pipe wants to send a textual message.
Parameters 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 358.
This function throws a notice statement event, with printf-style message generation.
Parameters list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
bool uprobe_plumber(int event, va_list args, struct uref **flow_def_p, const char **def_p)
This function is declared in upipe/uprobe.h source file, line 446.
This function implements the common parts of a plumber probe (catching the new_flow_def event).
Parameters 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
void uprobe_release(struct uprobe *uprobe)
This function is declared in upipe/uprobe.h source file, line 159.
This function decrements the reference count of a uprobe or frees it.
Parameters list:
- uprobe: pointer to uprobe
bool uprobe_single(struct uprobe *uprobe)
This function is declared in upipe/uprobe.h source file, line 170.
This function checks if the probe has more than one reference.
Parameters list:
- uprobe: pointer to uprobe
The return value is true if there is only one reference to the probe
This macro is declared in upipe/uprobe.h source file, line 426.
This macro throws an error event.
Parameters list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- errcode: error code
This macro is declared in upipe/uprobe.h source file, line 413.
This macro throws a fatal error event. After this event, the behaviour of a pipe is undefined, except for calls to upipe_release.
Parameters 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 128.
This typedef is the call-back type for uprobe events.
This function is declared in upipe/uprobe.h source file, line 264.
This function propagates an unhandled event to the next probe.
Parameters 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 147.
This function increments the reference count of a uprobe.
Parameters list:
- uprobe: pointer to uprobe
The return value is same pointer to uprobe
This macro is declared in upipe/uprobe.h source file, line 390.
This macro throws a verbose statement event. This event is thrown whenever a pipe wants to send a textual message.
Parameters 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 403.
This function throws a verbose statement event, with printf-style message generation.
Parameters list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This macro is declared in upipe/uprobe.h source file, line 324.
This macro throws a warning event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- uprobe: description structure of the pipe
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/uprobe.h source file, line 336.
This function throws a warning event, with printf-style message generation.
Parameters list:
- uprobe: pointer to probe hierarchy
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
void uprobe_log(struct uprobe *uprobe, struct upipe *upipe, enum uprobe_log_level level, const char *msg)
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 278.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameters 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, ...)
This function is for internal use only.
This function is declared in upipe/uprobe.h source file, line 292.
This function throws a log event, with printf-style message generation.
Parameters 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 246.
This function throws generic events with optional arguments.
Parameters 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 231.
This function throws generic events with optional arguments.
Parameters 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