mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-24 07:00:05 -05:00
gst-source: fix state changes
Only go to READY in setup_pipeline, this is enough to get the caps. We don't want to go to PAUSED yet because we don't want to negotiate a format. Mark the source busy after we configured the capsfilter so that we can let the source negotiate correctly.
This commit is contained in:
parent
b86eb22922
commit
5c7447fb4d
3 changed files with 57 additions and 47 deletions
|
|
@ -416,8 +416,6 @@ gst_pinos_socket_sink_open (GstPinosSocketSink * this)
|
|||
{
|
||||
GError *error = NULL;
|
||||
|
||||
this->cache = gst_burst_cache_new (sizeof (MyReader));
|
||||
|
||||
this->context = g_main_context_new ();
|
||||
this->loop = g_main_loop_new (this->context, TRUE);
|
||||
GST_DEBUG ("context %p, loop %p", this->context, this->loop);
|
||||
|
|
@ -453,7 +451,6 @@ gst_pinos_socket_sink_close (GstPinosSocketSink * this)
|
|||
g_clear_pointer (&this->loop, g_main_loop_unref);
|
||||
g_clear_pointer (&this->context, g_main_context_unref);
|
||||
g_hash_table_remove_all (this->hash);
|
||||
g_clear_pointer (&this->cache, g_object_unref);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -799,6 +796,7 @@ gst_pinos_socket_sink_finalize (GObject * object)
|
|||
GstPinosSocketSink *this = GST_PINOS_SOCKET_SINK (object);
|
||||
|
||||
g_clear_pointer (&this->hash, g_hash_table_unref);
|
||||
g_clear_pointer (&this->cache, g_object_unref);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
|
@ -879,6 +877,7 @@ static void
|
|||
gst_pinos_socket_sink_init (GstPinosSocketSink * this)
|
||||
{
|
||||
this->hash = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
this->cache = gst_burst_cache_new (sizeof (MyReader));
|
||||
this->allocator = gst_tmpfile_allocator_new ();
|
||||
this->fdmanager = pinos_fd_manager_get (PINOS_FD_MANAGER_DEFAULT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue