mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-13 13:30:05 -05:00
Add support for async results
Add an async result code and an event to signal the completion. Use async return values to signal completion of a method and potential state change. Add selected format to port update message. Make it possible to parse into a custom copy of the command memory. Remove state change events from the elements, we now just update the state. Implement async results in the proxy element Add support for removing buffers in the client. Fix up pinossink Deal with async return in the links.
This commit is contained in:
parent
27acab7532
commit
68148188fa
25 changed files with 456 additions and 406 deletions
|
|
@ -215,10 +215,13 @@ struct _SpaNode {
|
|||
*
|
||||
* Send a command to @node.
|
||||
*
|
||||
* Upon completion, a command might change the state of a node.
|
||||
*
|
||||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node or command is %NULL
|
||||
* #SPA_RESULT_NOT_IMPLEMENTED when this node can't process commands
|
||||
* #SPA_RESULT_INVALID_COMMAND @command is an invalid command
|
||||
* #SPA_RESULT_ASYNC @command is executed asynchronously
|
||||
*/
|
||||
SpaResult (*send_command) (SpaNode *node,
|
||||
SpaNodeCommand *command);
|
||||
|
|
@ -339,14 +342,20 @@ struct _SpaNode {
|
|||
*
|
||||
* This function takes a copy of the format.
|
||||
*
|
||||
* Upon completion, this function might change the state of a node to
|
||||
* the READY state or to CONFIGURE when @format is NULL.
|
||||
*
|
||||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_OK_RECHECK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node is %NULL
|
||||
* #SPA_RESULT_INVALID_PORT when port_id is not valid
|
||||
* #SPA_RESULT_INVALID_MEDIA_TYPE when the media type is not valid
|
||||
* #SPA_RESULT_INVALID_FORMAT_PROPERTIES when one of the mandatory format
|
||||
* properties is not specified.
|
||||
* properties is not specified and #SPA_PORT_FORMAT_FLAG_FIXATE was
|
||||
* not set in @flags.
|
||||
* #SPA_RESULT_WRONG_PROPERTY_TYPE when the type or size of a property
|
||||
* is not correct.
|
||||
* #SPA_RESULT_ASYNC the function is executed asynchronously
|
||||
*/
|
||||
SpaResult (*port_set_format) (SpaNode *node,
|
||||
uint32_t port_id,
|
||||
|
|
@ -401,7 +410,12 @@ struct _SpaNode {
|
|||
* Passing %NULL as @buffers will remove the reference that the port has
|
||||
* on the buffers.
|
||||
*
|
||||
* Upon completion, this function might change the state of the
|
||||
* node to PAUSED, when the node has enough buffers, or READY when
|
||||
* @buffers are %NULL.
|
||||
*
|
||||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_ASYNC the function is executed asynchronously
|
||||
*/
|
||||
SpaResult (*port_use_buffers) (SpaNode *node,
|
||||
uint32_t port_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue