upipe/upipe.h header reference
Upipe module-level interface, typically implemented by a module More
Header inclusion [link]
Members [link]
Types [link]
- enum upipe_command
- enum upipe_mgr_command
Functions [link]
- 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)
- int upipe_bin_freeze(struct upipe *upipe)
- int upipe_bin_get_first_inner(struct upipe *upipe, struct upipe **p)
- int upipe_bin_get_last_inner(struct upipe *upipe, struct upipe **p)
- int upipe_bin_thaw(struct upipe *upipe)
- void upipe_clean(struct upipe *upipe)
- const char * upipe_command_str(struct upipe *upipe, int cmd)
- int upipe_control_provide_request(struct upipe *upipe, int command, va_list args)
- void upipe_dbg(struct upipe *upipe, const char *msg)
- void upipe_dbg_va(struct upipe *upipe, const char *format, ...)
- bool upipe_dead(struct upipe *upipe)
- int upipe_end_preroll(struct upipe *upipe)
- void upipe_err(struct upipe *upipe, const char *msg)
- const char * upipe_err_str(struct upipe *upipe, int err)
- void upipe_err_va(struct upipe *upipe, const char *format, ...)
- const char * upipe_event_str(struct upipe *upipe, int event)
- 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)
- 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)
- 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 *super_pipe, 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)
- struct upipe * upipe_flow_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- struct upipe * upipe_flow_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- int upipe_flow_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def)
- int upipe_flow_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def)
- int upipe_flush(struct upipe *upipe)
- int upipe_get_flow_def(struct upipe *upipe, struct uref **p)
- int upipe_get_max_length(struct upipe *upipe, unsigned int *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_output_size(struct upipe *upipe, unsigned int *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_info(struct upipe *upipe, const char *msg)
- void upipe_info_va(struct upipe *upipe, const char *format, ...)
- 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)
- int upipe_mgr_check_flow_def(struct upipe_mgr *mgr, struct uref *flow_def)
- void upipe_mgr_init(struct upipe_mgr *mgr)
- 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(struct upipe *upipe, const char *msg)
- 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)
- int upipe_register_request(struct upipe *upipe, struct urequest *urequest)
- void upipe_release(struct upipe *upipe)
- int upipe_set_flow_def(struct upipe *upipe, struct uref *s)
- int upipe_set_max_length(struct upipe *upipe, unsigned int 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_output_size(struct upipe *upipe, unsigned int 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_split_iterate(struct upipe *upipe, struct uref **p)
- int upipe_split_throw_update(struct upipe *upipe)
- int upipe_src_get_position(struct upipe *upipe, uint64_t position_p)
- int upipe_src_get_range(struct upipe *upipe, uint64_t *offset_p, uint64_t *length_p)
- int upipe_src_get_size(struct upipe *upipe, uint64_t *size_p)
- int upipe_src_set_position(struct upipe *upipe, uint64_t position)
- int upipe_src_set_range(struct upipe *upipe, uint64_t offset, uint64_t length)
- int upipe_sub_get_super(struct upipe *upipe, struct upipe **p)
- 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_clock_utc(struct upipe *upipe, struct uref *uref, uint64_t clock_utc)
- int upipe_throw_dead(struct upipe *upipe)
- int upipe_throw_freeze_upump_mgr(struct upipe *upipe)
- int upipe_throw_need_output(struct upipe *upipe, struct uref *flow_def)
- int upipe_throw_need_source_mgr(struct upipe *upipe, struct upipe_mgr **source_mgr_p)
- int upipe_throw_need_upump_mgr(struct upipe *upipe, struct upump_mgr **upump_mgr_p)
- int upipe_throw_new_flow_def(struct upipe *upipe, struct uref *flow_def)
- int upipe_throw_new_rap(struct upipe *upipe, struct uref *uref)
- int upipe_throw_preroll_end(struct upipe *upipe)
- int upipe_throw_provide_request(struct upipe *upipe, struct urequest *urequest)
- 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_stalled(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)
- int upipe_unregister_request(struct upipe *upipe, struct urequest *urequest)
- struct upipe * upipe_use(struct upipe *upipe)
- void upipe_verbose(struct upipe *upipe, const char *msg)
- 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 *super_pipe, 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_input_sub(struct upipe *upipe, struct upipe *super_pipe, 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)
- struct upipe * upipe_void_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe)
- int upipe_void_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe)
- int upipe_void_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe)
- void upipe_warn(struct upipe *upipe, const char *msg)
- void upipe_warn_va(struct upipe *upipe, const char *format, ...)
Macros [link]
Description [link]
Upipe module-level interface, typically implemented by a module
Members detail [link]
#define ARGS [link]
This macro is declared in upipe/upipe.h source file, line 1934.
#define ARGS_DECL [link]
This macro is declared in upipe/upipe.h source file, line 1932.
#define UPIPE_DEFINE_LOG(Level, Name) [link]
This macro is declared in upipe/upipe.h source file, line 658.
#define UPIPE_FLOW_SIGNATURE [link]
This macro is declared in upipe/upipe.h source file, line 47.
#define UPIPE_HELPER_ALLOC(GROUP, SIGNATURE) [link]
This macro is declared in upipe/upipe.h source file, line 1618.
This macro declares twelve functions to allocate pipes with a certain pipe allocator.
Supposing the name of the allocator is upipe_foo, it declares:
The basic pipe allocator.
struct upipe *upipe_foo_alloc_output(struct upipe *upipe,
struct upipe_mgr *upipe_mgr,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc() which additionally sets the allocated pipe as the output of the upipe argument.
struct upipe *upipe_foo_chain_output(struct upipe *upipe,
struct upipe_mgr *upipe_mgr,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_output() which additionally releases the upipe argument.
int upipe_foo_spawn_output(struct upipe *upipe,
struct upipe_mgr *upipe_mgr,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_output() which additionally releases the allocated pipe.
struct upipe *upipe_foo_alloc_input(struct upipe *upipe,
struct upipe_mgr *upipe_mgr,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc() which additionally sets the upipe argument as the output of the allocated pipe.
struct upipe *upipe_foo_chain_input(struct upipe *upipe,
struct upipe_mgr *upipe_mgr,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_input() which additionally releases the upipe argument.
A wrapper to upipe_foo_alloc() which retrieves the subpipe manager from the given super-pipe.
A wrapper to upipe_foo_alloc_sub() which also releases the super-pipe.
struct upipe *upipe_foo_alloc_output_sub(struct upipe *upipe,
struct upipe *super_pipe,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_sub() which additionally sets the allocated pipe as the output of the upipe argument.
struct upipe *upipe_foo_chain_output_sub(struct upipe *upipe,
struct upipe *super_pipe,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_output_sub() which additionally releases the upipe argument.
int upipe_foo_spawn_output_sub(struct upipe *upipe,
struct upipe *super_pipe,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_output_sub() which additionally releases the allocated pipe.
struct upipe *upipe_foo_alloc_input_sub(struct upipe *upipe,
struct upipe *super_pipe,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_sub() which additionally sets the upipe argument as the output of the allocated pipe.
struct upipe *upipe_foo_chain_input_sub(struct upipe *upipe,
struct upipe *super_pipe,
struct uprobe *uprobe, ...)A wrapper to upipe_foo_alloc_input() which additionally releases the upipe argument.
Please note that you must declare upipe_foo_alloc before this helper, and the macros ARGS_DECL and ARGS must be filled respectively with the declaration of arguments of upipe_foo_alloc, and the use of them in the call to uprobe_foo_alloc (arguments after uprobe).
Parameter list:
- GROUP: name of the allocator
#define UPIPE_VOID_SIGNATURE [link]
This macro is declared in upipe/upipe.h source file, line 46.
#define _UPIPE_UPIPE_H_ [link]
This macro is declared in upipe/upipe.h source file, line 31.
[link]
This struct is declared in upipe/ubuf_mem.h source file, line 42.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| uint32_t signature; | signature of the API (block, pic, sound, other) |
| struct ubuf *(*ubuf_alloc)(struct ubuf_mgr *, uint32_t signatureva_list ) ; | function to allocate a new ubuf, with optional arguments depending on the ubuf manager |
| int (*ubuf_control)(struct ubuf *, int va_list ) ; | control function for standard or local commands |
| void (*ubuf_free)(struct ubuf *) ; | function to free a ubuf |
| int (*ubuf_mgr_control)(struct ubuf_mgr *, int va_list ) ; | manager control function for standard or local commands |
[link]
This struct is declared in upipe/uprobe_uclock.h source file, line 42.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| uint64_t (*uclock_now)(struct uclock *) ; | function returning the current system time |
| uint64_t (*uclock_to_real)(struct uclock *, uint64_t ) ; | function converting a system time to Epoch-based real time |
| uint64_t (*uclock_from_real)(struct uclock *, uint64_t ) ; | function converting Epoch-based real time to system time |
struct upipe [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 |
This function is declared in upipe/upipe.h source file, line 1276.
This function sends a request to attach a ubuf manager.
Parameter 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 1266.
This function sends a request to attach a uclock.
Parameter 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 1256.
This function sends a request to attach a upump manager.
Parameter 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 1246.
This function sends a request to attach a uref manager.
Parameter 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 1406.
This function freezes the inner pipes if they are in a worker thread.
Parameter list:
- upipe: description structure of the bin pipe
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1428.
This function returns the first inner pipe of the bin for debug purposes.
Parameter list:
- upipe: description structure of the bin pipe
- p: filled in with a pointer to the first inner pipe
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1440.
This function returns the last inner pipe of the bin for debug purposes.
Parameter list:
- upipe: description structure of the bin pipe
- p: filled in with a pointer to the last inner pipe
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1416.
This function thaws the inner pipes if they are in a worker thread.
Parameter list:
- upipe: description structure of the bin pipe
The return value is an error code
This function is declared in upipe/upipe.h source file, line 580.
This function should be called by the module writer before it disposes of its upipe structure.
Parameter list:
- upipe: description structure of the pipe
enum upipe_command [link]
This enum is declared in upipe/upipe.h source file, line 66.
This enum defines standard commands which upipe modules may implement.
| Identifier | Value | Description |
|---|---|---|
| UPIPE_ATTACH_UREF_MGR | 0 | sends a request to attach a uref manager (void) |
| UPIPE_ATTACH_UPUMP_MGR | 1 | sends a request to attach a upump manager (void) |
| UPIPE_ATTACH_UCLOCK | 2 | sends a request 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_REGISTER_REQUEST | 7 | registers a request (struct urequest *) |
| UPIPE_UNREGISTER_REQUEST | 8 | unregisters a request (struct urequest *) |
| UPIPE_SET_FLOW_DEF | 9 | sets input flow definition (struct uref *) |
| UPIPE_GET_MAX_LENGTH | 10 | gets the length of the internal queue (unsigned int *) |
| UPIPE_SET_MAX_LENGTH | 11 | sets the length of the internal queue (unsigned int) |
| UPIPE_FLUSH | 12 | flushes all currently held buffers and unblock the sources (void) |
| UPIPE_END_PREROLL | 13 | end the preroll period (void) |
| UPIPE_GET_OUTPUT | 14 | gets output (struct upipe **) |
| UPIPE_SET_OUTPUT | 15 | sets output (struct upipe *) |
| UPIPE_ATTACH_UBUF_MGR | 16 | sends a request to attach a ubuf manager (void) |
| UPIPE_GET_FLOW_DEF | 17 | gets output flow definition (struct uref **) |
| UPIPE_GET_OUTPUT_SIZE | 18 | gets output packet size (unsigned int *) |
| UPIPE_SET_OUTPUT_SIZE | 19 | sets output packet size (unsigned int) |
| UPIPE_SPLIT_ITERATE | 20 | iterates over the flows (struct uref **) |
| UPIPE_GET_SUB_MGR | 21 | returns the sub manager associated with a super-pipe (struct upipe_mgr **) |
| UPIPE_ITERATE_SUB | 22 | iterates over subpipes (struct upipe **) |
| UPIPE_SUB_GET_SUPER | 23 | returns the super-pipe associated with a subpipe (struct upipe **) |
| UPIPE_BIN_FREEZE | 24 | freezes the inner pipes if they are in a worker thread (void) |
| UPIPE_BIN_THAW | 25 | thaws the inner pipes if they are in a worker thread (void) |
| UPIPE_BIN_GET_FIRST_INNER | 26 | returns the first inner pipe for debug purposes (struct upipe **) |
| UPIPE_BIN_GET_LAST_INNER | 27 | returns the last inner pipe for debug purposes (struct upipe **) |
| UPIPE_SRC_GET_SIZE | 28 | returns the size of the source, in octets (uint64_t *) |
| UPIPE_SRC_GET_POSITION | 29 | returns the reading position of the source, in octets (uint64_t *) |
| UPIPE_SRC_SET_POSITION | 30 | asks to read at the given position (uint64_t) |
| UPIPE_SRC_SET_RANGE | 31 | asks to read at the given position and size in octets, or to the end with size = -1 (uint64_t, uint64_t) |
| UPIPE_SRC_GET_RANGE | 32 | return the reading position and length of the currently opened file, in octets (uint64_t *, uint64_t *) |
| UPIPE_CONTROL_LOCAL | 0x8000 | non-standard commands implemented by a module type can start from there (first arg = signature) |
This function is declared in upipe/upipe.h source file, line 353.
This function return the corresponding command string.
Parameter list:
- upipe: description structure of the pipe
- cmd: the command value
The return value is the command string
This function is declared in upipe/upipe.h source file, line 840.
This function handles control commands for registering/unregistering request when an event need to be thrown.
Parameter list:
- upipe: description structure of the pipe
- command: control command to handle
- args: optional arguments
The return value is an error code
This function is declared in upipe/upipe.h source file, line 690.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/upipe.h source file, line 690.
This function throws a log event, with printf-style message generation.
Parameter 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 519.
This function checks if the pipe has no more references.
Parameter list:
- upipe: pointer to upipe
The return value is true if there is no reference to the pipe
This function is declared in upipe/upipe.h source file, line 1324.
This function ends the preroll period in a pipe.
Parameter 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 686.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/upipe.h source file, line 337.
This function return the corresponding error string.
Parameter list:
- upipe: description structure of the pipe
- err: the error value
The return value is the error string
This function is declared in upipe/upipe.h source file, line 686.
This function throws a log event, with printf-style message generation.
Parameter 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 406.
This function return the corresponding event string.
Parameter list:
- upipe: description structure of the pipe
- event: the event value
The return value is the event string
struct upipe * upipe_flow_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 15 in upipe/upipe.h source file, line 1944.
This function allocates and initializes a pipe from the given manager.
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.
Parameter list:
- mgr: management structure for this pipe type
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 113 in upipe/upipe.h source file, line 1944.
This function allocates a new pipe from the given manager, and sets it as the input of the given 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.
Parameter list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the input pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 282 in upipe/upipe.h source file, line 1944.
This function allocates a subpipe from the given super-pipe, and sets it as the input of the given 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.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 37 in upipe/upipe.h source file, line 1944.
This function allocates a new pipe from the given manager, and sets it as the output of the given 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.
Parameter list:
- upipe: description structure of the existing pipe
- upipe_mgr: manager for the output pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 208 in upipe/upipe.h source file, line 1944.
This function allocates a subpipe from the given super-pipe, and sets it as the output of the given 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.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
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 *super_pipe, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 163 in upipe/upipe.h source file, line 1944.
This function allocates and initializes a subpipe from the given super-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.
Parameter list:
- super_upipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 142 in upipe/upipe.h source file, line 1944.
This function allocates a new pipe from the given manager, sets it as the input of the given pipe, and releases it.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- upipe_mgr: manager for the input pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 307 in upipe/upipe.h source file, line 1944.
This function allocates a new pipe from the given manager, sets it as the input of the given pipe, and releases it.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 64 in upipe/upipe.h source file, line 1944.
This function allocates a new pipe from the given manager, sets it as the output of the given pipe, and releases the latter.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- upipe_mgr: manager for the output pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 233 in upipe/upipe.h source file, line 1944.
This function allocates a subpipe from the given super-pipe, sets it as the output of the given pipe, and releases the latter.
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.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
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_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 185 in upipe/upipe.h source file, line 1944.
This function allocates and initializes a subpipe from the given super-pipe, and releases the super-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.
Parameter list:
- super_upipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
The return value is pointer to allocated subpipe, or NULL in case of failure
int upipe_flow_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 88 in upipe/upipe.h source file, line 1944.
This function allocates a new pipe from the given manager, sets it as the output of the given pipe, and releases it.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- upipe_mgr: manager for the output pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
The return value is an error code
int upipe_flow_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct uref *flow_def) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 257 in upipe/upipe.h source file, line 1944.
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 this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1314.
This function flushes all currently held buffers, and unblocks the sources.
Parameter list:
- upipe: description structure of the pipe
The return value is an error code
#define upipe_foreach_sub(UPIPE, SUB) [link]
This macro is declared in upipe/upipe.h source file, line 1383.
This macro defines a helper to iterate over sub pipes.
Parameter list:
- UPIPE: description of the pipe structure
- SUB: name of the struct upipe * used to iterate
This function is declared in upipe/upipe.h source file, line 1205.
This function gets a pointer to the flow definition of the output.
Parameter 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 1209.
This function gets a pointer to the max length of the internal queue.
Parameter list:
- upipe: description structure of the pipe
- p: reference to a value, will be modified
The return value is an error code
#define upipe_get_opaque(upipe, type) [link]
This macro is declared in upipe/upipe.h source file, line 529.
This macro gets the opaque member of a pipe.
Parameter list:
- upipe: pointer to upipe
- type: type to cast to
The return value is opaque
This function is declared in upipe/upipe.h source file, line 1223.
This function gets a string option.
Parameter 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 1207.
This function gets a pointer to the pipe acting as output.
Parameter 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 1211.
This function gets a pointer to the packet size of the output.
Parameter 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 1362.
This function returns the subpipe manager of a super-pipe.
Parameter 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
This function is declared in upipe/upipe.h source file, line 1202.
This function gets a pointer to the uniform resource identifier.
Parameter 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 689.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/upipe.h source file, line 689.
This function throws a log event, with printf-style message generation.
Parameter 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 469.
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.
Parameter 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 1056.
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.
Parameter 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 1375.
This function iterates over the subpipes of a super-pipe. Note that it is forbidden to release the returned subpipe (but you may release any other subpipe).
Parameter 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
[link]
This struct is declared in upipe/uprobe_source_mgr.h source file, line 40.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| unsigned int signature; | signature of the pipe allocator |
| const char *(*upipe_err_str)(int err); | function to get local error string |
| const char *(*upipe_command_str)(int command); | function to get local command string |
| const char *(*upipe_event_str)(int event); | function to get local event string |
| 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 function is declared in upipe/upipe.h source file, line 326.
This function checks that a specific flow def is supported.
Parameter list:
- mgr: pointer to upipe manager
- flow_def: flow def to check
The return value is an error code
enum upipe_mgr_command [link]
This enum is declared in upipe/upipe.h source file, line 187.
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_CHECK_FLOW_DEF | 1 | check that a specific flow def is supported (struct uref *) |
| UPIPE_MGR_CONTROL_LOCAL | 0x8000 | non-standard manager commands implemented by a module type can start from there (first arg = signature) |
This function is declared in upipe/upipe.h source file, line 232.
This function initializes a upipe manager structure with default values.
Parameter list:
- mgr: pointer to upipe manager
This function is declared in upipe/upipe.h source file, line 264.
This function decrements the reference count of a upipe manager or frees it.
Parameter list:
- mgr: pointer to upipe manager
This function is declared in upipe/upipe.h source file, line 252.
This function increments the reference count of a upipe manager.
Parameter list:
- mgr: pointer to upipe manager
The return value is same pointer to upipe manager
This function is declared in upipe/upipe.h source file, line 314.
This function instructs an existing upipe manager to release all structures currently kept in pools. It is intended as a debug tool only.
Parameter list:
- mgr: pointer to upipe manager
The return value is an error code
This function is declared in upipe/upipe.h source file, line 688.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/upipe.h source file, line 688.
This function throws a log event, with printf-style message generation.
Parameter 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 567.
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.
Parameter 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 552.
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.
Parameter list:
- upipe: description structure of the pipe
- uprobe: pointer to probe
This function is declared in upipe/upipe.h source file, line 1288.
This function registers a request.
Parameter list:
- upipe: description structure of the pipe
- urequest: description structure of the request
The return value is an error code
This function is declared in upipe/upipe.h source file, line 497.
This function decrements the reference count of a upipe or frees it.
Parameter list:
- upipe: pointer to upipe
This function is declared in upipe/upipe.h source file, line 1205.
This function sets the flow definition of the output.
Parameter 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 1209.
This function sets the max length of the internal queue.
Parameter 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 538.
This function sets the opaque member of a pipe.
Parameter list:
- upipe: pointer to upipe
- opaque: opaque
This function is declared in upipe/upipe.h source file, line 1236.
This function sets a string option.
Parameter 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 1207.
This function sets the pipe acting as output.
Parameter 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 1211.
This function sets the packet size of the output.
Parameter 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 1202.
This function sets the uniform resource identifier.
Parameter 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 508.
This function checks if the pipe has more than one reference.
Parameter list:
- upipe: pointer to upipe
The return value is true if there is only one reference to the pipe
This function is deprecated.
This function is declared in upipe/upipe.h source file, line 1330.
This declaration involves expansion of the UBASE_DEPRECATED macro.
See also upipe_flush.
#define upipe_split_foreach(UPIPE, FLOW_DEF) [link]
This macro is declared in upipe/upipe.h source file, line 1349.
This macro defines a helper to iterate over split.
Parameter list:
- UPIPE: description of the pipe structure
- FLOW_DEF: name of the struct uref * used to iterate
This function is declared in upipe/upipe.h source file, line 1341.
This function iterates over the list of possible output flow definitions.
Parameter 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
This function is declared in upipe/upipe.h source file, line 946.
This function throws an update event. This event is thrown whenever a split pipe declares a new output flow list.
Parameter 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 1463.
This function returns the reading position of the current source.
Parameter list:
- upipe: description structure of the pipe
- position_p: filled in with the reading position, in octets
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1489.
This function returns the reading range of the current source.
Parameter list:
- upipe: description structure of the pipe
- offset_p: filled in with range start, in octets
- length_p: filled in with the reading length, in octets.
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1451.
This function returns the size of the currently opened source.
Parameter list:
- upipe: description structure of the pipe
- size_p: filled in with the size of the source, in octets
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1475.
This function request the given reading position for the current source.
Parameter list:
- upipe: description structure of the pipe
- position: new reading position, in octets (between 0 and the size)
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1503.
This function request the given range for the current source.
Parameter list:
- upipe: description structure of the pipe
- offset: range starts at offset, in octets
- length: octets to read from offset, in octets
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1396.
This function returns the super-pipe of a subpipe.
Parameter list:
- upipe: description structure of the subpipe
- p: filled in with a pointer to the super-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) [link]
This function is declared in upipe/upipe.h source file, line 984.
This function throws an event telling that the given uref carries a clock reference.
Parameter 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 999.
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.
Parameter list:
- upipe: description structure of the pipe
- uref: uref carrying a presentation and/or a decoding timestamp
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1014.
This function throws an event telling that the given uref carries a UTC clock reference.
Parameter list:
- upipe: description structure of the pipe
- uref: uref carrying a clock reference
- clock_utc: UTC clock reference, in 27 MHz scale starting at Epoch (1970-01-01T00:00:00Z)
The return value is an error code
This function is declared in upipe/upipe.h source file, line 734.
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.
Parameter list:
- upipe: description structure of the pipe
The return value is an error code
#define upipe_throw_error(upipe, errcode) [link]
This macro is declared in upipe/upipe.h source file, line 710.
This macro throws an error event.
Parameter list:
- upipe: description structure of the pipe
- errcode: error code
The return value is an error code
#define upipe_throw_fatal(upipe, errcode) [link]
This macro is declared in upipe/upipe.h source file, line 701.
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:
- upipe: description structure of the pipe
- errcode: error code
The return value is an error code
This function is declared in upipe/upipe.h source file, line 892.
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.
Parameter list:
- upipe: description structure of the pipe
The return value is an error code
See also upipe_throw_thaw_upump_mgr.
This function is declared in upipe/upipe.h source file, line 786.
This function throws an event asking for an output, either because no output pipe has been defined, or because the output pipe rejected the flow definition.
Parameter list:
- upipe: description structure of the pipe
- flow_def: output flow definition
The return value is an error code
This function is declared in upipe/upipe.h source file, line 805.
This function throws an event asking for a source pipe manager because a source pipe must be allocated.
Parameter list:
- upipe: description structure of the pipe
- source_mgr_p: pointer filled with the provided source pipe manager
The return value is an error code
This function is declared in upipe/upipe.h source file, line 866.
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.
Parameter 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 918.
This function throws an event declaring a new flow definition on the output.
Parameter list:
- upipe: description structure of the pipe
- flow_def: definition for this flow
The return value is an error code
This function is declared in upipe/upipe.h source file, line 935.
This function throws an event declaring a new random access point in the input.
Parameter 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 1024.
This function throws an event telling that the preroll is finished.
Parameter 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 821.
This function throws an event asking to provide a urequest. It is thrown by a pipe when it has no output, or when it would make no sense to forward the request to the output (for instance a request for a ubuf manager when the pipe is a decoder or encoder).
Parameter list:
- upipe: description structure of the pipe
- urequest: request to provide
The return value is an error code
This function is declared in upipe/upipe.h source file, line 1039.
This function catches an event coming from an inner pipe, and rethrows is as if it were sent by the outermost pipe.
Parameter 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
This function is declared in upipe/upipe.h source file, line 721.
This function throws a ready event. This event is thrown whenever a pipe is ready to accept input or respond to control commands.
Parameter 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 771.
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.
Parameter 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 759.
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.
Parameter 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 746.
This function throws a stalled event. This event is thrown whenever a queue is stalled due to a full FIFO.
Parameter 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 957.
This function throws an event telling that a pipe synchronized on its input.
Parameter 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 969.
This function throws an event telling that a pipe lost synchronization with its input.
Parameter 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 905.
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.
Parameter list:
- upipe: description structure of the pipe
The return value is an error code
See also upipe_throw_freeze_upump_mgr.
This function is declared in upipe/upipe.h source file, line 1302.
This function unregisters a request.
Parameter list:
- upipe: description structure of the pipe
- urequest: description structure of the request
The return value is an error code
This function is declared in upipe/upipe.h source file, line 485.
This function increments the reference count of a upipe.
Parameter list:
- upipe: pointer to upipe
The return value is same pointer to upipe
This function is declared in upipe/upipe.h source file, line 691.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/upipe.h source file, line 691.
This function throws a log event, with printf-style message generation.
Parameter list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 15 in upipe/upipe.h source file, line 1936.
This function allocates and initializes a pipe from the given manager.
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.
Parameter list:
- mgr: management structure for this pipe type
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 113 in upipe/upipe.h source file, line 1936.
This function allocates a new pipe from the given manager, and sets it as the input of the given 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.
Parameter list:
- upipe: description structure of the pipe
- upipe_mgr: manager for the input pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 282 in upipe/upipe.h source file, line 1936.
This function allocates a subpipe from the given super-pipe, and sets it as the input of the given 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.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 37 in upipe/upipe.h source file, line 1936.
This function allocates a new pipe from the given manager, and sets it as the output of the given 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.
Parameter list:
- upipe: description structure of the existing pipe
- upipe_mgr: manager for the output pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 208 in upipe/upipe.h source file, line 1936.
This function allocates a subpipe from the given super-pipe, and sets it as the output of the given 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.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
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_HELPER_ALLOC function like macro expansion, line 163 in upipe/upipe.h source file, line 1936.
This function allocates and initializes a subpipe from the given super-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.
Parameter list:
- super_upipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 142 in upipe/upipe.h source file, line 1936.
This function allocates a new pipe from the given manager, sets it as the input of the given pipe, and releases it.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- upipe_mgr: manager for the input pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 307 in upipe/upipe.h source file, line 1936.
This function allocates a new pipe from the given manager, sets it as the input of the given pipe, and releases it.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 64 in upipe/upipe.h source file, line 1936.
This function allocates a new pipe from the given manager, sets it as the output of the given pipe, and releases the latter.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- upipe_mgr: manager for the output pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
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) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 233 in upipe/upipe.h source file, line 1936.
This function allocates a subpipe from the given super-pipe, sets it as the output of the given pipe, and releases the latter.
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.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
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_HELPER_ALLOC function like macro expansion, line 185 in upipe/upipe.h source file, line 1936.
This function allocates and initializes a subpipe from the given super-pipe, and releases the super-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.
Parameter list:
- super_upipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
The return value is pointer to allocated subpipe, or NULL in case of failure
int upipe_void_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 88 in upipe/upipe.h source file, line 1936.
This function allocates a new pipe from the given manager, sets it as the output of the given pipe, and releases it.
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.
Parameter list:
- upipe: description structure of the pipe (belongs to the callee)
- upipe_mgr: manager for the output pipe
- uprobe: structure used to raise events (belongs to the callee), followed by arguments for the allocator ()
The return value is an error code
int upipe_void_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe) [link]
This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 257 in upipe/upipe.h source file, line 1936.
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 this function does not _use() the probe, so if you want to reuse an existing probe, you have to use it first.
Parameter list:
- upipe: description structure of the pipe
- super_pipe: description structure of the super-pipe
- uprobe: structure used to raise events (belongs to the callee) followed by arguments for the allocator ()
The return value is an error code
This function is declared in upipe/upipe.h source file, line 687.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter list:
- upipe: description structure of the pipe
- msg: textual message
This function is declared in upipe/upipe.h source file, line 687.
This function throws a log event, with printf-style message generation.
Parameter list:
- upipe: description structure of the pipe
- format: format of the textual message, followed by optional arguments
struct upump [link]
This struct is declared in upipe/upump.h source file, line 109.
| Field | Description |
|---|---|
| struct uchain uchain; | structure for double-linked lists - for use by the allocating pipe |
| struct upump_mgr * mgr; | pointer to the event loop manager |
| upump_cb cb; | function to call back when triggered |
| void * opaque; | opaque pointer for the callback |
| struct urefcount * refcount; | pointer to urefcount structure to increment during callback |
[link]
This struct is declared in upipe/uprobe_upump_mgr.h source file, line 43.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| unsigned int signature; | signature of the upump handler |
| struct uchain uchain; | structure for double-linked lists - for use by the application only |
| void * opaque; | opaque - for use by the application only |
| struct upump *(*upump_alloc)(struct upump_mgr *, int va_list ) ; | function to create a pump |
| int (*upump_control)(struct upump *, int va_list ) ; | control function for standard or local commands - all parameters belong to the caller |
| int (*upump_mgr_control)(struct upump_mgr *, int va_list ) ; | control function for standard or local manager commands - all parameters belong to the caller |
[link]
This struct is declared in upipe/ubuf_mem.h source file, line 46.
| Field | Description |
|---|---|
| struct uchain uchain; | structure for double-linked lists |
| struct uref_mgr * mgr; | pointer to the entity responsible for the management |
| struct ubuf * ubuf; | pointer to ubuf |
| struct udict * udict; | pointer to udict |
| uint64_t flags; | void flags |
| uint64_t date_sys; | date in system time |
| uint64_t date_prog; | date in program time |
| uint64_t date_orig; | original date |
| uint64_t dts_pts_delay; | duration between DTS and PTS |
| uint64_t cr_dts_delay; | duration between CR and DTS |
| uint64_t rap_cr_delay; | duration between RAP and CR |
| uint64_t priv; | private for local pipe user |
struct uref_mgr [link]
This struct is declared in upipe/uprobe_uref_mgr.h source file, line 42.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| size_t control_attr_size; | minimum size of a control uref |
| struct udict_mgr * udict_mgr; | udict manager |
| struct uref *(*uref_alloc)(struct uref_mgr *) ; | function to allocate a uref |
| void (*uref_free)(struct uref *) ; | function to free a uref |
| int (*uref_mgr_control)(struct uref_mgr *, int va_list ) ; | control function for standard or local manager commands - all parameters belong to the caller |
#define UPIPE_CONTROL_TEMPLATE(group, GROUP, name, NAME, type, desc) [link]
This macro is for internal use only.
This macro is declared in upipe/upipe.h source file, line 1178.
This macro allows to easily define accessors for control commands.
Parameter 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
struct upipe * upipe_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, uint32_t signature, ...) [link]
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 450.
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.
Parameter 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) [link]
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 430.
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.
Parameter 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
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 1161.
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.
Parameter 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
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 1141.
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.
This version doesn't print debug messages to avoid overflowing the console.
Parameter 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
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 1082.
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.
This version doesn't print debug messages to avoid overflowing the console.
Parameter 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 upipe/upipe.h source file, line 1106.
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.
Parameter 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 184.
This function returns a pointer to uchain.
Parameter list:
- sub: pointer to struct uchain
The return value is pointer to struct upipe
void upipe_log(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/upipe.h source file, line 623.
This function throws a log event. This event is thrown whenever a pipe wants to send a textual message.
Parameter 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, ...) [link]
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 652.
This function throws a log event, with printf-style message generation.
Parameter list:
- 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/upipe.h source file, line 298.
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.
Parameter 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
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 280.
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.
Parameter 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
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 605.
This function throws generic events with optional arguments.
Parameter list:
- upipe: description structure of the pipe
- event: event to throw, followed by arguments
The return value is an error code
This function is for internal use only.
This function is declared in upipe/upipe.h source file, line 594.
This function throws generic events with optional arguments.
Parameter 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 184.
This function returns a pointer to uchain.
Parameter list:
- upipe: pointer to struct upipe
The return value is pointer to struct uchain
void upipe_vlog(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/upipe.h source file, line 638.
This function throws a log event, with vprintf-style message generation.
Parameter list:
- upipe: description structure of the pipe
- level: level of importance of the message
- format: format of the textual message
- args: arguments for the format string