mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-30 05:05:27 +00:00
gst: pipewiresink: extract gst_pipewire_sink_update_params
Add a helper function for updating the params instead of handling it in the pool_activated callback. This allows to explicitly set the params from the element.
This commit is contained in:
parent
6468e5338f
commit
21358526d5
|
@ -244,8 +244,9 @@ gst_pipewire_sink_class_init (GstPipeWireSinkClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
||||
gst_pipewire_sink_update_params (GstPipeWireSink *sink)
|
||||
{
|
||||
GstPipeWirePool *pool = sink->stream->pool;
|
||||
GstStructure *config;
|
||||
GstCaps *caps;
|
||||
guint size;
|
||||
|
@ -292,6 +293,13 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
|||
pw_thread_loop_unlock (sink->stream->core->loop);
|
||||
}
|
||||
|
||||
static void
|
||||
pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
||||
{
|
||||
GST_DEBUG_OBJECT (pool, "activated");
|
||||
gst_pipewire_sink_update_params (sink);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_pipewire_sink_init (GstPipeWireSink * sink)
|
||||
{
|
||||
|
@ -577,7 +585,7 @@ on_param_changed (void *data, uint32_t id, const struct spa_pod *param)
|
|||
return;
|
||||
|
||||
if (gst_buffer_pool_is_active (GST_BUFFER_POOL_CAST (pwsink->stream->pool)))
|
||||
pool_activated (pwsink->stream->pool, pwsink);
|
||||
gst_pipewire_sink_update_params (pwsink);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue