upipe-modules/upipe_worker.h header reference

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

Header inclusion  

Members  

Type  

Functions  

  • 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_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_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  

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  

#define UPIPE_WORK_MGR_GET_SET_MGR(name, NAME)  

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

#define UPIPE_WORK_MGR_GET_SET_MGR2(name, NAME)  

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

#define UPIPE_WORK_SIGNATURE  

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

#define _UPIPE_MODULES_UPIPE_WORKER_H_  

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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

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)  

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  

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_SENTINELUPIPE_MGR_CONTROL_LOCAL
UPIPE_WORK_MGR_GET_QSRC_MGRunknownreturns the current manager for qsrc inner pipes (struct upipe_mgr **)
UPIPE_WORK_MGR_SET_QSRC_MGRunknownsets the manager for qsrc inner pipes (struct upipe_mgr *)
UPIPE_WORK_MGR_GET_QSINK_MGRunknownreturns the current manager for qsink inner pipes (struct upipe_mgr **)
UPIPE_WORK_MGR_SET_QSINK_MGRunknownsets the manager for qsink inner pipes (struct upipe_mgr *)

int upipe_work_mgr_get_qsink_mgr(struct upipe_mgr *mgr, struct upipe_mgr *p)  

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

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)  

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

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_set_qsink_mgr(struct upipe_mgr *mgr, struct upipe_mgr *m)  

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

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)  

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

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_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)  

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

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)  

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

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 Fri Feb 2 23:57:18 2018 using MkDoc