upipe/upipe.h header reference
Upipe module-level interface, typically implemented by a module More
Header inclusion
Members
Types
- struct upipe
- enum upipe_command
- struct upipe_mgr
- enum upipe_mgr_command
Functions
- int upipe_amend_flow_format(struct upipe *upipe, struct uref *flow_format)
- int upipe_attach_ubuf_mgr(struct upipe *upipe)
- int upipe_attach_uclock(struct upipe *upipe)
- int upipe_attach_upump_mgr(struct upipe *upipe)
- int upipe_attach_uref_mgr(struct upipe *upipe)
- void upipe_clean(struct upipe *upipe)
- void upipe_dbg_va(struct upipe *upipe, const char *format, ...)
- bool upipe_dead(struct upipe *upipe)
- void upipe_err_va(struct upipe *upipe, const char *format, ...)
- int upipe_filter_throw_suggest_flow_def(struct upipe *upipe, struct uref *flow_def)
- struct upipe * upipe_flow_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
- struct upipe * upipe_flow_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
- struct upipe * upipe_flow_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_alloc_sub(struct upipe *upipe, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
- struct upipe * upipe_flow_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
- struct upipe * upipe_flow_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- int upipe_get_flow_def(struct upipe *upipe, struct uref **p)
- int upipe_get_option(struct upipe *upipe, const char *option, const char **value_p)
- int upipe_get_output(struct upipe *upipe, struct upipe **p)
- int upipe_get_sub_mgr(struct upipe *upipe, struct upipe_mgr **p)
- int upipe_get_uri(struct upipe *upipe, const char **p)
- void upipe_init(struct upipe *upipe, struct upipe_mgr *mgr, struct uprobe *uprobe)
- void upipe_input(struct upipe *upipe, struct uref *uref, struct upump **upump_p)
- int upipe_iterate_sub(struct upipe *upipe, struct upipe **p)
- void upipe_mgr_release(struct upipe_mgr *mgr)
- struct upipe_mgr * upipe_mgr_use(struct upipe_mgr *mgr)
- int upipe_mgr_vacuum(struct upipe_mgr *mgr)
- void upipe_notice_va(struct upipe *upipe, const char *format, ...)
- struct uprobe * upipe_pop_probe(struct upipe *upipe)
- void upipe_push_probe(struct upipe *upipe, struct uprobe *uprobe)
- void upipe_release(struct upipe *upipe)
- int upipe_set_flow_def(struct upipe *upipe, struct uref *s)
- void upipe_set_opaque(struct upipe *upipe, void *opaque)
- int upipe_set_option(struct upipe *upipe, const char *option, const char *value)
- int upipe_set_output(struct upipe *upipe, struct upipe *s)
- int upipe_set_uri(struct upipe *upipe, const char *s)
- bool upipe_single(struct upipe *upipe)
- int upipe_sink_flush(struct upipe *upipe)
- int upipe_sink_get_delay(struct upipe *upipe, uint64_t *p)
- int upipe_sink_get_max_length(struct upipe *upipe, unsigned int *p)
- int upipe_sink_set_delay(struct upipe *upipe, uint64_t s)
- int upipe_sink_set_max_length(struct upipe *upipe, unsigned int s)
- int upipe_sink_throw_latency(struct upipe *upipe, uint64_t latency)
- int upipe_source_get_read_size(struct upipe *upipe, unsigned int *p)
- int upipe_source_set_read_size(struct upipe *upipe, unsigned int s)
- int upipe_split_iterate(struct upipe *upipe, struct uref **p)
- int upipe_split_throw_update(struct upipe *upipe)
- int upipe_sub_get_super(struct upipe *upipe, struct upipe **p)
- int upipe_suggest_flow_def(struct upipe *upipe, struct uref *flow_def)
- int upipe_throw_clock_ref(struct upipe *upipe, struct uref *uref, uint64_t clock_ref, int discontinuity)
- int upipe_throw_clock_ts(struct upipe *upipe, struct uref *uref)
- int upipe_throw_dead(struct upipe *upipe)
- int upipe_throw_freeze_upump_mgr(struct upipe *upipe)
- int upipe_throw_need_uclock(struct upipe *upipe, struct uclock **uclock_p)
- int upipe_throw_need_upump_mgr(struct upipe *upipe, struct upump_mgr **upump_mgr_p)
- int upipe_throw_need_uref_mgr(struct upipe *upipe, struct uref_mgr **uref_mgr_p)
- int upipe_throw_new_flow_def(struct upipe *upipe, struct uref *flow_def)
- int upipe_throw_new_flow_format(struct upipe *upipe, struct uref *flow_format, struct ubuf_mgr **ubuf_mgr_p)
- int upipe_throw_new_rap(struct upipe *upipe, struct uref *uref)
- int upipe_throw_proxy(struct upipe *upipe, struct upipe *inner, int event, va_list args)
- int upipe_throw_ready(struct upipe *upipe)
- int upipe_throw_sink_end(struct upipe *upipe)
- int upipe_throw_source_end(struct upipe *upipe)
- int upipe_throw_sync_acquired(struct upipe *upipe)
- int upipe_throw_sync_lost(struct upipe *upipe)
- int upipe_throw_thaw_upump_mgr(struct upipe *upipe)
- struct upipe * upipe_use(struct upipe *upipe)
- void upipe_verbose_va(struct upipe *upipe, const char *format, ...)
- struct upipe * upipe_void_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe)
- struct upipe * upipe_void_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
- struct upipe * upipe_void_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
- struct upipe * upipe_void_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
- struct upipe * upipe_void_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
- struct upipe * upipe_void_alloc_sub(struct upipe *upipe, struct uprobe *uprobe)
- struct upipe * upipe_void_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
- struct upipe * upipe_void_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
- struct upipe * upipe_void_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
- void upipe_warn_va(struct upipe *upipe, const char *format, ...)
Macros
Description
Members detail
This macro is declared in upipe/upipe.h source file, line 46.
This macro is declared in upipe/upipe.h source file, line 45.
This macro is declared in upipe/upipe.h source file, line 31.
This struct is declared in upipe/upipe.h source file, line 151.
This struct stores common parameters for upipe structures.
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 |
This function is declared in upipe/upipe.h source file, line 1138.
This function asks the pipe to review the given ubuf format, and optionally amend it with additional attributes. Allowed attributes are:
Parameters list:
- upipe: description structure of the pipe
- flow_format: proposed flow format, to be amended by the pipe (and optionally its outputs)
The return value is an error code
int upipe_attach_ubuf_mgr(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 1114.
This function sends a probe to attach a ubuf manager.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_attach_uclock(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 1104.
This function sends a probe to attach a uclock.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_attach_upump_mgr(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 1094.
This function sends a probe to attach a upump manager.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_attach_uref_mgr(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 1084.
This function sends a probe to attach a uref manager.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
void upipe_clean(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 472.
This function should be called by the module writer before it disposes of its upipe structure.
Parameters list:
- upipe: description structure of the pipe
This enum is declared in upipe/upipe.h source file, line 65.
This enum defines standard commands which upipe modules may implement.
Identifier | Value | Description |
---|---|---|
UPIPE_ATTACH_UREF_MGR | 0 | sends a probe to attach a uref manager (void) |
UPIPE_ATTACH_UPUMP_MGR | 1 | sends a probe to attach a upump manager (void) |
UPIPE_ATTACH_UCLOCK | 2 | sends a probe to attach a uclock (void) |
UPIPE_GET_URI | 3 | gets uniform resource identifier (const char **) |
UPIPE_SET_URI | 4 | sets uniform resource identifier (const char *) |
UPIPE_GET_OPTION | 5 | gets a string option (const char *, const char **) |
UPIPE_SET_OPTION | 6 | sets a string option (const char *, const char *) |
UPIPE_AMEND_FLOW_FORMAT | 7 | amend ubuf flow format (struct uref *) |
UPIPE_SET_FLOW_DEF | 8 | sets input flow definition (struct uref *) |
UPIPE_SUGGEST_FLOW_DEF | 9 | suggests an input flow definition (struct uref *) |
UPIPE_GET_OUTPUT | 10 | gets output (struct upipe **) |
UPIPE_SET_OUTPUT | 11 | sets output (struct upipe *) |
UPIPE_ATTACH_UBUF_MGR | 12 | sends a probe to attach a ubuf manager (void) |
UPIPE_GET_FLOW_DEF | 13 | gets output flow definition (struct uref **) |
UPIPE_SOURCE_GET_READ_SIZE | 14 | gets read buffer size (unsigned int *) |
UPIPE_SOURCE_SET_READ_SIZE | 15 | sets read buffer size (unsigned int) |
UPIPE_SINK_GET_MAX_LENGTH | 16 | gets the length of the internal queue (unsigned int *) |
UPIPE_SINK_SET_MAX_LENGTH | 17 | sets the length of the internal queue (unsigned int) |
UPIPE_SINK_FLUSH | 18 | flushes all currently held buffers and unblock the sources (void) |
UPIPE_SINK_GET_DELAY | 19 | gets delay applied to systime attribute (uint64_t *) |
UPIPE_SINK_SET_DELAY | 20 | sets delay applied to systime attribute (uint64_t) |
UPIPE_SPLIT_ITERATE | 21 | iterates over the flows (struct uref **) |
UPIPE_GET_SUB_MGR | 22 | returns the sub manager associated with a super-pipe (struct upipe_mgr **) |
UPIPE_ITERATE_SUB | 23 | iterates over subpipes (struct upipe **) |
UPIPE_SUB_GET_SUPER | 24 | returns the super-pipe associated with a subpipe (struct upipe **) |
UPIPE_CONTROL_LOCAL | 0 | non-standard commands implemented by a module type can start from there (first arg = signature) |
This macro is declared in upipe/upipe.h source file, line 587.
This macro throws a debug statement event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- upipe: description structure of the pipe
- msg: textual message
void upipe_dbg_va(struct upipe *upipe, const char *format, ...)
This function is declared in upipe/upipe.h source file, line 596.
This function throws a debug statement event, with printf-style message generation.
Parameters list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
bool upipe_dead(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 411.
This function checks if the pipe has no more references.
Parameters list:
- upipe: pointer to upipe
The return value is true if there is no reference to the pipe
This macro is declared in upipe/upipe.h source file, line 533.
This macro throws an error event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- upipe: description structure of the pipe
- msg: textual message
void upipe_err_va(struct upipe *upipe, const char *format, ...)
This function is declared in upipe/upipe.h source file, line 542.
This function throws an error event, with printf-style message generation.
Parameters list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in upipe/upipe.h source file, line 858.
This function throws an event asking to validate the output flow definition.
Parameters list:
- upipe: description structure of the pipe
- flow_def: proposed output flow definition
The return value is an error code
struct upipe * upipe_flow_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, struct uref *flow_def)
This function is declared in upipe/upipe.h source file, line 346.
This function allocates and initializes a pipe which is designed to accept an output flow definition.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- mgr: management structure for this pipe type
- uprobe: structure used to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- flow_def: flow definition of the output
The return value is pointer to allocated pipe, or NULL in case of failure
struct upipe * upipe_flow_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
This function is declared in upipe/upipe.h source file, line 1576.
This function allocates a new pipe from the given manager, designed to accept an output flow definition, and sets it as the input of the given pipe.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the input pipe
- flow_def_input: flow definition of the input
The return value is pointer to allocated input pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_flow_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
This function is declared in upipe/upipe.h source file, line 1671.
This function allocates a subpipe from the given super-pipe, with a flow def input argument, and sets it as the input of the given pipe.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- super_pipe: structure of the super-pipe
- uprobe: structure used by the input to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- flow_def: flow definition of the input
The return value is pointer to allocated input subpipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_flow_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
This function is declared in upipe/upipe.h source file, line 1336.
This function allocates a new pipe from the given manager, designed to accept an output flow definition, and sets it as the output of the given pipe.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the output pipe
- flow_def_output: flow definition of the output
The return value is pointer to allocated output pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_flow_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
This function is declared in upipe/upipe.h source file, line 1459.
This function allocates a subpipe from the given super-pipe, with a flow def output argument, and sets it as the output of the given pipe.
Please note that the super-pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- super_pipe: structure of the super-pipe
- uprobe: structure used by the output to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- flow_def: flow definition of the output
The return value is pointer to allocated output subpipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_flow_alloc_sub(struct upipe *upipe, struct uprobe *uprobe, struct uref *flow_def)
This function is declared in upipe/upipe.h source file, line 1246.
This function allocates and initializes a subpipe which is designed to accept an output flow definition.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: structure of the super-pipe
- uprobe: structure used to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- flow_def: flow definition of the output
The return value is pointer to allocated subpipe, or NULL in case of failure
struct upipe * upipe_flow_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
This function is declared in upipe/upipe.h source file, line 1614.
This function allocates a new pipe from the given manager, designed to accept an output flow definition, sets it as the input of the given pipe, and releases it.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the output pipe
- flow_def_output: flow definition of the output
The return value is pointer to allocated output pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_flow_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def_output)
This function is declared in upipe/upipe.h source file, line 1374.
This function allocates a new pipe from the given manager, designed to accept an output flow definition, sets it as the output of the given pipe, and releases it.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the output pipe
- flow_def_output: flow definition of the output
The return value is pointer to allocated output pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_flow_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
This function is declared in upipe/upipe.h source file, line 1488.
This function allocates a subpipe from the given super-pipe, with a flow def output argument, sets it as the output of the given pipe, and releases it.
Please note that the super-pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- super_pipe: structure of the super-pipe
- uprobe: structure used by the output to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- flow_def: flow definition of the output
The return value is pointer to allocated output subpipe (which must be stored or released), or NULL in case of failure
This function is declared in upipe/upipe.h source file, line 1038.
This function gets a pointer to the flow definition of the output.
Parameters list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
This macro is declared in upipe/upipe.h source file, line 421.
This macro gets the opaque member of a pipe.
Parameters list:
- upipe: pointer to upipe
- type: type to cast to
The return value is opaque
int upipe_get_option(struct upipe *upipe, const char *option, const char **value_p)
This function is declared in upipe/upipe.h source file, line 1061.
This function gets a string option.
Parameters list:
- upipe: description structure of the pipe
- option: name of the option
- value_p: filled with the value of the option
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1040.
This function gets a pointer to the pipe acting as output (unsafe, use only internally).
Parameters list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1183.
This function returns the subpipe manager of a super-pipe.
Parameters list:
- upipe: description structure of the super-pipe
- p: filled in with a pointer to the subpipe manager
The return value is an error code
int upipe_get_uri(struct upipe *upipe, const char **p)
This function is declared in upipe/upipe.h source file, line 1035.
This function gets a pointer to the uniform resource identifier.
Parameters list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
This function is declared in upipe/upipe.h source file, line 361.
This function initializes the public members of a pipe.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- mgr: management structure for this pipe type
- uprobe: structure used to raise events
This function is declared in upipe/upipe.h source file, line 948.
This function sends an input buffer into a pipe. Note that all inputs and control commands must be executed from the same thread - no reentrancy or locking is required from the pipe. Also note that uref is then owned by the callee and shouldn't be used any longer.
Parameters list:
- upipe: description structure of the pipe
- uref: uref structure to send
- upump_p: reference to the pump that generated the buffer
This function is declared in upipe/upipe.h source file, line 1194.
This function iterates over the subpipes of a super-pipe.
Parameters list:
- upipe: description structure of the super-pipe
- p: filled in with a pointer to the next subpipe, initialize at NULL
The return value is an error code
This struct is declared in upipe/upipe.h source file, line 178.
This struct stores common management parameters for a pipe type.
Field | Description |
---|---|
struct urefcount *refcount; | pointer to refcount management structure |
unsigned int signature; | signature of the pipe allocator |
struct upipe *(*upipe_alloc)(struct upipe_mgr *, struct uprobe *, uint32_t , va_list ) ; | function to create a pipe - uprobe belongs to the callee |
void (*upipe_input)(struct upipe *, struct uref *, struct upump **) ; | function to send a uref to an input - the uref then belongs to the callee |
int (*upipe_control)(struct upipe *, int , va_list ) ; | control function for standard or local commands - all parameters belong to the caller |
int (*upipe_mgr_control)(struct upipe_mgr *, int , va_list ) ; | control function for standard or local manager commands - all parameters belong to the caller |
This enum is declared in upipe/upipe.h source file, line 168.
This enum defines standard commands which upipe managers may implement.
Identifier | Value | Description |
---|---|---|
UPIPE_MGR_VACUUM | 0 | release all buffers kept in pools (void) |
UPIPE_MGR_CONTROL_LOCAL | 0 | non-standard manager commands implemented by a module type can start from there (first arg = signature) |
void upipe_mgr_release(struct upipe_mgr *mgr)
This function is declared in upipe/upipe.h source file, line 217.
This function decrements the reference count of a upipe manager or frees it.
Parameters list:
- mgr: pointer to upipe manager
This function is declared in upipe/upipe.h source file, line 205.
This function increments the reference count of a upipe manager.
Parameters list:
- mgr: pointer to upipe manager
The return value is same pointer to upipe manager
int upipe_mgr_vacuum(struct upipe_mgr *mgr)
This function is declared in upipe/upipe.h source file, line 267.
This function instructs an existing upipe manager to release all structures currently kept in pools. It is intended as a debug tool only.
Parameters list:
- mgr: pointer to upipe manager
The return value is an error code
This macro is declared in upipe/upipe.h source file, line 569.
This macro throws a notice statement event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- upipe: description structure of the pipe
- msg: textual message
void upipe_notice_va(struct upipe *upipe, const char *format, ...)
This function is declared in upipe/upipe.h source file, line 578.
This function throws a notice statement event, with printf-style message generation.
Parameters list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in upipe/upipe.h source file, line 459.
This function deletes the first probe from the LIFO of probes associated with a pipe, and returns it so it can be released.
Please note that this function does not _release() the popped probe, so it must be done by the caller.
Parameters list:
- upipe: description structure of the pipe
The return value is uprobe pointer to popped probe
This function is declared in upipe/upipe.h source file, line 444.
This function adds the given probe to the LIFO of probes associated with a pipe. The new probe will be executed first.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- uprobe: pointer to probe
void upipe_release(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 389.
This function decrements the reference count of a upipe or frees it.
Parameters list:
- upipe: pointer to upipe
This function is declared in upipe/upipe.h source file, line 1038.
This function sets the flow definition of the output.
Parameters list:
- upipe: description structure of the pipe
- s: new value
The return value is an error code
void upipe_set_opaque(struct upipe *upipe, void *opaque)
This function is declared in upipe/upipe.h source file, line 430.
This function sets the opaque member of a pipe.
Parameters list:
- upipe: pointer to upipe
- opaque: opaque
int upipe_set_option(struct upipe *upipe, const char *option, const char *value)
This function is declared in upipe/upipe.h source file, line 1074.
This function sets a string option.
Parameters list:
- upipe: description structure of the pipe
- option: name of the option
- value: value of the option
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1040.
This function sets the pipe acting as output (unsafe, use only internally).
Parameters list:
- upipe: description structure of the pipe
- s: new value
The return value is an error code
int upipe_set_uri(struct upipe *upipe, const char *s)
This function is declared in upipe/upipe.h source file, line 1035.
This function sets the uniform resource identifier.
Parameters list:
- upipe: description structure of the pipe
- s: new value
The return value is an error code
bool upipe_single(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 400.
This function checks if the pipe has more than one reference.
Parameters list:
- upipe: pointer to upipe
The return value is true if there is only one reference to the pipe
int upipe_sink_flush(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 1161.
This function flushes all currently held buffers, and unblocks the sources.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_sink_get_delay(struct upipe *upipe, uint64_t *p)
This function is declared in upipe/upipe.h source file, line 1049.
This function gets a pointer to the delay applied to systime attribute.
Parameters list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
int upipe_sink_get_max_length(struct upipe *upipe, unsigned int *p)
This function is declared in upipe/upipe.h source file, line 1047.
This function gets a pointer to the max length of the internal queue.
Parameters list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
int upipe_sink_set_delay(struct upipe *upipe, uint64_t s)
This function is declared in upipe/upipe.h source file, line 1049.
This function sets the delay applied to systime attribute.
Parameters list:
- upipe: description structure of the pipe
- s: new value
The return value is an error code
int upipe_sink_set_max_length(struct upipe *upipe, unsigned int s)
This function is declared in upipe/upipe.h source file, line 1047.
This function sets the max length of the internal queue.
Parameters list:
- upipe: description structure of the pipe
- s: new value
The return value is an error code
int upipe_sink_throw_latency(struct upipe *upipe, uint64_t latency)
This function is declared in upipe/upipe.h source file, line 833.
This function throws a latency event. This event is thrown whenever a sink pipe requests an extra latency.
Parameters list:
- upipe: description structure of the pipe
- latency: extra latency
The return value is an error code
int upipe_source_get_read_size(struct upipe *upipe, unsigned int *p)
This function is declared in upipe/upipe.h source file, line 1043.
This function gets a pointer to the read size of the source.
Parameters list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
int upipe_source_set_read_size(struct upipe *upipe, unsigned int s)
This function is declared in upipe/upipe.h source file, line 1043.
This function sets the read size of the source.
Parameters list:
- upipe: description structure of the pipe
- s: new value
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1172.
This function iterates over the list of possible output flow definitions.
Parameters list:
- upipe: description structure of the pipe
- p: filled in with the next flow def, initialize at NULL
The return value is an error code
int upipe_split_throw_update(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 845.
This function throws an update event. This event is thrown whenever a split pipe declares a new output flow list.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1205.
This function returns the super-pipe of a subpipe.
Parameters list:
- upipe: description structure of the subpipe
- p: filled in with a pointer to the super-pipe
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1151.
This function asks the pipe to modify the given flow definition so that it would be acceptable by set_flow_def.
Parameters list:
- upipe: description structure of the pipe
- flow_def: proposed flow definition, to be modified by the pipe
The return value is an error code
int upipe_throw_clock_ref(struct upipe *upipe, struct uref *uref, uint64_t clock_ref, int discontinuity)
This function is declared in upipe/upipe.h source file, line 901.
This function throws an event telling that the given uref carries a clock reference.
Parameters list:
- upipe: description structure of the pipe
- uref: uref carrying a clock reference
- clock_ref: clock reference, in 27 MHz scale
- discontinuity: 1 if there is a suspicion of discontinuity
The return value is an error code
This function is declared in upipe/upipe.h source file, line 916.
This function throws an event telling that the given uref carries a presentation and/or a decoding timestamp. The uref must at least have k.dts.orig set. Depending on the module documentation, k.dts may also be set. A probe is entitled to adding new attributes such as k.pts.sys and/or k.dts.sys.
Parameters list:
- upipe: description structure of the pipe
- uref: uref carrying a presentation and/or a decoding timestamp
The return value is an error code
int upipe_throw_dead(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 659.
This function throws a dead event. This event is thrown whenever a pipe is about to be destroyed and will no longer accept input and control commands.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
This macro is declared in upipe/upipe.h source file, line 635.
This macro throws an error event.
Parameters list:
- upipe: description structure of the pipe
- errcode: error code
The return value is an error code
This macro is declared in upipe/upipe.h source file, line 626.
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:
- upipe: description structure of the pipe
- errcode: error code
The return value is an error code
int upipe_throw_freeze_upump_mgr(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 733.
This function throws an event asking to freeze the upump manager of the current thread. This allows to prepare pipes that will be deported later.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
See also upipe_throw_thaw_upump_mgr function.
This function is declared in upipe/upipe.h source file, line 761.
This function throws an event asking for a uclock. Note that all parameters belong to the caller, so there is no need to uclock_use the given uclock.
Parameters list:
- upipe: description structure of the pipe
- uclock_p: filled in with a pointer to the uclock
The return value is an error code
This function is declared in upipe/upipe.h source file, line 717.
This function throws an event asking for a upump manager. Note that all parameters belong to the caller, so there is no need to upump_mgr_use the given manager.
Parameters list:
- upipe: description structure of the pipe
- upump_mgr_p: filled in with a pointer to the upump manager
The return value is an error code
This function is declared in upipe/upipe.h source file, line 699.
This function throws an event asking for a uref manager. Note that all parameters belong to the caller, so there is no need to uref_mgr_use the given manager.
Parameters list:
- upipe: description structure of the pipe
- uref_mgr_p: filled in with a pointer to the uref manager
The return value is an error code
This function is declared in upipe/upipe.h source file, line 803.
This function throws an event declaring a new flow definition on the output.
Parameters list:
- upipe: description structure of the pipe
- flow_def: definition for this flow
The return value is an error code
int upipe_throw_new_flow_format(struct upipe *upipe, struct uref *flow_format, struct ubuf_mgr **ubuf_mgr_p)
This function is declared in upipe/upipe.h source file, line 780.
This function throws an event proposing a new flow format. If the ubuf_mgr_p parameter is not NULL, its also requests a ubuf manager. Note that all parameters belong to the caller, so there is no need to ubuf_mgr_use the given manager.
Parameters list:
- upipe: description structure of the pipe
- flow_format: format of this flow
- ubuf_mgr_p: filled in with a pointer to an ubuf_mgr, if not NULL
The return value is an error code
This function is declared in upipe/upipe.h source file, line 820.
This function throws an event declaring a new random access point in the input.
Parameters list:
- upipe: description structure of the pipe
- uref: uref containing the random access point
The return value is an error code
This function is declared in upipe/upipe.h source file, line 931.
This function catches an event coming from an inner pipe, and rethrows is as if it were sent by the outermost pipe.
Parameters list:
- upipe: pointer to outermost pipe
- inner: pointer to inner pipe
- event: event thrown
- args: optional arguments of the event
The return value is an error code
int upipe_throw_ready(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 646.
This function throws a ready event. This event is thrown whenever a pipe is ready to accept input or respond to control commands.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_throw_sink_end(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 684.
This function throws a sink end event. This event is thrown when a pipe is unable to write to an output because the disk is full, or another error occurred.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_throw_source_end(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 672.
This function throws a source end event. This event is thrown when a pipe is unable to read from an input because the end of file was reached, or because an error occurred.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_throw_sync_acquired(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 874.
This function throws an event telling that a pipe synchronized on its input.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_throw_sync_lost(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 886.
This function throws an event telling that a pipe lost synchronization with its input.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
int upipe_throw_thaw_upump_mgr(struct upipe *upipe)
This function is declared in upipe/upipe.h source file, line 746.
This function throws an event asking to thaw the upump manager of the current thread. This allows to prepare pipes that will be deported later.
Parameters list:
- upipe: description structure of the pipe
The return value is an error code
See also upipe_throw_freeze_upump_mgr function.
This function is declared in upipe/upipe.h source file, line 377.
This function increments the reference count of a upipe.
Parameters list:
- upipe: pointer to upipe
The return value is same pointer to upipe
This macro is declared in upipe/upipe.h source file, line 605.
This macro throws a verbose statement event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- upipe: description structure of the pipe
- msg: textual message
void upipe_verbose_va(struct upipe *upipe, const char *format, ...)
This function is declared in upipe/upipe.h source file, line 616.
This function throws a verbose statement event, with printf-style message generation.
Parameters list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in upipe/upipe.h source file, line 327.
This function allocates and initializes a pipe which is designed to accept no argument.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- mgr: management structure for this pipe type
- uprobe: structure used to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
The return value is pointer to allocated pipe, or NULL in case of failure
struct upipe * upipe_void_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1514.
This function allocates a new pipe from the given manager, designed to accept no argument, and sets it as the input of the given pipe.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the input pipe
The return value is pointer to allocated input pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_void_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1642.
This function allocates a subpipe from the given super-pipe, and sets it as the input of the given pipe.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- super_pipe: structure of the super-pipe
- uprobe: structure used by the input to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
The return value is pointer to allocated input subpipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_void_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1272.
This function allocates a new pipe from the given manager, designed to accept no argument, and sets it as the output of the given pipe.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the output pipe
The return value is pointer to allocated output pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_void_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1402.
This function allocates a subpipe from the given super-pipe, and sets it as the output of the given pipe.
Please note that the super-pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- super_pipe: structure of the super-pipe
- uprobe: structure used by the output to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
The return value is pointer to allocated output subpipe (which must be stored or released), or NULL in case of failure
This function is declared in upipe/upipe.h source file, line 1222.
This function allocates and initializes a subpipe which is designed to accept no argument.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: structure of the super-pipe
- uprobe: structure used to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
The return value is pointer to allocated subpipe, or NULL in case of failure
struct upipe * upipe_void_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1549.
This function allocates a new pipe from the given manager, designed to accept no argument, sets it as the input of the given pipe, and releases it.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe (released afterwards)
- upipe_mgr: manager for the output pipe
The return value is pointer to allocated output pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_void_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1309.
This function allocates a new pipe from the given manager, designed to accept no argument, sets it as the output of the given pipe, and releases it.
Please note that the output pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe (released afterwards)
- upipe_mgr: manager for the output pipe
The return value is pointer to allocated output pipe (which must be stored or released), or NULL in case of failure
struct upipe * upipe_void_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
This function is declared in upipe/upipe.h source file, line 1430.
This function allocates a subpipe from the given super-pipe, sets it as the output of the given pipe, and releases it.
Please note that the super-pipe must accept upipe_set_flow_def control command.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- upipe: description structure of the pipe
- super_pipe: structure of the super-pipe
- uprobe: structure used by the output to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
The return value is pointer to allocated output subpipe (which must be stored or released), or NULL in case of failure
This macro is declared in upipe/upipe.h source file, line 551.
This macro throws a warning event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- upipe: description structure of the pipe
- msg: textual message
void upipe_warn_va(struct upipe *upipe, const char *format, ...)
This function is declared in upipe/upipe.h source file, line 560.
This function throws a warning event, with printf-style message generation.
Parameters list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This macro is for internal use only.
This macro is declared in upipe/upipe.h source file, line 1011.
This macro allows to easily define accessors for control commands.
Parameters list:
- group: group of commands in lower-case
- GROUP: group of commands in upper-case
- name: name of the command in lower-case
- NAME: name of the command in upper-case
- type: C-type representation of the parameter
- desc: description for auto-generated documentation
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 306.
This function allocates and initializes a pipe with a variable list of arguments.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- mgr: management structure for this pipe type
- uprobe: structure used to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- signature: signature of the pipe allocator, followed by optional arguments
The return value is pointer to allocated pipe, or NULL in case of failure
struct upipe * upipe_alloc_va(struct upipe_mgr *mgr, struct uprobe *uprobe, uint32_t signature, va_list args)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 286.
This function allocates and initializes a pipe.
Please note that this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameters list:
- mgr: management structure for this pipe type
- uprobe: structure used to raise events (belongs to the caller and must be kept alive for all the duration of the pipe)
- signature: signature of the pipe allocator
- args: optional arguments
The return value is pointer to allocated pipe, or NULL in case of failure
int upipe_control(struct upipe *upipe, int command, ...)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 994.
This function sends a control command to the pipe. Note that all control commands must be executed from the same thread - no reentrancy or locking is required from the pipe. Also note that all arguments are owned by the caller.
Parameters list:
- upipe: description structure of the pipe
- command: control command to send, followed by optional read or write parameters
The return value is an error code
int upipe_control_va(struct upipe *upipe, int command, va_list args)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 968.
This function sends a control command to the pipe. Note that all control commands must be executed from the same thread - no reentrancy or locking is required from the pipe. Also note that all arguments are owned by the caller.
Parameters list:
- upipe: description structure of the pipe
- command: control command to send
- args: optional read or write parameters
The return value is an error code
This function is for internal use only.
This function is declared in UBASE_FROM_TO function like macro expansion, line 19 in upipe/upipe.h source file, line 165.
This function returns a pointer to uchain.
Parameters list:
- sub: pointer to struct uchain
The return value is pointer to struct upipe
This macro is for internal use only.
This macro is declared in upipe/upipe.h source file, line 511.
This macro throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameters list:
- upipe: description structure of the pipe
- level: level of importance of the message
- msg: textual message
void upipe_log_va(struct upipe *upipe, enum uprobe_log_level level, const char *format, ...)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 524.
This function throws a log event, with printf-style message generation.
Parameters list:
- upipe: description structure of the pipe
- level: level of importance of the message
- format: format of the textual message, followed by optional arguments
int upipe_mgr_control(struct upipe_mgr *mgr, int command, ...)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 251.
This function sends a control command to the pipe manager. Note that thread semantics depend on the pipe manager. Also note that all arguments are owned by the caller.
Parameters list:
- mgr: pointer to upipe manager
- command: control manager command to send, followed by optional read or write parameters
The return value is an error code
int upipe_mgr_control_va(struct upipe_mgr *mgr, int command, va_list args)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 233.
This function sends a control command to the pipe manager. Note that thread semantics depend on the pipe manager. Also note that all arguments are owned by the caller.
Parameters list:
- mgr: pointer to upipe manager
- command: manager control command to send
- args: optional read or write parameters
The return value is an error code
int upipe_throw(struct upipe *upipe, int event, ...)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 497.
This function throws generic events with optional arguments.
Parameters list:
- upipe: description structure of the pipe
- event: event to throw, followed by arguments
The return value is an error code
int upipe_throw_va(struct upipe *upipe, int event, va_list args)
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 486.
This function throws generic events with optional arguments.
Parameters list:
- upipe: description structure of the pipe
- event: event to throw
- args: arguments
The return value is an error code
This function is for internal use only.
This function is declared in UBASE_FROM_TO function like macro expansion, line 9 in upipe/upipe.h source file, line 165.
This function returns a pointer to uchain.
Parameters list:
- upipe: pointer to struct upipe
The return value is pointer to struct uchain