upipe-modules/upipe_worker.h header reference

Bin pipe wrapping a queue, a linear subpipeline and a queue More

Header inclusion [link] 

Members [link] 

Type [link] 

Functions [link] 

  • struct upipe * upipe_work_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_alloc_sub(struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe * upipe_work_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • struct upipe_mgr * upipe_work_mgr_alloc(struct upipe_mgr *xfer_mgr)
  • int upipe_work_mgr_get_qsink_mgr(struct upipe_mgr *mgr, struct upipe_mgr **p)
  • int upipe_work_mgr_get_qsrc_mgr(struct upipe_mgr *mgr, struct upipe_mgr **p)
  • int upipe_work_mgr_get_xfer_mgr(struct upipe_mgr *mgr, struct upipe_mgr **p)
  • int upipe_work_mgr_set_qsink_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m)
  • int upipe_work_mgr_set_qsrc_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m)
  • int upipe_work_mgr_set_xfer_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m)
  • int upipe_work_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)
  • int upipe_work_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length)

Description [link] 

It allows to transfer an existing linear subpipeline (the given pipe, its output, the output of its output, etc.) to a remote upump_mgr, while setting up a queue to send the packets to the linear subpipeline, and a queue to retrieve the processed packets in the main upump_mgr.

Please note that the remote subpipeline is not "used" so its refcount is not incremented. For that reason it shouldn't be "released" afterwards. Only release the worker pipe.

Note that the allocator requires four additional parameters:

upipe_remote
subpipeline to transfer to remote upump_mgr (belongs to the callee)
uprobe_remote
probe hierarchy to use on the remote thread (belongs to the callee)
input_queue_length
number of packets in the queue between main and remote thread
output_queue_length
number of packets in the queue between remote and main thread

Members detail [link] 

#define UPIPE_WORK_MGR_GET_SET_MGR(name, NAME) [link] 

This macro is declared in upipe-modules/upipe_worker.h source file, line 73.

#define UPIPE_WORK_MGR_GET_SET_MGR2(name, NAME) [link] 

This macro is declared in upipe-modules/upipe_worker.h source file, line 87.

#define UPIPE_WORK_SIGNATURE [link] 

This macro is declared in upipe-modules/upipe_worker.h source file, line 59.

#define _UPIPE_MODULES_UPIPE_WORKER_H_ [link] 

This macro is declared in upipe-modules/upipe_worker.h source file, line 52.

struct upipe * upipe_work_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 15 in upipe-modules/upipe_worker.h source file, line 126.

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_work_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 113 in upipe-modules/upipe_worker.h source file, line 126.

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_work_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 282 in upipe-modules/upipe_worker.h source file, line 126.

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_work_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 37 in upipe-modules/upipe_worker.h source file, line 126.

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_work_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 208 in upipe-modules/upipe_worker.h source file, line 126.

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_work_alloc_sub(struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 163 in upipe-modules/upipe_worker.h source file, line 126.

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_work_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 142 in upipe-modules/upipe_worker.h source file, line 126.

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_work_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 307 in upipe-modules/upipe_worker.h source file, line 126.

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_work_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 64 in upipe-modules/upipe_worker.h source file, line 126.

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_work_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 233 in upipe-modules/upipe_worker.h source file, line 126.

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_work_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 185 in upipe-modules/upipe_worker.h source file, line 126.

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

struct upipe_mgr * upipe_work_mgr_alloc(struct upipe_mgr *xfer_mgr) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 67.

This function returns the management structure for all worker pipes.

Parameter list:

  • xfer_mgr: manager to transfer pipes to the remote thread

The return value is pointer to manager

enum upipe_work_mgr_command [link] 

This enum is declared in upipe-modules/upipe_worker.h source file, line 70.

This enum extends upipe_mgr_command with specific commands for worker.

IdentifierValueDescription
UPIPE_WORK_MGR_SENTINEL0x8000
UPIPE_WORK_MGR_GET_QSRC_MGR1returns the current manager for qsrc inner pipes (struct upipe_mgr **)
UPIPE_WORK_MGR_SET_QSRC_MGR2sets the manager for qsrc inner pipes (struct upipe_mgr *)
UPIPE_WORK_MGR_GET_QSINK_MGR3returns the current manager for qsink inner pipes (struct upipe_mgr **)
UPIPE_WORK_MGR_SET_QSINK_MGR4sets the manager for qsink inner pipes (struct upipe_mgr *)
UPIPE_WORK_MGR_GET_XFER_MGR5returns the current manager for xfer inner pipes (struct upipe_mgr **)
UPIPE_WORK_MGR_SET_XFER_MGR6sets the manager for xfer inner pipes (struct upipe_mgr *)

int upipe_work_mgr_get_qsink_mgr(struct upipe_mgr *mgr, struct upipe_mgr **p) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 118.

This function returns the current manager for qsink inner pipes.

Parameter list:

  • mgr: pointer to manager
  • p: filled in with the qsink manager

The return value is an error code

int upipe_work_mgr_get_qsrc_mgr(struct upipe_mgr *mgr, struct upipe_mgr **p) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 117.

This function returns the current manager for qsrc inner pipes.

Parameter list:

  • mgr: pointer to manager
  • p: filled in with the qsrc manager

The return value is an error code

int upipe_work_mgr_get_xfer_mgr(struct upipe_mgr *mgr, struct upipe_mgr **p) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 119.

This function returns the current manager for xfer inner pipes.

Parameter list:

  • mgr: pointer to manager
  • p: filled in with the xfer manager

The return value is an error code

int upipe_work_mgr_set_qsink_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 118.

This function sets the manager for qsink inner pipes. This may only be called before any pipe has been allocated.

Parameter list:

  • mgr: pointer to manager
  • m: pointer to qsink manager

The return value is an error code

int upipe_work_mgr_set_qsrc_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 117.

This function sets the manager for qsrc inner pipes. This may only be called before any pipe has been allocated.

Parameter list:

  • mgr: pointer to manager
  • m: pointer to qsrc manager

The return value is an error code

int upipe_work_mgr_set_xfer_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m) [link] 

This function is declared in upipe-modules/upipe_worker.h source file, line 119.

This function sets the manager for xfer inner pipes. This may only be called before any pipe has been allocated.

Parameter list:

  • mgr: pointer to manager
  • m: pointer to xfer manager

The return value is an error code

int upipe_work_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 88 in upipe-modules/upipe_worker.h source file, line 126.

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_work_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, struct upipe *upipe_remote, struct uprobe *uprobe_remote, unsigned int input_queue_length, unsigned int output_queue_length) [link] 

This function is declared in UPIPE_HELPER_ALLOC function like macro expansion, line 257 in upipe-modules/upipe_worker.h source file, line 126.

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

Valid XHTML 1.0 StrictGenerated by cmassiot on Sun Dec 14 18:31:17 2025 using MkDoc