upipe/uprobe.h header reference

Upipe structure used to raise events from pipes More

Header inclusion  

Members  

Types  

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  

Upipe structure used to raise events from pipes

Members detail  

#define _UPIPE_UPROBE_H_  

This macro is declared in upipe/uprobe.h source file, line 31.

struct uprobe  

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.

FieldDescription
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

#define uprobe_dbg(uprobe, upipe, msg)  

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

void uprobe_dbg_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)  

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

#define uprobe_err(uprobe, upipe, msg)  

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

void uprobe_err_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)  

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

enum uprobe_event  

This enum is declared in upipe/uprobe.h source file, line 50.

common types of events

IdentifierValueDescription
UPROBE_LOG0something occurred, and the pipe send a textual message (enum uprobe_log_level, const char *)
UPROBE_FATAL1a fatal error occurred, data may be lost (int); from now on the behaviour of the pipe is undefined, except upipe_release
UPROBE_ERROR2an error occurred, data may be lost (int); the module probably needs to be reinitialized
UPROBE_READY3a pipe is ready to accept input and respond to control commands (void)
UPROBE_DEAD4a pipe is about to be destroyed and will no longer accept input and control commands (void)
UPROBE_SOURCE_END5unable to read from a source because the end of file was reached, or the component disappeared, or because of an error (void)
UPROBE_SINK_END6unable to write to an output because the disk is full or another error occurred (const char *)
UPROBE_NEED_UREF_MGR7a uref manager is necessary to operate (struct uref_mgr **)
UPROBE_NEED_UPUMP_MGR8a upump manager is necessary to operate (struct upump_mgr **)
UPROBE_FREEZE_UPUMP_MGR9upump manager probe is forbidden to answer (void)
UPROBE_THAW_UPUMP_MGR10upump manager probe is allowed to answer (void)
UPROBE_NEED_UCLOCK11a uclock is necessary to operate (struct uclock **)
UPROBE_NEW_FLOW_FORMAT12a new flow format is proposed, ubuf_mgr may be required (struct uref *, struct ubuf_mgr **)
UPROBE_NEW_FLOW_DEF13a new flow definition is available on the output (struct uref *)
UPROBE_NEW_RAP14a new random access point is available in the input (struct uref *)
UPROBE_SINK_LATENCY15a sink pipe declares a need for a given extra latency (uint64_t)
UPROBE_SPLIT_UPDATE16a split pipe declares a new output flow list (void)
UPROBE_FILTER_SUGGEST_FLOW_DEF17a filter pipe asks to validate the output flow def (struct uref *)
UPROBE_SYNC_ACQUIRED18a pipe got synchronized with its input (void)
UPROBE_SYNC_LOST19a pipe lost synchronization with its input (void)
UPROBE_CLOCK_REF20a pipe signals that a uref carries a new clock reference, and potentially a clock discontinuity * (struct uref *, uint64_t, int)
UPROBE_CLOCK_TS21a pipe signals that a uref carries a presentation and/or a decoding timestamp (struct uref *)
UPROBE_LOCAL0non-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

enum uprobe_log_level  

This enum is declared in upipe/uprobe.h source file, line 113.

This enum defines the levels of log messages.

IdentifierValueDescription
UPROBE_LOG_VERBOSE0verbose messages, on a uref basis
UPROBE_LOG_DEBUG1debug messages, not necessarily meaningful
UPROBE_LOG_NOTICE2notice messages, only informative
UPROBE_LOG_WARNING3warning messages, the processing continues but may have unexpected results
UPROBE_LOG_ERROR4error messages, the processing cannot continue

#define uprobe_notice(uprobe, upipe, msg)  

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

void uprobe_notice_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)  

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

#define uprobe_throw_error(uprobe, upipe, errcode)  

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

#define uprobe_throw_fatal(uprobe, upipe, errcode)  

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

typedef int (*uprobe_throw_func)(struct uprobe *, struct upipe *, int , va_list )   

This typedef is declared in upipe/uprobe.h source file, line 128.

This typedef is the call-back type for uprobe events.

int uprobe_throw_next(struct uprobe *uprobe, struct upipe *upipe, int event, va_list args)  

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

struct uprobe * uprobe_use(struct uprobe *uprobe)  

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

#define uprobe_verbose(uprobe, upipe, msg)  

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

void uprobe_verbose_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)  

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

#define uprobe_warn(uprobe, upipe, msg)  

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

void uprobe_warn_va(struct uprobe *uprobe, struct upipe *upipe, const char *format, ...)  

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

int uprobe_throw(struct uprobe *uprobe, struct upipe *upipe, int event, ...)  

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

int uprobe_throw_va(struct uprobe *uprobe, struct upipe *upipe, int event, va_list args)  

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

Valid XHTML 1.0 StrictGenerated by cmassiot on Thu Nov 6 12:15:38 2014 using MkDoc