mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-27 07:00:12 -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
|
|
@ -481,6 +481,33 @@ on_format_notify (GObject *gobject,
|
|||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstPinosSink *pinossink = user_data;
|
||||
GstStructure *config;
|
||||
GstCaps *caps;
|
||||
guint size;
|
||||
guint min_buffers;
|
||||
guint max_buffers;
|
||||
SpaAllocParam *port_params[2];
|
||||
SpaAllocParamMetaEnable param_meta_enable;
|
||||
SpaAllocParamBuffers param_buffers;
|
||||
|
||||
config = gst_buffer_pool_get_config (GST_BUFFER_POOL (pinossink->pool));
|
||||
gst_buffer_pool_config_get_params (config, &caps, &size, &min_buffers, &max_buffers);
|
||||
|
||||
port_params[0] = ¶m_buffers.param;
|
||||
param_buffers.param.type = SPA_ALLOC_PARAM_TYPE_BUFFERS;
|
||||
param_buffers.param.size = sizeof (SpaAllocParamBuffers);
|
||||
param_buffers.minsize = size;
|
||||
param_buffers.stride = 0;
|
||||
param_buffers.min_buffers = min_buffers;
|
||||
param_buffers.max_buffers = max_buffers;
|
||||
param_buffers.align = 16;
|
||||
port_params[1] = ¶m_meta_enable.param;
|
||||
param_meta_enable.param.type = SPA_ALLOC_PARAM_TYPE_META_ENABLE;
|
||||
param_meta_enable.param.size = sizeof (SpaAllocParamMetaEnable);
|
||||
param_meta_enable.type = SPA_META_TYPE_HEADER;
|
||||
|
||||
pinos_stream_finish_format (pinossink->stream, SPA_RESULT_OK, port_params, 2);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue