upipe-modules/upipe_queue_sink.h header reference

Upipe sink module for queues More

Header inclusion  

Members  

Type  

Functions  

Description  

This pipe must be inited with upipe_qsink_set_qsrc before accepting packets. The qsrc may no longer be changed afterwards. The pipe also requires a upump manager.

This pipe also handles the upipe_set_output and upipe_get_output calls, though the output is only directed towards the qsrc. The purpose of this pseudo-output is to be automatically released when the qsink dies. Technically the pseudo-output doesn't get any input.

The typical use case is when using upipe_xfer_alloc. The qsrc has to be the original structure allocated by upipe_qsrc_alloc, but the pseudo-output can be the upipe_xfer pipe that acts as a proxy to the qsrc in a different thread. That way the upipe_xfer is released on termination, and releases in turn the qsrc in the appropriate upump_mgr (thread) context.

Members detail  

#define UPIPE_QSINK_SIGNATURE  

This macro is declared in upipe-modules/upipe_queue_sink.h source file, line 54.

#define _UPIPE_MODULES_UPIPE_QUEUE_SINK_H_  

This macro is declared in upipe-modules/upipe_queue_sink.h source file, line 47.

enum upipe_qsink_command  

This enum is declared in upipe-modules/upipe_queue_sink.h source file, line 58.

This enum extends upipe_command with specific commands for queue sink.

IdentifierValueDescription
UPIPE_QSINK_SENTINEL0
UPIPE_QSINK_GET_QSRC1returns a pointer to the current queue source (struct upipe **)
UPIPE_QSINK_SET_QSRC2sets the pointer to the current queue source (struct upipe *)

int upipe_qsink_get_qsrc(struct upipe *upipe, struct upipe **qsrc_p)  

This function is declared in upipe-modules/upipe_queue_sink.h source file, line 81.

This function returns a pointer to the current queue source.

Parameters list:

  • upipe: description structure of the pipe
  • queue_p: filled in with a pointer to the queue source

The return value is an error code

struct upipe_mgr * upipe_qsink_mgr_alloc(void )  

This function is declared in upipe-modules/upipe_queue_sink.h source file, line 71.

This function returns the management structure for all queue sinks.

The return value is pointer to manager

int upipe_qsink_set_qsrc(struct upipe *upipe, struct upipe *qsrc)  

This function is declared in upipe-modules/upipe_queue_sink.h source file, line 96.

This function sets the pointer to the current queue source. Please note that once it has been set to a non-NULL value, it is no longer possible to change the pairing.

Parameters list:

  • upipe: description structure of the pipe
  • queue: pointer to the queue source

The return value is an error code

Valid XHTML 1.0 StrictGenerated by cmassiot on Thu Nov 6 12:15:24 2014 using MkDoc