mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05: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
1 changed files with 10 additions and 2 deletions
|
|
@ -244,8 +244,9 @@ gst_pipewire_sink_class_init (GstPipeWireSinkClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
gst_pipewire_sink_update_params (GstPipeWireSink *sink)
|
||||||
{
|
{
|
||||||
|
GstPipeWirePool *pool = sink->stream->pool;
|
||||||
GstStructure *config;
|
GstStructure *config;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
guint size;
|
guint size;
|
||||||
|
|
@ -292,6 +293,13 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
||||||
pw_thread_loop_unlock (sink->stream->core->loop);
|
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
|
static void
|
||||||
gst_pipewire_sink_init (GstPipeWireSink * sink)
|
gst_pipewire_sink_init (GstPipeWireSink * sink)
|
||||||
{
|
{
|
||||||
|
|
@ -577,7 +585,7 @@ on_param_changed (void *data, uint32_t id, const struct spa_pod *param)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gst_buffer_pool_is_active (GST_BUFFER_POOL_CAST (pwsink->stream->pool)))
|
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
|
static gboolean
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue