upipe-modules/upipe_queue_sink.h header reference
Upipe sink module for queues More
Header inclusion
Members
Type
- enum upipe_qsink_command
Functions
- int upipe_qsink_get_qsrc(struct upipe *upipe, struct upipe **qsrc_p)
- struct upipe_mgr * upipe_qsink_mgr_alloc(void )
- int upipe_qsink_set_qsrc(struct upipe *upipe, struct upipe *qsrc)
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
This macro is declared in upipe-modules/upipe_queue_sink.h source file, line 54.
This macro is declared in upipe-modules/upipe_queue_sink.h source file, line 47.
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.
Identifier | Value | Description |
---|---|---|
UPIPE_QSINK_SENTINEL | 0 | |
UPIPE_QSINK_GET_QSRC | 1 | returns a pointer to the current queue source (struct upipe **) |
UPIPE_QSINK_SET_QSRC | 2 | sets the pointer to the current queue source (struct upipe *) |
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
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