upipe-modules/upipe_queue_source.h header reference

Upipe source module for queues More

Header inclusion  

Members  

Type  

Functions  

  • struct upipe * upipe_qsrc_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_alloc_sub(struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)
  • struct upipe * upipe_qsrc_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)
  • int upipe_qsrc_get_length(struct upipe *upipe, unsigned int *length_p)
  • int upipe_qsrc_get_max_length(struct upipe *upipe, unsigned int *length_p)
  • struct upipe_mgr * upipe_qsrc_mgr_alloc(void )
  • int upipe_qsrc_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)
  • int upipe_qsrc_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)

Description  

Note that the allocator requires an additional parameter:

queue_length
maximum length of the queue (<= 255)

Also note that this module is exceptional in that upipe_release() may be called from another thread. The release function is thread-safe.

Members detail  

#define UPIPE_QSRC_SIGNATURE  

This macro is declared in upipe-modules/upipe_queue_source.h source file, line 50.

#define _UPIPE_MODULES_UPIPE_QUEUE_SOURCE_H_  

This macro is declared in upipe-modules/upipe_queue_source.h source file, line 39.

struct upipe * upipe_qsrc_alloc(struct upipe_mgr *mgr, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_alloc_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_alloc_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_alloc_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_alloc_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_alloc_sub(struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_chain_input(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_chain_input_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_chain_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_chain_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_chain_sub(struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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

enum upipe_qsrc_command  

This enum is declared in upipe-modules/upipe_queue_source.h source file, line 54.

This enum extends upipe_command with specific commands for queue source.

IdentifierValueDescription
UPIPE_QSRC_SENTINELUPIPE_CONTROL_LOCAL
UPIPE_QSRC_GET_MAX_LENGTHunknownreturns the maximum length of the queue (unsigned int *)
UPIPE_QSRC_GET_LENGTHunknownreturns the current length of the queue (unsigned int *)

int upipe_qsrc_get_length(struct upipe *upipe, unsigned int *length_p)  

This function is declared in upipe-modules/upipe_queue_source.h source file, line 93.

This function returns the current length of the queue. This function, like all control functions, may only be called from the thread which runs the queue source pipe. The length of the queue may change at any time and the value returned may no longer be valid.

Parameter list:

  • upipe: description structure of the pipe
  • length_p: filled in with the current length of the queue

The return value is an error code

int upipe_qsrc_get_max_length(struct upipe *upipe, unsigned int *length_p)  

This function is declared in upipe-modules/upipe_queue_source.h source file, line 77.

This function returns the maximum length of the queue.

Parameter list:

  • upipe: description structure of the pipe
  • length_p: filled in with the maximum length of the queue

The return value is an error code

struct upipe_mgr * upipe_qsrc_mgr_alloc(void )  

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

This function returns the management structure for all queue sources.

The return value is pointer to manager

int upipe_qsrc_spawn_output(struct upipe *upipe, struct upipe_mgr *upipe_mgr, struct uprobe *uprobe, unsigned int queue_length)  

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

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_qsrc_spawn_output_sub(struct upipe *upipe, struct upipe *super_pipe, struct uprobe *uprobe, unsigned int queue_length)  

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

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