opposite action to g_signal_connect ??
Sebastian Dröge
sebastian at centricular.com
Mon Dec 2 00:48:30 PST 2013
On Mo, 2013-12-02 at 00:23 -0800, pavel wrote:
> Thank you,
>
> in my code:
> -----------------------------------
> printf("(%s) \t Removing signal %d from \"%s\"...\n", __func__,
> data->appsrc_handler_id, GST_OBJECT_NAME(peer));
> g_signal_handler_disconnect(peer, data->appsrc_handler_id);
>
> printf("(%s) \t Disconnecting \"%s\" -|- \"%s\"...\n", __func__,
> GST_OBJECT_NAME(peer), GST_OBJECT_NAME(downstream_peer));
>
> gst_element_unlink(peer, downstream_peer);
>
> printf("%s) \t \"%s\" <-- GST_STATE_NULL...\n", __func__,
> GST_OBJECT_NAME(peer));
> gst_element_set_state(peer, GST_STATE_NULL);
>
> printf("(%s) \t Removing \"%s\"...\n", __func__, GST_OBJECT_NAME(peer));
> gst_bin_remove(GST_BIN(data->pipeline), peer)
> -----------------------------------
>
> I'm receiving:
> -----------------------------------
> 00:00:31: Removing app_src...
> 00:00:31: Removing signal 274 from "app_src"...
> 00:00:31: Disconnecting "app_src" -|- "decoder_queue"...
> 00:00:31: "app_src" <-- GST_STATE_NULL...
> 00:00:31: WARNING: (cb_need_data) quit, "push-buffer" failed.
> Stopping playback
> 00:00:31: Remove "app_src"...
> -----------------------------------
>
> So, after I remove the handler, and set NULL state to the appsrc, the
> handler is still getting called.
Do you connect to need-data and enough-data, and only store one of the
return values? Please also show the code where you connect the signals
and store the signal handler IDs.
Also there could be a race condition here. If the source is still
running, it could be inside the signal handler already when you
disconnect it.
--
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131202/30599b21/attachment.pgp>
More information about the gstreamer-devel
mailing list